Form not popuplated
Support › MB Frontend Submission › Form not popuplatedResolved
- This topic has 5 replies, 3 voices, and was last updated 5 years, 5 months ago by
Anh Tran.
-
AuthorPosts
-
November 5, 2019 at 12:10 AM #16791
netalys
ParticipantHi ! Maybe I'm missing or misunderstanding something :
I have a page with a shortcode like this : [mb_frontend_form id="my_meta" post_id="1234"]The form is displaying well but no data is populated at all, all fields are empty...
Shouldn't they be filled with existing post data with post id 1234 ?Thanks for your help.
November 5, 2019 at 3:20 PM #16803Anh Tran
KeymasterYes, the
post_id
param tells the plugin to pull data from the post with ID = 1234. I made a video on how it works here: https://www.loom.com/share/68cf865579464b43a021a82d2cf08f18.How did you register the meta box? With code or via MB Builder?
November 6, 2019 at 5:10 AM #16808netalys
ParticipantI registered it with code.
You can look it here : https://wordpress-257420-909214.cloudwaysapps.com/test/
It's a test page with only this shortcode : [mb_frontend_form id="firm-info" post_id="536"]
This id is this post : https://wordpress-257420-909214.cloudwaysapps.com/firm/asb-group-czech-republic/All data in this post has been inputed from the metabox in wp-admin.
The form is displaying well, but no data in it...If I put the shortcode in the post content, I see infos in custom fields, but for example if I add post_fields="title", the title is empty...
November 7, 2019 at 8:31 AM #16842Anh Tran
KeymasterIf I put the shortcode in the post content, I see infos in custom fields, but for example if I add post_fields=”title”, the title is empty…
Can you clarify this? I'm not quite clear.
November 9, 2019 at 4:17 AM #16860netalys
ParticipantSorry my explanation was bad...
If I put this shortcode inside the post content (it's a custom post type named firm and post ID is 536) : [mb_frontend_form id="firm-info" post_fields="title"]
Then here's what I got :As you can see, all my custom fields like Country, Phone, ... are filled but the title is empty.
I've created a Test page with this shortcode : [mb_frontend_form id="firm-info" post_fields="title" post_id="536"]
And here's what I got :
No data at all 🙁
I just can't understand why...
And I think that by default, if post exist then it should make an update of the post. If you don't display title then it creates another post with no title and I think (it's personal 🙂 ) that it should update the current post or the ID provided in the shortcode, or at least add an option in the shortcode for example update="true" for people that just want to offer the client to update a post from the front but don't want them to create new posts...
November 10, 2019 at 7:53 AM #16868 -
AuthorPosts
- You must be logged in to reply to this topic.