Hi @sdnazdi
Thank you for response!
Your examples suggest that you are trying to fetch Formiantor form data directly and that is not going to work. Let me try to recap this all from the start.
A) First, let’s establish some “starting point”. My assumption would be:
1. You have Frominator form created already and users are able to submit that form.
2. That form has postdata field on it and it’s set to create new posts
3. so when user submits the form, a new post on site is created based on the data they submitted.
So far so good, right?
B) Now you’d like to save some additonal custom data with is so you need to gather that data from user and save it with post as custom fields values.
1. Let’s say we collect e-mail and phone number. So to collect them you add two additional fields to the form: “email” (that’d be the {email-1} field) and “phone” (that’d be {phone-1}).
2. Now to store that with newly created post you need to “map” those new fields to custom field. You do it this way:
– edit the “postdata” field and make sure that “custom fields” toggle is enabled
– then in those custom fields you put “email” as “Label” and {email-1} as “Value” for the first field
– and “phone” as “Label” and {phone-1} as “Value” for the second field.
The “email” and “phone” will be your custom fields names while {email-1} and {phone-1} are form fields names.
At this point when you submit the form, with all the data filled-in
– post is created
– there is a custom field of name “email” saved with the post and its value is the e-mail address that you put in the form
– and there is a custom field of name “phone” saved with the post and its value is the phone number that you put in the form.
C) And finally, you want to display that on the post so using the plugin that I suggested previously you would need to put this shortcode into the post
[vg_display_data key="email"]
[vg_display_data key="phone"]
Note that the “key” here is the custom field name and not the form field name. Also if you skip additional parameters it will always fetch data from the current post meta data (so custom fields).
The same way if you use the “code” version you would simply use
[field "email"]
[field "phone"]
Best regards,
Adam