This topic contains 3 replies, has 2 voices, and was last updated by  Anh Tran 1 year, 10 months ago.

  • Creator
    Topic
  • #7781
    Resolved
    Jackky
    Participant

    Hi! I have a suggestion: add a “keep clone id” option. Because I have a page of options with clonable sortable groups, that is uses in other dynamic options. So, the problem is when I’m sorting group items, the dynamic options outside doesn’t keeps row position, because I can’t register each cloned item as unique.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #7782

    Anh Tran
    Keymaster

    Hi, can you please give me more info about the “dynamic options”? And the clone ID you’re talking about is the ID of inputs in the group?

    #7789

    Jackky
    Participant

    It’s hard to explain, but let me give you a comparison. You are holding collapse state of collapible group while ‘save_state’ is set to true. I want to have a simular logic for each cloned item. The result will be like:

    
    'group_name' => [
    'text' => 'value',
    'etc'  => 'value',
    ...
    '__clone_id' => 'group_XXX' // XXX - unque counter value
    ]
    
    #7813

    Anh Tran
    Keymaster

    I partly understand :).

    The logic behind saving state for collapsible groups is quite simple that you can do similarly. Just add a hidden field to the group and use the CSS class to access to that field to set/change value. Because it’s an actual field, the value will be saved when the group is saved.

    Hope that helps!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.