Passing ACF field value to hidden gravity forms field

We have an Advanced Custom Field Field named web_refrence. We now need to pass the value of this field to a hidden field in Gravity Forms.

We have tried the below but it does not seem to work:

add_filter( 'gform_field_value_web_refrence', 'my_custom_population_function' );
function my_custom_population_function( $value ) {
    global $post;
    return function_exists( 'get_field' ) ? get_field( 'web_refrence', $post->ID ) : false;

Could someone offer some suggestions on how we could get this to work using Dynamic Population in GF. We have set the hidden field to populate dynamically with the parameter web_refrence

Thank you Francois Wessels

New User Asked on September 19, 2018 in Plugins.
Add Comment
2 Answer(s)

not really into gf, but here is the docs to gform_field_value. u sure u set gform_field_value_web_refrence correctly? that field exitsts in your form and they relate to each other in some parameter/way..?

New User Answered on September 19, 2018.
Add Comment

Have you dumped $post to make sure it is there? Also, are you sure the parameter is not called web_reference?

New User Answered on September 19, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service. | Learn how to add/edit code.