• Resolved Yohann Billard

    (@byohann6)


    Hello,
    On a website I have a custom post type and made a front end form to allow users to create post of the custom post type. I create a page and in this page I embed the shortcode of the front end form. All is good.

    Now I need to create a page with another front end form to edit these posts. I create the same form but with edit post action. I create another page with this form embed. On the page the form is displayed but fields are not filled.

    I look at the documentation but I don’t understand how to filled my form fields ? I need to pass ID of the post as URL parameter ?

    Thank you in advance for your help

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    As you can see in your Form UI: Post Action, when you change the type to “Update Post”, the “Save” & “Load” Tab allow you to change the “Target” (which post to update), and the “Source” (which post to load ACF values from). The default value of the Target/Source is “Current Post”.

    If you display the “Edit Form” on a page, and Target/Source is “Current Post”, the form will try to retrieve ACF Fields values from the page where the form is displayed. If there is no ACF Fields with values, it’s normal that nothing is filled, because no fields corresponding to your form are in there. So you have to tell the form which Target/Source to use.

    You can either choose a post in Target/Source. But if the post is different for each user, then you’ll have to pass that dynamic Post ID to the form using PHP.

    You’ll find more information about this on the Shortcode Intergration documentation here.

    You also find a guide showing it in action here.

    Hope it helps!

    Have a nice day!

    Regards.

    Thread Starter Yohann Billard

    (@byohann6)

    Thank you for you answer.

    I’m sorry I just forgot to put {form:param} in the “Load > Source” field.

    Now all is good, thank you ??

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Awesome!

    Have a nice day!

    Regards.

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