I need to create a form capable of creating multiple posts (each in their own category). I found something about gform_post_submission, but it's not clear to me whether this means what I want is possible. Can you help me further along?
I need to create a form capable of creating multiple posts (each in their own category). I found something about gform_post_submission, but it's not clear to me whether this means what I want is possible. Can you help me further along?
You could create your own PHP code to write multiple WordPress posts from one form submission, but this isn't supported by Gravity Forms and would require a fair bit of custom code. You could use gform_after_submission (gform_post_submission is deprecated) to do this, but beyond that, there isn't much I can do to help you with this other than to say that you'll want to look at how to write a WordPress post using PHP.
That's a shame. Time and my customer's budget will not allow me to delve into creating it all myself.. What happened to the Advanced Post Creation add-on that was being built a few years back?
Is there another way? Is it possible somehow to create conditional fields based on values of a different form?
I don't know of any other way currently to make multiple posts from one submission without a great deal of custom code. All my best...
Somebody managed to get it work? I think that it is very interesting feature to create for example a simple post of 30 fields Curricullum Vitae of some Job Applicant and use 5 fields to automaticaly create a new user for custom post type "mailing_list. "
Another example is to create club custom post type "EVENT" with club location fields and then in the background create a new custom post type "CLUB" info.
Is it hard to create in the background e new custom post type CLUB entry with some 3-5 fields one per line?
Can you provide an example as you have provided here: ?
http://www.gravityhelp.com/documentation/page/Gform_after_submission
Very amateur example below:
<?php
add_action("gform_after_submission", "set_post_content", 10, 2);
function set_post_content($entry, $form){
//getting post
$post = get_post($entry["post_id"]);
//changing post content
$post->post_content = "Club Info: "<br/> " . $entry[1] . " <br/>
"<br/> " . $entry[2] . " <br/>
"<br/> " . $entry[3] . " <br/>
"<br/> " . $entry[4] . " <br/>
"<br/> " . $entry[5] . " <br/>
//updating post
wp_update_post($post);
}
?>