Help required with Checkboxes

That’s a lot of plugins. I would make a backup, then disable the plugins, save, reload, and see if export works correctly.

There’s no point in doing a lot of work in your TW if it’s corrupted! So getting that fixed should be first on your agenda.

Sadly, I have a lot of single TW’s on different topics.
Probably nothing meaningful, I try different plugins and code examples.
I do have a todo and shopping list (your version) with all these ingredients/items

Can I open tiddlers and copy the code into a fresh TW tiddler or does that not work.

@Mark_S
Deleted all plugins except core from TW
Exported tiddler as .tid and imported to clean TW
Still shows javascript code
Starting afresh
Thanks for your help Mark_S

Scot

Did you check for overridden shadow tiddlers. The coding error shown when trying to import that mysterious mixture has to come from somewhere.

Thanks for your reply Birthe.
I didn’t check for overridden shadow tiddlers, but I’m not sure how I would identify them.
I have started to build my TWs again but have been trying to import any new files as JSON or .tid files as suggested by Mark_S
It seems to highlight other users tiddlers as being problematic.
I dont want to scare anyone but I think they best follow the instructions too

If you want to check for overriden shadow tiddlers you can go to $:/AdvancedSearch, use filter search and the drop down has a selection of filters…among them overridden shadow tiddlers.

One of your uploaded .json tiddlers I tried to import - said script error - some wrong sign in the wrong position in the first line.
I don’t know, but it might be a “small” thing like that mixing it all up. No matter from where it came - you can have imported it from someone.

I really understand your wish to start all over fresh.

I’ll give your suggestion a try. Reply again tomorrow with my findings.
Thanks for your help
Scot

@Birthe
I deleted all overridden shadow tiddlers, saved wiki and reloaded it - exported tiddlers in JSON and .tid format still showing error at line 1 and javascript geo code.
Upgraded the tw to 5.2.0 using online upgrade.html on tiddlywiki.com - same errors
Thanks
Scot

Scot, as mark suggested the format would be;

<$list filter="[tag[ingredient]tag[spice]sort[title]]">
<$checkbox field={{!!title}} checked={{!!title}} unchecked="" default=""> {{!!title}}</$checkbox>

</$list>

It is safe to do this in 5.2.0 because the field names have being liberated but earlier versions demand that the tiddler title maps to the field naming standards. Fine if they are single words, like ingredient, spice.

However I assume you want a recipe to have the list of spices available on that recipe as fields once checked? so say I selected “marjoram” you will have a field marjoram=“marjoram” perhaps you could set the value to a standard serve eg marjoram={{!!standards-serve}} and then if you want you can change the standard serve.

However;
Your example needs work I think, because you will be creating this field in the ingredient in the spice tiddler, not the current tiddler (presumably the recipe.

Perhaps you need something like this;

If current tiddler is the recipe perhaps like this; (untested)

<$list filter="[tag[ingredient]tag[spice]sort[title]]" variable=ingredient>
<$checkbox field=<<ingredient>> checked={{{ [<ingredient>get[standards-serve]] }}}  unchecked="" default=""> <<ingredient>> </$checkbox>

</$list>

@TW_Tones
Thanks your example works exactly how I wanted it to.
The standards-serve field is a nice addition.

<$list filter="[tag[ingredient]tag[spice]sort[title]]" variable=ingredient>
<$checkbox field=<<ingredient>> checked={{{ [<ingredient>get[standards-serve]] }}}  unchecked="" default=""> <<ingredient>> </$checkbox>

</$list>

Scot

1 Like