Home Forums Front-end Issues acf_form – Add Parent Row ID to Field Labels


acf_form – Add Parent Row ID to Field Labels

  • Hello,

    I’m using ACF Frontend via acf_form() to display all my form fields on the front-end, which has several repeater fields.

    I’d like to add the row number to some field labels, to better help users navigate the form, for example:

    – Repeater row 1:
    —- Objectives 1
    —- Goals 1
    – Repeater row 2:
    —- Objectives 2
    —- Goals 2

    It seems I’m able to add some html to the field labels, so I was thinking of using js/jq to grab the parent repeater row ID and somehow inject it into the child field labels, but I’m not sure if there’s a better way.

  • any ideas from anyone other than the adult bot?

  • Using JavaScript is probably the only way that this can be accomplished. You can use the ACF JS API to trigger actions to do the modification.

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

You must be logged in to reply to this topic.