Exact Filters to use?

Hello team
We need to create a function populating a dropdown field with an API on a multi page form.

Use case: User fill information on page 1 and get specific information to select in a dropdown on page 3.
My user can save that form for later and come back few days later and need to get that dropdown populated.
Then, my team could edit that dropdown value by editing the entry in WP admin.

What are exactly the filters to use? I think:

add_filter( 'gform_pre_render', 'myFunction', 1 );
add_filter( 'gform_pre_validation', 'myFunction', 1 );
add_filter( 'gform_admin_pre_render', 'myFunction', 1 );
add_filter( 'gform_pre_submission_filter', 'myFunction', 1 );

Anything else?

Hello. Those four will work to dynamically populate a field in the form using myFunction. You could use those and you would be all set. That’s how we documented it here.

However, instead of four filters all calling the same function, you could use one filter to replace them all: gform_form_post_get_meta

Let us know if you have any other questions.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.