Viewing 1 replies (of 1 total)
  • If you add a hidden field to the form and label it “utm_source”, you can populate the field when it is displayed by adding this function to your theme’s functions.php:

    function my_form_populate_field( $data, $field_id ) {
    	if ( $_GET['UTM_source'] && 'utm_source' == $data['label'] ) {
    		$data['default_value'] = $_GET['UTM_source'];
    	}
    	return $data;
    }
    add_action( 'ninja_forms_field', 'my_form_populate_field', 10, 2 );

    The hidden field will be submitted with this value and will appear in the submission record.

Viewing 1 replies (of 1 total)

The topic ‘Custom UTM column (User Analytics Extension)’ is closed to new replies.