Home › Forums › Front-end Issues › Using Gravity Forms to add Relationship Field › Reply To: Using Gravity Forms to add Relationship Field
I was able to figure it out thanks to this:http://wordpress.stackexchange.com/questions/78826/inserting-gravity-form-checkbox-values-into-advanced-custom-fields
One thing I ran into is that if I needed the serialized value for a field, the “get_post_custom_values” function worked. Otherwise, the ACF “get_field” function was what I needed for other types of fields.
add_action("gform_after_submission_2", "acf_post_submission", 10, 2);
function acf_post_submission ($entry, $form)
{
$post_id = $entry["post_id"];
// funding status
$values = get_field("reviewer_funding_status", $post_id);
echo "<br />reviewer_funding_status: " . $values;
update_field("field_519f97aab12f7", $values, $post_id);
// rating - overall
$values = get_field("rating_overall", $post_id);
echo "<br />rating_overall: " . $values;
update_field("field_519f989ab12f8", $values, $post_id);
// rating - clarity of mission
$values = get_field("rating_clarity_of_mission", $post_id);
echo "<br />rating_clarity_of_mission: " . $values;
update_field("field_520be9eac3f72", $values, $post_id);
// rating - communications
$values = get_field("rating_communications", $post_id);
echo "<br />rating_communications: " . $values;
update_field("field_519f98d4b12f9", $values, $post_id);
// rating - evaluation
$values = get_field("rating_evaluation", $post_id);
echo "<br />rating_evaluation: " . $values;
update_field("field_520be9fdc3f73", $values, $post_id);
// funder ID
$values = get_post_custom_values("funder_id", $post_id);
echo "<br />funder_id - serialized: " . $values;
update_field("field_519f996ce16ca", $values, $post_id);
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.