More help with checkboxes -Add checked items from data tiddler to current tiddler as fields

@TW_Tones
As you helped with the solution to a similar question with tagged tiddlers for ingredients, could you please offer some help with this request.

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

</$list>

I have a tiddler that will show the items in a data tiddler as checked items in a list.

<$list filter="[[tids]indexes[]]" variable=fieldname>
  <$checkbox field-=<<fieldname>>  checked="yes" unchecked="no" default="no"> <$text text={{{ [[tids]getindex<fieldname>] }}}/></$checkbox><br>
</$list>

I would like to adapt it so that the items are added to the current tiddler as fields. Unlike the first example, I would not need the standard- serve field

Thanks in advance
Scot

Scot,

I am not actually sure why this in not already doing what you ask;

  • Though you need to fix field-=<<fieldname>> as field=<<fieldname>>
  • is the tids tiddler a data tiddler containing spices?
  • In the first example the standard[s]-serve was the source of the value, the field is being created in the current tiddler.

@TW_Tones
No. It doesn’t contain spices.
e.g.

boil:Boil in water for 10 minutes

<$list filter="[[tids]indexes[]]" variable=fieldname>
  <$checkbox field=<<fieldname>>  checked=<<fieldname>> unchecked="" default=""> <$text text={{{ [[tids]getindex<fieldname>] }}}/></$checkbox><br>
</$list>

This works but only fills the field with first word.

boil:boil
Should read

boil:Boil in water for 10 minutes

tids.json (189 Bytes)

Actually, the “checked” field value is not the first word of the index value… it’s the index name itself!

Try this:

<$list filter="[[tids]indexes[]]" variable=fieldname>
   <$checkbox field=<<fieldname>> checked={{{ [[tids]getindex<fieldname>] }}} unchecked="" default=""> 
      <$text text={{{ [[tids]getindex<fieldname>] }}}/>
   </$checkbox><br>
</$list>

Thanks very much Eric. This works as expected, filling the field of the current tiddler with the data tiddler field content.

<$list filter="[[tids]indexes[]]" variable=fieldname>
   <$checkbox field=<<fieldname>> checked={{{ [[tids]getindex<fieldname>] }}} unchecked="" default=""> 
      <$text text={{{ [[tids]getindex<fieldname>] }}}/>
   </$checkbox><br>
</$list>

Sorry for the delay in responding to your post, as I have not been at my computer today and I have been without internet access.

My Thanks to @EricShulman and @TW_Tones for their help and time working on this post. Yet again providing an answer to what to many of us newbies seems complicated and confusing, but also showing the great tools that TiddlyWiki offers.

Best Regards
Scot