Support » Plugin: CF7 to Zapier » Additional fields through additional settings

  • Resolved vadimpopowsky



    First and foremost, thank you for creating this much-needed plugin! The only options until now were a paid plugin, tweaking php or reading out emails.

    Here’s my request:

    Another Plugin for CF7 I use “International Telephone” ( gives an international telephone number [intl_tel-631].

    However, in additional settings, I’m also able to read out country and country code, which I use for flamingo:

    flamingo_country: “[intl_tel-631-cf7it-country-name]”
    flamingo_countrycode: “[intl_tel-631-cf7it-country-code]”

    It would be awesome if I could in the same way send additional url parameters to the zapier webhook. I cannot do this in hidden forms and I’m not advanced enough in php to change the code there.

    Thank you very much!

Viewing 1 replies (of 1 total)
  • Plugin Author Mario Valney


    Hi! Thanks for using this plugin. A review would be would be aprecciated. 🙂

    Well… as cf7it-country-name and cf7it-country-code aren’t a CF7 tag, the plugin couldn’t “see” them… Maybe in a future version we can try to capture data in some other way. I’ll keep it in mind. Thanks.

    For now you, let’s try to create a way to add these fields too.

    In your functions.php add this:

    function vadimpopowsky_ctz_get_data_from_contact_form( $data, $contact_form ) {
        $tags = $contact_form->scan_form_tags();
        foreach ( $tags as $tag ) {
            if ( in_array( $tag->type, array( 'intl-tel', 'intl_tel*' ) ) ) {
                $country_name = $tag->name . '-cf7it-country-name';
                $countrycore_name = $tag->name . '-cf7it-country-code';
                $data['flamingo_country'] = ( isset( $_POST[ $country_name ] ) ) ? sanitize_text_field( $_POST[ $country_name ] ) : '';
                $data['flamingo_countrycode'] = ( isset( $_POST[ $countrycore_name ] ) ) ? sanitize_text_field( $_POST[ $countrycore_name ] ) : '';
        return $data;
    add_filter( 'ctz_get_data_from_contact_form', 'vadimpopowsky_ctz_get_data_from_contact_form', 10, 2 );

    Everytime there’s a intl-tel field the flamingo_country/flamingo_countrycode fields will be added.

    Please, let me know the result.

Viewing 1 replies (of 1 total)
  • The topic ‘Additional fields through additional settings’ is closed to new replies.