Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://www.gravityhelp.com/forums/topic/inactive-column-options-do-not-include-custom-field#post-108400
- // Change 243 here to your form ID
- add_action('gform_pre_submission_filter_243', 'populate_name');
- function populate_name($form) {
- // hidden name field ID 2 holds the name. 2_3 is first name, and 2_6 is the last name
- // custom fields are accessed as an array of values. Field 1 is the custom field.
- // item 2 of the zero based array holds the first name: $_POST['input_1'][1]
- $_POST['input_2_3'] = $_POST['input_1'][1];
- $_POST['input_2_6'] = $_POST['input_1'][3];
- return $form;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement