Yes, see below. This will work as long as your State tiddler only holds 
data (that can then be re-entered using the Form tiddler).

Good work exploring TW UI! :)

```
\define newEntry()
<$action-createtiddler $basetitle="entry" $template="$:/state/basic-form"/>
<$action-deletetiddler $tiddler="$:/state/basic-form"/>
\end

<$button actions=<<newEntry>> >
Create Tiddler
</$button>
```

If you want to clear selective fields, while leaving others intact, use the 
$action-deletefield (which is identical to using the $action-setfield 
widget with NO value).

References:
https://tiddlywiki.com/#ActionDeleteTiddlerWidget
https://tiddlywiki.com/#ActionDeleteFieldWidget

Best,
Joshua Fontany
On Monday, April 12, 2021 at 7:28:48 AM UTC-7 Reaktorblue wrote:

> I'm trying to learn how to use TW5 as a way to document some things via a 
> data entry form
>
> I have these two tiddlers created
>
>    - Basic Form
>    - $:/state/basic-form
>    
> In the Basic Form tiddler, I'm using a button to create a new tiddler 
> based on the data in the form
>
> \define newEntry()
> <$action-createtiddler $basetitle="entry" $template="$:/state/basic-form"/>
> \end
>
> <$button actions=<<newEntry>> >
> Create Tiddler
> </$button>
>
> Is there a way to also clear the form once I have clicked the button?
>
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/69176289-07a5-4fce-9514-1b06afb23fbbn%40googlegroups.com.

Reply via email to