How can I set a topic variable using a HTML form button/elements?

Using SetVariablePlugin

The idea is that a POST to the save script will be monitored for any form elements named using the special prefixes mentioned in the documentation.

For example to save the equivalent of
    * Set SKIN = <user input>

Try the following:

<form action="%SCRIPTURLPATH{"save"}%/%WEB%/%TOPIC%" method="post"> 
  <input type="text" name="Set+SKIN"/> 
  <input type="submit" value="Set SKIN variable"/> 
</form>

It doesn't actually save a visible TML * Set = statement, instead an equivalent is stored in metadata (view it by appending ?raw=debug to the end of any topic URL) as a META:PREFERENCE

-- PaulHarvey - 11 Feb 2010

Support.FAQForm edit

TopicClassification FrequentlyAskedQuestion
Subject Extension, Macros or Variables
Topic Summary Using SetVariablePlugin to set a topic variable from user input/HTML form
Extension SetVariablePlugin
Interested Parties
Related Topics
Topic revision: r3 - 27 Dec 2011, ArthurClemens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy