New tiddler button to create field

Hi,

I have the following button to create a new tiddler titled with date and a tag (this might not be the most elegant, I don’t know)

\define newtags() [[log]]
<$wikify name="Title" text="""<<now "0DD/0MM/YY">>""">

<$button class="tc-btn-invisible">{{$:/core/images/new-button}}
<$action-sendmessage $message="tm-new-tiddler" title=<<Title>> 
tags=<<newtags>>
text=<<newtext>> />
</$button>

What do I need to add for the tiddler to also contain empty fields e.g. Field1, Field2 etc?

Thanks
Jon

<$button class="tc-btn-invisible">{{$:/core/images/new-button}}
<$action-sendmessage $message="tm-new-tiddler" title=<<now "0DD/0MM/YY">> 
   tags="log" text=<<newtext>> Field1="" Field2=""/>
</$button>

Notes:

  • Because <<now>> is a javascript macro, it returns the formatted date as desired. There’s no need to use $wikify.
  • Tag values only need doubled-square brackets if they contain spaces. Thus, you can omit the newtags() macro, and just use tags="log" directly. If the tag value did contain spaces (e.g., “my log”), you could include the square brackets within the parameter value, like this: tags="[[my log]]"

enjoy,
-e

Brilliant!

Thanks Eric and for the explanation.

Regards
Jon