Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions gp-inventory/gpi-populate-days.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
*
* 2. Follow the inline instructions to configure the snippet for your form.
*/
// Change `123` to your form ID
add_filter( 'gform_pre_render_123', 'gw_populate_days_into_radio', 5, 1 );
add_filter( 'gform_pre_validation_123', 'gw_populate_days_into_radio', 5, 1 );
add_filter( 'gform_pre_render', 'gw_populate_days_into_radio', 5, 1 );
add_filter( 'gform_pre_validation', 'gw_populate_days_into_radio', 5, 1 );
function gw_populate_days_into_radio( $form ) {

// Change `123` to your form ID
if ( (int) rgar( $form, 'id' ) !== 123 ) {
return $form;
}

// Update `1` with your Radio Button field ID
$field_id = 1;

Expand Down
Loading