I can't really properly test this, but maybe this does the trick?

<$vars dataTiddler={{{ [<currentTiddler>addsuffix[ Data]] }}}>

<fieldset>
    <legend>Whatever description needs to be put here:</legend>

<table>
<tr><td>Label:</td>
<td> <$edit-text tiddler={{{ [<dataTiddler>] }}} field="my_label"/> 
</td></tr>
<tr><td>Tag:</td>
<td> <$edit-text tiddler={{{ [<dataTiddler>] }}} field="my_tag"/> </td></tr>
<tr><td>Target:</td>
<td> <$edit-text tiddler={{{ [<dataTiddler>] }}} field="my_target"/> 
</td></tr>
<tr><td>Targetting:</td>
<td> <$edit-text tiddler={{{ [<dataTiddler>] }}} field="my_targetting"/> 
</td></tr>
</table>

<$vars myLabel={{{ [<dataTiddler>get[my_label]] }}}
              myTag={{{ [<dataTiddler>get[my_tag]] }}}
              myTarget={{{ [<dataTiddler>get[my_target]] }}}
              myTargetting={{{ [<dataTiddler>get[my_targetting]] }}}>
<$button> Create <<myLabel>>
   <$wikify name="out" text="""<$list filter="[tag<myTag>]"><$text 
text={{!!text}}/></$list>""">
      <$action-setfield $tiddler=<<myTarget>> text=<<out>> 
tags=<<myTargetting>> />
   </$wikify>
</$button>
</$vars>

  </fieldset>

</$vars>

On Tuesday, June 8, 2021 at 10:42:53 PM UTC-3 iamdar...@gmail.com wrote:

> Hello,
>
> I hope I didn't miss a clear answer for this but is there anyway to prompt 
> the user for a variable, with an input field, after a button press?
>
> I found the below code to combine multiple tiddlers into one based on a 
> shared tag, and then modified it to add a tag.
>
> \define join(label,tag,target,targettag)
> <$button> $label$
>    <$wikify name="out" text="""<$list filter="[tag[$tag$]]"><$text 
> text={{!!text}}/></$list>""">
>       <$action-setfield $tiddler="$target$" text=<<out>> 
> tags=<<targettag>> />
>    </$wikify>
> </$button>
> \end
>
> <<join "Create Chapter" "Book 1 Chapter 1" "Book 1 Chapter 1" "Book 1" >>
>
> As of now the variables for the button are set by the <<join line above 
> which has to be manually set.
>
> My question/hope is if there is a way to prompt the user to input the 
> variables, one at a time, via an input box/field/prompt, that would allow 
> them to set the variables each time the button is pressed.
>
> Thank you!
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/95e94e2c-4ab4-46e2-8469-e5ab5518aecan%40googlegroups.com.

Reply via email to