• Resolved tsjippy

    (@tsjippy)


    Does anybody know how this hook works: If you know the ID of the input, you can also use the wpcf7_hidden_field_value_[#ID] filter.

    I have the following but it does not work:

    
    function filter_wpcf7_hidden_field_value_id_att( $value ) { 
            global $wpdb;
        $uniqueid = $wpdb->get_var("SELECT MAX(<code>data_id</code>) FROM <code>wp_cf7_vdata_entry</code> WHERE 1");
        return $uniqueid;
    }; 
             
    // add the filter 
    add_filter( "wpcf7_hidden_field_value_ID123", 'filter_wpcf7_hidden_field_value_id_att', 10, 1 ); 

    The field is configured as this: [hidden hidden-731 id:ID123]

    any help appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with the hook’ is closed to new replies.