I am trying to copy a website url field (ID:28) to a custom field (ID:19) and have the following in my functions file, but it is not working. What am I doing wrong?
add_action('gform_pre_submission', 'copy_field_value');
function copy_field_value($form) {
// copy the value which was submitted in
// field 28 to hidden field 19
$_POST['input_28'] = $_POST('input_19');
}
In fact when I do a test with this, the website URL entered in field 28 shows up in my form submission preview, but is missing from the final submission. The custom field #19 doesn't show in the preview of the final submission.