Home Forums Front-end Issues Programmatically changing tabs on acf_form() (Front-end forms) Reply To: Programmatically changing tabs on acf_form() (Front-end forms)

  • The only way I know of to programmatically switch tabs you are going to have to find the tab element and trigger a click on the tab link “a” element.

    To find the current tab


    how you would identify the previous/next tab I’m not really sure about.

    I would possibly construct some type of javascript array or object containing a list of all of the tabs on page load and then use that array/object to somehow figure out what the next/previous tab is when the link/button is clicked.

    I might also do something like set an ID (in javascript) or another data attribute on each “a” element in the list and then get the value of the “active” item and determine the next/previous using this when clicked, for example add ‘data-order=”1″‘ // 2, 3, etc.