Last active
November 13, 2023 20:29
-
-
Save bkno/5b438d0cf78ca7ad84a6bd0c64272532 to your computer and use it in GitHub Desktop.
Gravity Forms User Reg Add-on Prepopulate
This file contains 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 | |
add_filter( | |
'gform_user_registration_user_data_pre_populate', | |
function( $mapped_fields, $form, $feed ) { | |
// Select field - this works | |
$mapped_fields[5] = 'input_value'; | |
// Checkboxes field - does not work | |
$mapped_fields[8] = 'input_value'; | |
return $mapped_fields; | |
}, | |
10, | |
3 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment