• Resolved joshwhite

    (@joshwhite)


    We purchased the PRO version from you guys a few weeks ago.

    I’m trying to figure out how exactly custom fields are mapped to a post.

    We have a basic form for customers to leave reviews. The form has:

    1. Shoutout! (mapped to the post title)
    2. Review (mapped to the post content)
    3. Rating of 1-5 with radio buttons.

    How exactly do we get the radio button rating set as part of the custom post type for our reviews so we can display this along side the rest of the data on the front end?

    • This topic was modified 5 years, 9 months ago by joshwhite.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    You have to use an ACF function to save the value entered by the user in the form and link it to the custom post type needed : update_field() -> https://www.advancedcustomfields.com/resources/update_field/

    Basically, it is used like this : update_field($field_name_or_key, $value_to_save, $post_ID).

    Plugin Author fabianlindfors

    (@fabianlindfors)

    Hi! With the Pro version you don’t need to use update_field as the plugin will handle the mapping automatically.

    There are a few things that need to be done for the mapping to work though. First of all, both the post and form need to share the same fields. This is most easily accomplished by setting the ACF field group location to both the post and form.

    Next you also need to configure post editing in your form settings. Go to “Editing”->”Custom fields” and check the custom fields you want to map.

    Hope this helps clear things up. The documentation also has a guide that might be helpful: https://advancedforms.github.io/pro/editing/creating-and-editing-posts/ ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating Posts -> Custom Fields’ is closed to new replies.