Viewing 4 reply threads
  • Author
    Posts
    • #3285
      stevo81989
      Member

      So we currently have a main group that contains something similar to the following:

      Date
      Title
      Description
      Video Location
      [add more]

      There are more fields but hopefully you get the idea. So each post may have 7 or so videos each with a title or description. This works great, however we now want to add what I would describe as “sub videos” within each video. So to lay it out:

      Date
      Title
      Description
      Video Location
      Additional Features [
          File Name
          location
          image
          [add more]
      ]
      [add more]

      So essentially each post can have multiple videos and each video can have multiple additional features. I was able to get this to work with just 2 fields, the file name and location. however when I add the image field it gets all out of wack.

      When I add 1 photo it seems to work just fine, but when I add multiple, the image field separates its self from the additional features field. This should all be in the attachment. Is this standard procedure? Its not completely awful but the problem is that when I look at the array I have 1->id 2->unknown 3->id and so forth. I can skip the unknowns but Im worried it will always be out of order and reordering/dragging and dropping in piklist simply doesnt work (it not only doesnt work for this but it doesnt work at all in general). Is there are a better way I should be doing this? I could simply add a third text field for someone to simply provide the ID or filename, however that would likely add more cofusion and work than necessary. Here is the code I am working with:

                     array(
                      'type' => 'group',
                      'field' => 'additional_features',
                      'add_more' => true,
                      'label' => 'Additional Features',
                      'columns' => 12,
                      'fields' => array(
                        array(
                      'type' => 'file',
                                      'field' => 'add_feat_image',
                                      'label' => 'Upload image'
                                ),
                        array(
                          'type' => 'text',
                          'field' => 'add_feat_name',
                          'columns' => 12,
                          'attributes' => array(
                            'placeholder' => 'File Name'
                          )
                        ),
                        array(
                          'type' => 'text',
                          'field' => 'add_feat_location',
                          'columns' => 12,
                          'attributes' => array(
                          'placeholder' => 'File Location'
                          )
                        ),
                      )
                    ),
      
      Attachments:
      You must be logged in to view attached files.
    • #3288
      Steve
      Keymaster

      @stevo81989– This is a known issue with certain types of fields in add_mores. I emailed you a copy of our beta version which should fix the issue.

      Let us know.

    • #3290
      stevo81989
      Member

      Perfect! Ill give it a shot and report back!

    • #3295
      stevo81989
      Member

      Hm, unfortunately I think this made it worse. Now when I hit the add more within that small group the parent group gets added.

      So this is what I want it to look like if possible:

      Date
      Title
      Description
      Video Location
      Additional Features [
          File Name
          location
          image
          [add more]
          File Name
          location
          image
          [add more]
          File Name
          location
          image
          [add more]
      ]
      [add more]

      But this is now whats happening after I press the plus button

      Date
      Title
      Description
      Video Location
      Additional Features [
          File Name
          location
          image
          [add more]
          Date
          Title
          Description
          Video Location
          Additional Features [
              File Name
              location
              image
              [add more]
          ]
          [add more]
      ]
      [add more]

      Is there something special I need to take into consideration for groups within groups?

    • #3296
      Steve
      Keymaster

      Please email your field code to [email protected] We’ll try to reproduce.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.