On Monday, September 29, 2014 4:31:52 AM UTC-7, sklpns wrote:
>
> Hello everyone
> wondering how to change a field value with an onclick function
> Imagine a tiddler created thus
> <<newTiddler
> ...
>
fields:'graph.fillstyle:"black"'
> >>
>
> it has a custom field embedded into it (graph.fillstyle) to be used with
> TiddlerGraphPlugin (http://ideia.tiddlyspot.com/ )
>
> I'm looking for a way, using FormTiddlerPlugin 
> <http://tiddlywiki.abego-software.de/#FormTiddlerPlugin>, to change that 
> fields value according to 
> changes in an input form- something like when you select 'completed' from 
> a drop down 
> set the graph.fillstyle's value to 'white'
>

1) From the link you provided (FormTiddlerPlugin 
<http://tiddlywiki.abego-software.de/#FormTiddlerPlugin>), follow the 
"examples" link (at the bottom of the Description section of the plugin 
tiddler)
2) select BiggerForm from the table of examples
3) View the source of BiggerForm and note this:
<<formTiddler BiggerFormTemplate>>
4) Find BiggerFormTemplate in the sidebar tabs and open it
5) View the source of BiggerFormTemplate and note this:
<select name=browser >
 <option>Firefox
 <option>Internet Explorer
 <option>Opera
 <option>Other
</select >

The syntax used by FormTiddlerPlugin in BiggerFormTemplate is *standard 
HTML*.
Thus, to create a droplist that sets a field based on the selection, use 
something like this:
<select name="graph.fillstyle" size="1">
 <option value="black">Pending</option>
 <option value="white">Completed</option>
</select > 
notes:
* size="1" makes it a droplist instead of a listbox,
* value="..." sets a value other than the displayed text
   (i.e., "black" instead of "Pending", "white" instead of "Completed")
* correct use of </option> to end each list item

That should do it.

P.S.  Please remember to use [TWC] in the subject heading of your posts 
when they are related to TiddlyWiki *Classic* (v 2.8.1 or below) rather 
than the current release of TiddlyWiki (v5.1.x)

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
   http://TiddlyTools.github.com/fundraising.html#MakeADonation

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to