Cloneable Fields - Unique ID or Class for each group (or each field in each grp.

Support General Cloneable Fields - Unique ID or Class for each group (or each field in each grp.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38446
    maybeadevmaybeadev
    Participant

    Hi:

    Lets say I have a group of fields containing three fields "fielda", "fieldb" and "fieldc".

    Is there a way to assign a unique css id or class to each field when it's cloned? eg: if the group is cloned four times, fielda will have the following css class or ids for each field: 'class-fielda-01', 'class-fielda-02', 'class-fielda-03', 'class-fielda04'.

    Why Do I Need This?
    --------------------
    So that I can uniquely reference the field inside of a group using JS to trigger a change in another field inside the same group. Right now, if I try to do that with just the current css class/id options, the field in all groups will be changed because there's no way to uniquely identify the field in current group.

    Thanks!

    #38449
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Currently, this feature is not supported for the subfields in a cloneable group. You can try to use the selector following this format group_id[index][field_id] to select the subfield by input name. The index starts from 0, like array keys.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.