[tw5] Re: Is there an option to have an input tag (e.g. text input), with a button "save" next to it which then saves to a tiddler field?

2019-08-03 Thread TonyM
Melvin,

I know you have walked down a different path but I suggest making a tiddler 
tagged $:/tags/ViewTemplate that transcludes a template tiddler (containing 
the edit text) on the tiddler where you require the edit to take place.

This allows you appear to be editing the current tiddler without the focus 
problem, but you are actually editing it from the template tiddler.

Regards
Tony

On Friday, August 2, 2019 at 10:13:17 PM UTC+10, Melvin wrote:
>
> I am trying to find a suitable workaround for edit-text. I'm using 
> TiddlyWiki as my journal.
>
> I have a template Tiddly for questions with radio buttons and all that. I 
> clone it for the day, change the date and that is my new Tiddler.
>
> However, the amount of stuff I need to edit within my tiddler just to 
> answer some questions is becoming a lot. I'd like to do it via input fields.
>
> For example, I have questions such as: what goal do you have for today (up 
> to a max of 3 goals).
>
> Now I'd need to edit the Tiddler for it.
>
> But I'd like to simply see an input tag with a button save next to it and 
> when I type in my goal and click "save!" it replaces the text that was 
> within the field.
>
> In that sense it looks a lot like the appender of the following TiddlyWiki 
> at http://skeeve.tiddlyspot.com/
>
> Another example (but then with a dropdown menu instead of free input text) 
> is 
> http://inmysocks.tiddlyspot.com/#Concatenating%20Strings%20-%20What%20Breaks
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b9499ae6-1d46-488a-9859-6485be668605%40googlegroups.com.


[tw5] Re: Is there an option to have an input tag (e.g. text input), with a button "save" next to it which then saves to a tiddler field?

2019-08-03 Thread Mat
Melvin wrote:
>
> Thanks! I'll try it out. On thinking about it though (if I understand it 
> correctly), that also means that this will be displayed in all my other 
> edittext tags, even in other journal entries. That means this might make it 
> more error prone if I accidentally select another eddittext tag from 
> another journal entry, since I'll be overwriting the data.
>

It almost sounds as if you're modifying the actual edittext widget 
itself??? 

Exactly where do you put your code? What is the name of the tiddler and how 
is this tiddler tag(-pilled) ?
 

I'm not that deep into 'TiddlyWiki programming' yet.
>
> In fact, I just modified my TW to turn the 

[tw5] Re: Is there an option to have an input tag (e.g. text input), with a button "save" next to it which then saves to a tiddler field?

2019-08-03 Thread Melvin
Thanks! I'll try it out.

I'm not that deep into 'TiddlyWiki programming' yet.

In fact, I just modified my TW to turn the 

[tw5] Re: Is there an option to have an input tag (e.g. text input), with a button "save" next to it which then saves to a tiddler field?

2019-08-03 Thread Mat
Thanks for sharing Melvin.

Just a note; your use of the html term "input tag" risks causing confusion 
here because in TW "tag" is the visual tag pills seen in tiddlers. Just 
sayin'.

A thought: Do you necessarily want to apply the text using a button or 
wouldn't it be more convenient if the text was simply applied as you type 
it? You can do this by this construct;

<$vars curr=<>>
<$tiddler tiddler=dummy>
<$edittext tiddler=<> field="thefieldyouwant" />




<:-)

>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c90e049b-12dc-464a-a9a1-f679dddc8251%40googlegroups.com.


[tw5] Re: Is there an option to have an input tag (e.g. text input), with a button "save" next to it which then saves to a tiddler field?

2019-08-03 Thread Melvin
My final working code is:

goal 1: <$view field=g1_value/> <$edit-text 
tiddler="StoreDailyQuestionnaireData" field="g1_value"/> 
<$button>
<$action-setfield $field=g1_value 
$value={{StoreDailyQuestionnaireData!!g1_value}} />
<$action-setfield $tiddler="StoreDailyQuestionnaireData" $field="g1_value" 
$value="" />
change goal 1
 



On Friday, August 2, 2019 at 2:45:56 PM UTC+2, Melvin wrote:
>
> I got it by doing
>
> <$edit-text tiddler="StoreDailyQuestionnaireData" field="mytestfield"/>
> <$button><$action-setfield $field=demonstration1 
> $value={{StoreDailyQuestionnaireData!!mytestfield}} />Set the field 
> 1
> <$button><$action-setfield $field=demonstration2 
> $value={{StoreDailyQuestionnaireData!!mytestfield}} />Set the field 
> 2
>
> ---
> <$view field=demonstration1/>
> 
> <$view field=demonstration2/>
>
> On Friday, August 2, 2019 at 2:13:17 PM UTC+2, Melvin wrote:
>>
>> I am trying to find a suitable workaround for edit-text. I'm using 
>> TiddlyWiki as my journal.
>>
>> I have a template Tiddly for questions with radio buttons and all that. I 
>> clone it for the day, change the date and that is my new Tiddler.
>>
>> However, the amount of stuff I need to edit within my tiddler just to 
>> answer some questions is becoming a lot. I'd like to do it via input fields.
>>
>> For example, I have questions such as: what goal do you have for today 
>> (up to a max of 3 goals).
>>
>> Now I'd need to edit the Tiddler for it.
>>
>> But I'd like to simply see an input tag with a button save next to it and 
>> when I type in my goal and click "save!" it replaces the text that was 
>> within the field.
>>
>> In that sense it looks a lot like the appender of the following 
>> TiddlyWiki at http://skeeve.tiddlyspot.com/
>>
>> Another example (but then with a dropdown menu instead of free input 
>> text) is 
>> http://inmysocks.tiddlyspot.com/#Concatenating%20Strings%20-%20What%20Breaks
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a92b950f-6d44-49c7-a940-1c4d6d2e048e%40googlegroups.com.


[tw5] Re: Is there an option to have an input tag (e.g. text input), with a button "save" next to it which then saves to a tiddler field?

2019-08-02 Thread Melvin
I got it by doing

<$edit-text tiddler="StoreDailyQuestionnaireData" field="mytestfield"/>
<$button><$action-setfield $field=demonstration1 
$value={{StoreDailyQuestionnaireData!!mytestfield}} />Set the field 
1
<$button><$action-setfield $field=demonstration2 
$value={{StoreDailyQuestionnaireData!!mytestfield}} />Set the field 
2

---
<$view field=demonstration1/>

<$view field=demonstration2/>

On Friday, August 2, 2019 at 2:13:17 PM UTC+2, Melvin wrote:
>
> I am trying to find a suitable workaround for edit-text. I'm using 
> TiddlyWiki as my journal.
>
> I have a template Tiddly for questions with radio buttons and all that. I 
> clone it for the day, change the date and that is my new Tiddler.
>
> However, the amount of stuff I need to edit within my tiddler just to 
> answer some questions is becoming a lot. I'd like to do it via input fields.
>
> For example, I have questions such as: what goal do you have for today (up 
> to a max of 3 goals).
>
> Now I'd need to edit the Tiddler for it.
>
> But I'd like to simply see an input tag with a button save next to it and 
> when I type in my goal and click "save!" it replaces the text that was 
> within the field.
>
> In that sense it looks a lot like the appender of the following TiddlyWiki 
> at http://skeeve.tiddlyspot.com/
>
> Another example (but then with a dropdown menu instead of free input text) 
> is 
> http://inmysocks.tiddlyspot.com/#Concatenating%20Strings%20-%20What%20Breaks
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5a62a6d0-eca9-44c4-ade3-f624910b316d%40googlegroups.com.