Viewing 1 reply thread
  • Author
    Posts
    • #5074
      ndbe
      Member

      when i use this code:

      piklist('field',array(
          'type' => 'group',
          'template' => 'field',
          'fields' => array(
              array(
                  'type' => 'text',
                  'field' => 'slider_text',
                  'label' => __('Title','ik'),
              ),
              array(
                  'type' => 'file',
                  'field' => 'slider_image',
                  'label' => __('Add photo','ik')
              ),
          ),
          'label' => __('Slider','ik'),
          'add_more' => true
      ));

      All the images from upload field are in one custom field. I have no way of knowing which photo belongs to which title:

      ["slider_text"]=>
        array(2) {
          [0]=>
          string(7) "Slide 1"
          [1]=>
          string(7) "Slide 2"
        }
        ["slider_image"]=>
        array(5) {
          [0]=>
          string(3) "110"
          [1]=>
          string(2) "98"
          [2]=>
          string(2) "86"
          [3]=>
          string(2) "96"
          [4]=>
          string(2) "99"
        }

      I know i can serialize the group but it doesn’t work properly in my case.

    • #5112
      Steve
      Keymaster

      This is a known issue with this particular situation and we’ll work on resolving. Unfortunately, you’ll have to serialize or limit the file uploads to one file to make this work right now.

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