Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Show dropdown menus as a function of selecting an option in another dropdown menu, posted by Diogo Alves on Thu Nov 5 10:17:19 2009 
    icon2.gif   Re: Show dropdown menus as a function of selecting an option in another dropdown menu, posted by Stefan Ritt on Fri Nov 13 17:03:03 2009 
       icon2.gif   Re: Re: Show dropdown menus as a function of selecting an option in another dropdown menu, posted by Diogo Alves on Tue Nov 17 16:44:43 2009 
Message ID: 66619     Entry time: Tue Nov 17 16:44:43 2009     In reply to: 66611
Icon: Reply  Author: Diogo Alves  Author Email: diogomiguelalves@gmail.com 
Category: Question  OS: Linux | Mac OSX  ELOG Version: 2.7.7 
Subject: Re: Re: Show dropdown menus as a function of selecting an option in another dropdown menu 

Stefan Ritt wrote:

Diogo Alves wrote:
Hello,
I'm having some difficulties in having a tasks manager up and running.
The total attributes list is:
 
- Attributes = List, Project, SubProject, SubSubProject, Title, Priority, Context, Status, Due Date, Start Date, Alarm, Repeat
 
I would like to have the interface display the following attribute when I click "New":
 
- List (Options = Personal, Work)
 
After choosing a List "Personal" I would like to have the following attributes available for edit:
 
- List (Options = Personal, Work)
- Project (Options = Dummy1)
- Title
- Priority (Options = ...)
- Context (Options = ...)
- Status (Options = ...)
- Due Date (datetime)
- Start Date (datetime)
- Alarm (datetime)
- Repeat (Options = ...)
 
After choosing the Project "Dummy1" I would like to have the following attributes available for edit:
 
- List (Options = Personal, Work)
- Project (Options = Dummy1)
- SubProject (Options = Dummy2)
- Title
- Priority (Options = ...)
- Context (Options = ...)
- Status (Options = ...)
- Due Date (datetime)
- Start Date (datetime)
- Alarm (datetime)
- Repeat (Options = ...)
 
where Dummy2 is an option of the SubProject attribute only because Dummy1 was the chosen option of attribute Project.
 
What happens is that when I choose Dummy1 from the Project attribute, the SubProject attribute is not displayed in order to be editable.
 
Is there a way around this?
 
Thank you.
Kind Regards,
Diogo
 
Here's the configuration file relative to the "Tasks" logbook:
================================================
Password file = passwords.pwd
Self register = 0
Admin user = someuser
Login user = someuser
Allow password change = 1
Theme = default
Comment = Task Manager

Attributes = List, Project, SubProject, Title, Priority, Context, Status, Due Date, Start Date, Alarm, Repeat
List display = ID, Date, Author, List, Title, Priority
Show Attributes Edit = List

Options List = Personal{1}, Work{2}
Options Priority = High, Medium, Low, None
Options Context = @ Home, @ Work - IST
Options Status = Not Started, Start Delayed, Started, Started - On Hold, 1/4 Done, 1/4 Done - On Hold, 1/2 Done, 1/2 Done - On Hold, 3/4 Done, 3/4 Done - On Hold, Done
Options Repeat = Hourly, Daily, Weekdays, Weekend days, Weekly, Monthly, Yearly

{1} Show Attributes Edit = List, Project, Title, Priority, Context, Status, Due Date, Start Date, Alarm, Repeat
{1} Options Project = Dummy1{11}
{11} Show Attributes Edit = List, Project, SubProject, Title, Priority, Context, Status, Due Date, Start Date, Alarm, Repeat
{11} Options SubProject = DummyChild1

Extendable options = List, Project, SubProject, SubSubProject
Type Due Date = datetime
Type Start Date = datetime
Type Alarm = datetime
Required Attributes = List, Title
Reverse sort = 1
Default encoding = 0 ; ELcode
Thumbnail size = 500
 

There is one "feature" which causes this not to work. If an option is present several times (in your case "Show Attributes Edit"), the first one is taken which fulfills the current condition(s). So what happens is you select List=Personal, which triggers condition "1". Then you select "Dummy1", which triggers condition "11". Now elog goes top down, finds that List=Personal, so sets condition "1", then continues, finds {1} Show Attributes Edit = ... and takes this one. What I propose is to do the following:

 

Options List = Personal{1}, Work{2}
...
{3} Show Attributes Edit = List, Project, SubProject, Title, Priority, Context, Status, Due Date, Start Date, Alarm, Repeat
{3} Options SubProject = DummyChild1
{1} Show Attributes Edit = List, Project, Title, Priority, Context, Status, Due Date, Start Date, Alarm, Repeat
{1} Options Project = Dummy1{3}

Note that {3} Show Attributed Edit come before {1} Show Attributes Edit, so as soon as you select "Dummy1", the first "Show Attributes Edit" gets 
activated which contains "SubProject".

 

 

 Thank you ... good to know about these elog features. Works fine now!!!

ELOG V3.1.5-3fb85fa6