Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   dynamic "preset text" option without remplace text if it has changed, posted by Dani on Tue Oct 27 15:41:57 2015 
    icon2.gif   Re: dynamic "preset text" option without remplace text if it has changed, posted by Andreas Luedeke on Wed Oct 28 08:51:17 2015 
       icon2.gif   Re: dynamic "preset text" option without remplace text if it has changed, posted by Dani on Wed Oct 28 09:15:52 2015 
Message ID: 68169     Entry time: Wed Oct 28 09:15:52 2015     In reply to: 68168
Icon: Reply  Author: Dani  Author Email: droldan@cells.es 
Category: Question  OS: Linux  ELOG Version: 3.1.1 
Subject: Re: dynamic "preset text" option without remplace text if it has changed 

thanks Andres for your response!

I was thinking that it cannot be possible, but , I had to try to ask in the forum.

for my question, I think that this could be left on user responsibility to take care about it, and add a comment the the text fied, explaining that will be erased the html text on change the text field.

Thanks four your time.

 

Andreas Luedeke wrote:

I don't think that this is possible.

And it is not clear to me, how you would like it to work: I often use HTML tables in preset text, where the user should fill out columns (e.g. for checklists). I wouldn't want the tables just to append when switching to another checklist. You could rather add a comment to the Type field, explaining that the text field will be overwritten when you change the type.

The Firefox addon Lazarus does store whatever you've typed in an HTML form: at least you could then recover what you've typed.

Cheers, Andreas

Dani wrote:

Dear all,

Is it possible to have a dynamic "preset text" option without remplace text if it has changed?

I would like to switch the template file depending on the attribute value (Type). 

If user already started editing the text body, on change (Type) he could lose this data. 

I'm using this example code :
Attributes = Type, Subject
Options Type = One{1}, Two{2}, Three{3}
Show text = 0

{1} Preset text = text1
{2} Preset text = text2
{3} Preset text = text3
{1,2,3} Show text = 1


I the attribute type change the user lost the data, because the text has been replaced.

Any idea about how to solve it?

Thanks!
Cheers

 

 

ELOG V3.1.5-3fb85fa6