Support

Account

Forum Replies Created

  • Can’t create a new topic in the weekends, so a reply might be the best solution.

    Basically I want to know how to make two seperate forms (on two different pages even) on the front end where users can create posts. Form one is used to create posts of the custom post type A. Form two is used to create posts of the custom post type B.

    • I created two forms using the ACF plugin.
    • I created the custom templates for displaying both forms.
    • I added the acf_form_head() to the templates
    • I added the $options for each form on each of the templates and added the acf_form ( $options) like is shown in the tutorial
    • I added the code shown in the tutorial in the functions.php file. One function called cptA_pre_save_post and one function called cptB_pre_save_post. Ofcourse the post_type is set to the right type for each.

    So far so good. But when creating posts from the front end forms they seem to use only the code from one of the functions. Form two also creates a post of post type A instead of B for example. Which probably has something to do with the answer you replied to @rvirvo .

    You say they will never work this way because of the updated $post_id param. My issue, or my question if you will is: could you explain to me how (if possible) to make this work.

    Thanks in advance, and I love your ACF plugin (and add-ons).

  • I’m having trouble with this issue also. Could one of you provide me the solution to this issue? Maybe updating this tutorial with the solution to this problem might be a good thing to do?

    Basically I have one form to create a new post for one custom post type (using the code provided in the tutorial) and one form to create a new post for another custom post type (also using the code provided in the tutorial). What I’m understanding is that, using the code provided in the tutorial, this will never work?

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