-
AuthorPosts
-
December 4, 2014 at 2:03 pm #362839
Hi
I’m using Gravity forms to create custom fields that can be completed by the user on the front end.
Does anybody know how I can read the form submissions and show them as a Enfold blog_post on a page?Thanks
Darren
December 4, 2014 at 8:25 pm #363203Hi darrenrhymer!
I don’t know of any plugins that I can recommend. If anyone has done this before then please share. :)
Regards,
ElliottDecember 7, 2014 at 9:40 pm #364354Hi
So after using Advanced Custom Fields and linking to these in Gravity Forms, the user can submit all the post fields on the front end form which creates a new Form entry and a new POST.
I want to read all the details from the POST and show on screen.
This MUST be possible otherwise there would be no point in Gravity Forms allowing you to fill these custom fields if you cant read the details from them.
Can somebody please tell me how to show all the fields from the post on a page one after the other like in blog_posts control.
Thanks
Darren- This reply was modified 9 years, 11 months ago by darrenrhymer.
December 8, 2014 at 6:57 pm #364865Hi!
It seems like a specific issue so your probably not going to find anyone who has done this here in the Enfold support forums. It would probably be best to contact gravity forms support about this.
But to answer your question, the way to read a custom field and display it from a post is this WordPress function, http://codex.wordpress.org/Function_Reference/get_post_meta.
Regards,
ElliottDecember 9, 2014 at 3:23 pm #365372Hi
Well Ive kind of figured it out.
I installed plug in “Get Custom Field Value”, and then in file includes/loop-index.php I added:
/* DJR++ */
echo c2c_get_custom(‘location’, ‘Location: ‘).”<br/>”;
echo c2c_get_custom(‘contact_number’, ‘Contact Number: ‘).”<br/>”;
echo c2c_get_custom(‘cost’, ‘Cost: $’).”<br/>”;
/* DJR– */This shows me these extra fields in my blog_post control.
However, I prefer the layout of the “magazine” control.
Where do i find the php file that controls this so i can add the code in there?
I think it should be /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/magazine.php
but when i rename/remove this file the magazine control still shows my posts!!!
Thanks
DarrenDecember 9, 2014 at 9:34 pm #365626Hey!
Hmm, why would you need to rename/remove it? All you would need to do is edit it around line 580 correct? Also, you don’t want to echo out the content in that file you’ll want to add it to the $output variable and return it.
Maybe something like this.
$output .= c2c_get_custom(‘location’, ‘Location: ‘);
Best regards,
Elliott- This reply was modified 9 years, 11 months ago by Elliott.
December 10, 2014 at 12:10 am #365730Hi
Sorry I should have explained. when I added some code to the file i didn’t see any change on the page so to check I was editing the correct file I removed it from the server, but still the magazine control shows data. (Even though the file is missing from the server)
Using Firebug and highlighting the control then searching for the div classes, they are only found in that file.
So why is the magazine still showing data when there is no file?
ThanksDecember 10, 2014 at 12:23 am #365733Gulp..
magazine_back.php
still works, where as
magazine.php.bck
doesn’t.Ok, so Ive figured this out now – with a little help form Elliot, thanks –
In \wp-content\themes\enfold\config-templatebuilder\avia-shortcodes\magazine.php at line 586 I added the following shortcodes from the “Get Customer Field Values” plugin.
$output .= c2c_get_post_custom($entry->ID, 'suburb'); $output .= c2c_get_post_custom($entry->ID, 'city', ', ','<br/>');
Hope this helps somebody
D
- This reply was modified 9 years, 11 months ago by darrenrhymer.
-
AuthorPosts
- The topic ‘Read data submitted with Gravity Forms’ is closed to new replies.