Viewing 1 reply thread
  • Author
    Posts
    • #5189
      sancreative
      Member

      Hi,

      I’m trying to use conditons ‘type’ => ‘update’ in a add more group
      it seems to update the first addmore
      but when i add a second addmore:
      1. it doesn’t update the field
      2. and it doesn’t save the second instance.

      do you have a code example of a conditions: update in a group using addmore that i could possibly have a look at?

    • #5190
      sancreative
      Member

      The code im using is below,
      I’ve stripped out the condition: update so i can get the addmore working first

      piklist('field', array(
          'type' => 'group'
          ,'field' => 'workout_schedule'
          ,'label' => __('Tasks') 
          ,'columns' => 12
          ,'add_more' => true
          ,'fields' => array(
            array(
              'type' => 'select'
              ,'field' => 'day'
              ,'columns' => 12
              ,'choices' => array(
                'monday' => 'Monday'
                ,'tuesday' => 'Tuesday'
                ,'wednesday' => 'Wednesday'
                ,'thursday' => 'Thursday'
                ,'friday' => 'Friday'
                ,'saturday' => 'Saturday'
                ,'sunday' => 'Sunday'
              )
            ),
            array(
                'type' => 'text'
                ,'field' => 'workout_schedule:my_field'
                ,'label' => 'Show/Hide Field'
                ,'description' => 'This field is updated by the Select field above'
              ),
          )
        ));

      the saving issue starts when I add workout_schedule: to the text

Viewing 1 reply thread
  • You must be logged in to reply to this topic.