Add/New Form is pre populating first post data

Support MB Frontend Submission Add/New Form is pre populating first post data

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8815
    aristoaristo
    Participant

    Hello, using MB builder, I have added 2 forms 1. add 2. edit/update. I'm doing this for the custom post type.

    Added couple of entries from the backend. Now, when I try from frontend, the add new form pre-populates the data of top first post available on the page. If you want I can share the site URL for you to check.

    you can check the screenshot at https://imgur.com/a/LIe7W (contains both add and edit form screens).

    #8828
    Anh TranAnh Tran
    Keymaster

    Hello,

    Do you set the post_id in the shortcode? The data from the post is get only when this parameter is set.

    #8830
    aristoaristo
    Participant

    I'm using 2 forms on the same page, below is the code.

    1. Add Form (On Modal window) - [mb_frontend_form post_type="directory" post_fields="title,thumbnail,content" id="generic-info,company-info,location,additional-info,social"]

    2. Edit Form (On Different Modal window) - [mb_frontend_form post_type="directory" post_id='.$id.' post_fields="title,thumbnail,content" id="generic-info,company-info,location,additional-info,social"]

    where $id = $post->ID;

    I'm following the shortcode and its attributes based on the documentation available on MB Builder page, please highlight if I missed/messed up anything here.

    #8853
    Anh TranAnh Tran
    Keymaster

    The shortcodes look ok. Can you send me the website URL to check? Or probably an admin account (via Contact page)?

    #8855
    aristoaristo
    Participant

    Hi sent you details via Contact page, please check.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add/New Form is pre populating first post data’ is closed to new replies.