radio fields /checkboxes slections are not saved

110 views
Skip to first unread message

paulgilbert2000

unread,
Jun 3, 2021, 8:41:20 PM6/3/21
to TiddlyWiki

HI ,

I am having some trouble saving the selections  i make using radio button and check boxes

they do set the field values , however when i reload the WIKI , the check boxes are empty and the radio buttons selections are not there, is that how its meant to work, or am i doing something wrong

Time needed  <$select
field="ABC"…>
<option disabled></option>
<option>15</option>
<option>30</option>
<option>60</option>
<option>120</option>

</$select>

<$radio field="A"value="1"> A</$radio>
<$radio field="A"value="2"> B</$radio>
<$radio field="A"value="3"> C</$radio>


<br>

<$checkbox field="X"
checked="8" unchecked="6" default=""> X</$checkbox>
<$checkbox field="Y"
checked="6" unchecked="" default=""> Y </$checkbox>
<$checkbox field="Z"
checked="8" unchecked="" default=""> Z </$checkbox>


Eric Shulman

unread,
Jun 3, 2021, 9:28:08 PM6/3/21
to TiddlyWiki
On Thursday, June 3, 2021 at 5:41:20 PM UTC-7 Mohamed...@hotmail.com wrote:
...they do set the field values , however when i reload the WIKI , the check boxes are empty and the radio buttons selections are not there...

The checkboxes and radio button selections are stored as fields in the current tiddler, but those field changes won't be preserved unless you actually save your TiddlyWiki file before you reload.

-e




paulgilbert2000

unread,
Jun 3, 2021, 10:18:02 PM6/3/21
to TiddlyWiki
Thanks Eric,

well i do find the filed changes after saving , but they dont reflect in the actual check box or radio button, meaning that while  the value is in the field , the selction i previously made is not showing in the check box or radio button, i hope this makes sense

Eric Shulman

unread,
Jun 3, 2021, 10:53:39 PM6/3/21
to TiddlyWiki
On Thursday, June 3, 2021 at 7:18:02 PM UTC-7 Mohamed...@hotmail.com wrote:
well i do find the filed changes after saving , but they dont reflect in the actual check box or radio button, meaning that while  the value is in the field , the selection i previously made is not showing in the check box or radio button, i hope this makes sense

aha!  I just noticed, you've used CAPITAL letters for the field references in the $select, $radio and $checkbox widgets.  What is happening is that the fields are initially being stored in the tiddler as upper case, so things seem to be working at first... but then when the file is saved, the stored tiddler fieldnames are automatically converted to lower case.  Then, when you reload, those tiddler fieldnames no longer match the references in the $select, $radio and $checkbox widgets.

As described in the first line of https://tiddlywiki.com/#TiddlerFields:
TiddlerFields are name:value pairs that make up a tiddler. Field names must be lowercase letters, digits or the characters - (dash), _ (underscore) and . (period).

So... to fix your problem, just change your references to lower case.

-e

paulgilbert2000

unread,
Jun 4, 2021, 3:13:20 PM6/4/21
to TiddlyWiki
it was indeed

thanks again Eric for all your help
Reply all
Reply to author
Forward
0 new messages