Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   dynamic preset text, posted by Zbigniew Reszela on Wed Aug 29 10:26:31 2012 
    icon2.gif   Re: dynamic preset text, posted by Stefan Ritt on Wed Aug 29 10:37:44 2012 
       icon14.gif   Re: dynamic preset text, posted by Zbigniew Reszela on Wed Aug 29 17:55:37 2012 
Message ID: 67325     Entry time: Wed Aug 29 17:55:37 2012     In reply to: 67322
Icon: Agree  Author: Zbigniew Reszela  Author Email: reszelaz@gmail.com 
Category: Question  OS: Linux  ELOG Version: V2.8.1-235 
Subject: Re: dynamic preset text 

Stefan Ritt wrote:

Zbigniew Reszela wrote:

Dear all,

Is it possible to have a dynamic "preset text" option?

I would like to switch the template file depending on the attribute value. (Of course this attribute values will be a fixed list of options, not extandable). 

I see there one difficulty, that: if user already started editing the text body, he could lose this data. But I think that this could be left on user responsibility to take care about it.

Another option could be to always insert the template text on the very beginning of the text body.

Is this feature implemented, or maybe someone have done it by changing the server code?

Cheers

This is possible with conditional attributes. An additional trick would be to not show the text body of an attribute is not selected. This way the user first has to select the attribute, then the text field with the specific preset will show up. The configuration would be something along these lines:

 

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

 

Of course you have to supply proper text files text1, text2, text3.

- Stefan

 

 Thanks, it works perfectly!

ELOG V3.1.5-fe60aaf