Viewing 1 reply thread
  • Author
    Posts
    • #3672
      svengraziani
      Member

      Hi there, i’m struggling with some issue. When i remove add_more fields from my Add_More composite and i hit Update things dont get stored and the add_more field returns to it´s initial state.

      piklist('field', array(
         'label' => 'Luminaire Variations',
          'type' => 'group',
          'field' => 'lcomp',
          'add_more' => true,
          'fields' => array(
              array(
                  'type' => 'text',
                  'label' => 'Caption',
                  'field' => 'lcomp_caption',
                  'columns' => 2,            
              ),
              array(
                  'type' => 'select',
                  'field' => 'lcomp_color',
                  'columns' => 10,
                  'label' => 'CCT',
                  'choices' =>  $cct_select
              ),
              array(
                  'type' => 'group',
                  'field' => 'lcomp_conf',
                  'columns' => 12,            
                  'add_more' => true,
                  'fields' => array(
                      array(
                          'label' => 'Amount',
                          'columns' => 2,
                          'type' => 'text',
                          'field' => 'lcomp_amount',                    
                      ),
                      array(
                          'label' => 'Module',
                          'columns' => 10,
                          'type' => 'select',
                          'field' => 'lcomp_module',
                          'choices' => $modules_select
                      )
                  )
              )
              
          )
      ));
    • #3673
      Steve
      Keymaster

      @svengraziani– Welcome to the Piklist community!

      I tested your code with a simple choices array, since I didn’t have $cct_select and $modules_select, and it worked fine for me. I’m guessing the arrays you are passing through for the choices is not setup correctly. Feel free to post that code and we’ll get it working for you.

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