- This topic has 5 replies, 2 voices, and was last updated 9 years ago by
Steve.
-
AuthorPosts
-
-
January 21, 2013 at 5:03 pm #639
persMemberThis on will not save, that is, when I choose left with document title and right with page number
piklist( 'field', array(
'type' => 'checkbox'
, 'field' => 'checkbox_nested'
, 'label' => 'Header'
, 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
, 'value' => array(
'left'
, 'right'
)
, 'choices' => array(
'left' => 'Left: [field=checkbox_nested_select]'
, 'center' => 'Center: [field=checkbox_nested_select]'
, 'right' => 'Right: [field=checkbox_nested_select]'
)
, 'fields' => array(
array(
'type' => 'select'
, 'field' => 'checkbox_nested_select'
, 'value' => 'option4' // Sets default to Option 4
, 'attributes' => array(
'class' => 'text'
)
, 'choices' => array(
'option1' => 'Document Title'
, 'option2' => 'Site URL'
, 'option3' => 'Site Title'
, 'option4' => 'Page number'
)
) )
) );
-
January 22, 2013 at 12:31 pm #640
-
January 22, 2013 at 1:11 pm #641
persMemberOf course! .. and it works like a charm. thank you 🙂
-
January 22, 2013 at 2:54 pm #642
SteveKeymaster@pers– Just a little trick. If you want to keep all your lists absolutely the same, you can define the array first:
$choices = array(
'option1' => 'Document Title'
, 'option2' => 'Site URL'
, 'option3' => 'Site Title'
, 'option4' => 'Page number'
);
And then include $choices in the field array:
'choices' => $choices
Makes it easier to manage all three lists.
-
January 22, 2013 at 4:00 pm #643
persMemberImplemented, thanks 🙂
Is it possible to have nested condtionals ? What I’d really like to have is “Custom text” in the select box, and if you choose that, you get a text field.
-
January 23, 2013 at 9:56 am #644
-
-
AuthorPosts
- You must be logged in to reply to this topic.