Forked from spivurno/gp-nested-forms-populate-nested-form-field.php
Created
September 5, 2016 04:26
-
-
Save phillipwilhelm/6684d3ee2f6c77e0a927f9d9c2343bc9 to your computer and use it in GitHub Desktop.
Gravity Perks // GP Nested Forms // Populate Nested Form Field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Gravity Perks // GP Nested Forms // Populate Nested Form Field | |
| */ | |
| add_action( 'gform_enqueue_scripts', function( $form ) { | |
| if( $form['id'] == 508 ) { | |
| foreach( $form['fields'] as $field ) { | |
| if ( $field->id == 2 ) { | |
| $_POST["input_{$field->id}"] = '7631,7629'; | |
| } | |
| } | |
| } | |
| }, 9 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment