[tw5] Create tiddler from Select widget

Hi,

Is is possible to incorporate a create new tiddler action with a select widget

so if i have something like this ,

Status <$select
field=“status”…>

Pending/Blocked With Vendor In House

how can i make one of the choices trigger this

</$select>
<$action-createtiddler $basetitle=“test” >
</$action-createtiddler>

I found an example on the tiddlywiki website, but a bit more advanced to be used for assigning different tags to a particular tiddler depending on the choice you make in the drop down

but what i need is much simpler , and not sure if its the same thing ,so is it even possible?

I’m guessing that you want something like:

\define myactions()
<$list filter="[{!!status}match[vendor]]">
<$action-createtiddler $basetitle="test" />
</$list>
\end

Status <$select field="status" actions=<<myactions>> >
<option>Pending/Blocked</option>
<option value="vendor">With Vendor</option>
<option>In House</option>
</$select>

Note that the macro (i.e. \define … \end) needs to be at the top of your tiddler.

The macro is triggered inside the select widget in the “actions” attribute.
I’m assuming that you only wanted ONE of the selections to trigger an action. So the list widget in the macro checks to see if you’ve selected “vendor” as the status.

HTH

try this

\define test-action()
<$action-createtiddler $basetitle="test" text={{asdf}}/>
\end

Status <$select tiddler=asdf actions=<<test-action>>>
<option>Pending/Blocked</option>
<option>With Vendor</option>
<option>In House</option>
</$select>

-m

Thanks Mark /Mario

Works perfectly !

1 Like