[TW5] Force Focus to a Text Field

51 views
Skip to first unread message

Taylor Jensen

unread,
Nov 3, 2016, 6:35:28 AM11/3/16
to tiddl...@googlegroups.com
I have a Tiddler that's a form, when I hit the button it creates a new Tiddler based on the fields and clears the text fields. Is there a way that I can force focus back to the first text field? That way I can enter text, [tab], enter text, [tab], [enter] (submitting the form) and then already have the text cursor back in the first text field?

Here's my code:

<$edit-text tiddler="$:/tcj/Note Taker Helper" field="notecue" size="3" placeholder="Cue #" focus="true"/>

<$edit-text
 tiddler="$:/tcj/Note Taker Helper" field="text" placeholder="Note text"
 tag="textarea"/> <$set name=notetext value={{$:/tcj/Note Taker
Helper}}>
<$set name="notetextconcat" value="<
<noteheader>>$(notetext)$"> <$button tooltip="Create a new note" aria-label="Create a new note">
<$action-maketid
 $title=<
<now "0MM-0DD hh:0mm:0ss (YYYY)">>  tags="[[note]]"
 $tags="[{Active Production!!text}] [{Punch List!!notetype}]"
text=<
<notetextconcat>> $navigate="hide" cue={{$:/tcj/Note
Taker Helper!!notecue}}/>
{{$:/tcj/images/new-note}}
submit note
<$action-deletefield notecue $tiddler="$:/tcj/Note Taker Helper"/>
<$action-deletefield text $tiddler="$:/tcj/Note Taker Helper"/>
</$button>

</$set>
</$set>



 

Reply all
Reply to author
Forward
0 new messages