
Rusty
User
Apr 6, 2011, 4:36 AM
Post #2 of 9
(2076 views)
Shortcut
|
|
Re: [gkornbluth] Show/Hide Dependant Fields Implementation
[In reply to]
|
Can't Post
|
|
Yeah, I hear you there.
// For each section and list field, copy this block // Fields will start hidden if they appear in any "fields to show" list $GLOBALS['SHOWHIDE_DEPENDANT_FIELDS_CONFIG']['the_section_editor']['list_field_name'] = array( // list option => fields to show '' => array(), // show these fields when the topmost '<select>' option is selected 'List 1 - Opt 1' => array(), 'List 1 - Opt 2' => array(), 'List 1 - Opt 3' => array(),' => array('List 1', 'List 2'), '_any_value_' => array('List 1'), // show these fields when a value not listed above is selected ); Isn't altogether too intuitive. I understand the "my_section" and the "my_list_filed" however the array options is a bit confusing. I want to make it so that if an option from a list is selected, that another, second list will be shown. But only if that option is selected, otherwise, it'd hide the second list. Like this: List 1 - Opt 1 (either 1 or 2 selected) List 1 - Opt 2 (either 1 or 2 selected) List 1 - Opt 3 =========== then IF.... List 1 - Opt 1 List 1 - Opt 2 List 1 - Opt 3 (3 selected) With List 1 - Opt 3 selected then List 2 shows List 2 - Opt 1 List 2 - Opt 2 List 2 - Opt 3 Rusty
(This post was edited by Rusty on Apr 6, 2011, 5:00 AM)
|