I tried to create new tiddlers based on a template tiddler using a tiddler creation form as shown here
I tried this code.
!!Step 1 - ''Give the tiddler a name''
---
<$edit-text class='tc-edit-texteditor' tiddler='$:/state/NewTiddlerForm' field='name_temp' placeholder='Tiddler Name'/><br>
!!Step 2 - ''Fill in tiddler text''
---
<$edit-text class='tc-edit-texteditor' tiddler='templatetiddler' field='text' placeholder='Tiddler Text'/><br>
!!Step 3 - Add fields
---
Description : <$edit-text class='tc-edit-texteditor' tiddler='' field='{{templatetiddler!!description}}' placeholder='Tiddler Description'/><br>
or
Category : <$edit-text class='tc-edit-texteditor' tiddler='templatetiddler' field='category' placeholder='Tiddler category'/><br>
!!Step 4 - ''Create the tiddler''
---
Press this button and the tiddler will be created and opened so you can view it.
<$button>Create Tiddler
<$action-setfield $tiddler={{$:/state/NewTiddlerForm!!name_temp}} text={{$:/state/NewTiddlerForm!!text}} description={{$:/state/NewTiddlerForm!!description}} tags={{$:/state/NewTiddlerForm!!tags}}/>
<$action-navigate $to={{$:/state/NewTiddlerForm!!name_temp}}/>
<$action-setfield $tiddler='$:/state/NewTiddlerForm' name_temp='' text='' description='' tags=''/>
</$button>
<$button>Clear Form
<$action-setfield $tiddler='$:/state/NewTiddlerForm' name_temp='' text='' description='' tags=''/>
</$button>
I want the new tiddlers to have fields as in the template tiddler. For this I tried two approaches given below.
Description : <$edit-text class='tc-edit-texteditor' tiddler='' field='{{templatetiddler!!description}}' placeholder='Tiddler Description'/><br>
or
Category : <$edit-text class='tc-edit-texteditor' tiddler='templatetiddler' field='category' placeholder='Tiddler category'/><br>
Template tiddler has many fields. So will I have to repeat the code given above for each of the fields. Or is it possible to auto populate the fields of the template tiddler without having to write code for each field separately