Support

Account

Home Forums Backend Issues (wp-admin) Preselecting ACF values (and firing conditional JS) on new post creation.

Unread

Preselecting ACF values (and firing conditional JS) on new post creation.

  • I have a a set of nested conditionally linked ACF fields assigned to a custom post type.

    When a new post is created through the admin (only when newly created – not edited), I’d like to be able read some URL parameters and preselect some values in ACF checkboxes and select inputs.

    There are obviously some handy ACF Actions for on field load where I could theoretically add a selected attribute to various choices, but I’m wondering if doing this will trigger all the conditional logic and therefore display the appropriate fields.

    I can’t work out if I am best doing this all via PHP or Javascript. Any pointers as to how I should approach this much appreciated.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.