First, I’d like to thank sepehr125 for sharing that piece of code but the code has a typo in the last line so it doesn’t work unless you changed gravity_forms with gravity_form so it should be;
gravity_form( 1, true, true, false, $field_values, true);
Second, the corrected code only displays the titles of some pages if you use get_the_title($favID)
or the links of those pages if you use get_permalink($favID)
. The problem is none of them are actually favorited posts or pages. I don’t know according to what, the code gets those pages?
So still, is there anybody who can alter that code so it actually pre-populates the form field with actual favorited post content?
@southcast
First duplicate a template file, change its name and add that above code under <?php the_content
Then create your form as it’s suggested save it, use “message_body” as the parameter.
I didn’t add anything to functions.php to make it work.
just create a page where you want the form to appear and change the page template to your new duplicated template. You don’t need to add the form shortcode since you add the php version.