After a bit of tinkering, I got the following code to behave how I want it.
<$edit-text tiddler="$:/temp/NewTaskButtonTemplate/input" tag="input"
type="text" placeholder="New Task"/>
<$button>
<$x-maketid $title={{$:/temp/NewTaskButtonTemplate/input}} $tags="[[task]]
[{!!title}]" $navigate="hide" />
<$action-setfield $tiddler="$:/temp/NewTaskButtonTemplate/input"
$field="text" $value="" />
Click Me
</$button>
It solves both issues, titles with spaces and clearing the text box after
the button is clicked.
Thanks for the help guys!
On Saturday, October 31, 2015 at 11:48:19 PM UTC-6, Matabele wrote:
>
> Hi
>
> Have you tried to use an $action-sendmessage widget with 'tm-new-tiddler'?
>
> Else, if you are looking to create a tiddler in the background, try the
> $x-maketid widget from here <http://gwiz-beta.tiddlyspot.com/>.
>
> regards
>
> On Sunday, 1 November 2015 07:27:01 UTC+2, Devin Baillie wrote:
>>
>> I'm not sure where exactly to put this. This is what I tried, but it
>> doesn't seem to do anything:
>>
>> <$edit-text tiddler="$:/temp/NewTaskButtonTemplate/input" tag="input"
>> type="text" placeholder="New Task"/>
>>
>> <$set name="tag1" value="task">
>> <$set name="tag2" value={{!!title}}>
>> <$newtiddler title={{$:/temp/NewTaskButtonTemplate/input}}
>> skeleton="task_skeleton" edit="no" >
>> <$action-setfield tiddler="$:/temp/NewTaskButtonTemplate/input"
>> field="text" value="" />
>> Create New Task
>> </$newtiddler>
>> </$set>
>> </$set>
>>
>>
>> I'm not using a $button widget, I'm using the $newtiddler widget from
>> here <http://tiddlystuff.tiddlyspot.com/>. I'm guessing that's why it's
>> not working, but have no idea how to fix it.
>>
>> On Saturday, October 31, 2015 at 2:05:10 PM UTC-6, Eric Shulman wrote:
>>>
>>> On Saturday, October 31, 2015 at 10:36:13 AM UTC-7, Devin Baillie wrote:
>>>>
>>>> Also, how would I go about clearing the text box after the button is
>>>> clicked?
>>>> Thanks in advance!
>>>>
>>>
>>> Inside your $button widget, add an $action-setfield widget, like this:
>>>
>>> <$action-setfield tiddler="$:/temp/NewTaskButtonTemplate/input"
>>> field="text" value="" />
>>>
>>> enjoy,
>>> -e
>>>
>>>
>>
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/92f83880-3674-4f30-be16-6d822e06769b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.