Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • hi, i’ve also realized the same issue yesterday. Didn’t make any changes but i realized the admin was receiving emails but not the user who fills up the form.

    Thread Starter markfive

    (@marcuschia01)

    Hi Michael, 1 quick question:
    Is there anyway to output the modified $formData values?

    $formData->posted_data['ref_id'] = $id_prefix.'-'.$formattedNumber;

    What i wanna output to the CF7 mail section is the ‘ref_id’ value.
    I can’t seem to find any documentation page for this.

    Thanks!

    Thread Starter markfive

    (@marcuschia01)

    Solved this by defining a different key in database. Thanks for guiding me the way for this! 🙂

    //Define the key to store in the database
    define( 'CF7_COUNTER', 'cf7-counter' );
    
    //Create the shortcode which will set the value for the DTX field using dynamic text field plugin
    function cf7dtx_counter(){
        $val = get_option( CF7_COUNTER, 0) + 1;  //Increment the current count
        return $val;
    }
    add_shortcode('CF7_counter', 'cf7dtx_counter');
    
    function update_counter_value ($formData) {
    	$val = get_option( CF7_COUNTER, 0) + 1; //Increment the current count
        	update_option(CF7_COUNTER, $val); //Update the settings with the new count
        	$formattedNumber = sprintf('%04d', $val);
    }
    add_filter('cfdb_form_data', 'update_counter_value');
Viewing 3 replies - 1 through 3 (of 3 total)