Title: Additional fields through additional settings
Last modified: November 21, 2017

---

# Additional fields through additional settings

 *  Resolved [vadimpopowsky](https://wordpress.org/support/users/vadimpopowsky/)
 * (@vadimpopowsky)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/additional-fields-through-additional-settings/)
 * Hi,
 * 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” ([https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7](https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7))
   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 [Mário Valney](https://wordpress.org/support/users/mariovalney/)
 * (@mariovalney)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/additional-fields-through-additional-settings/#post-9707661)
 * Hi! Thanks for using this plugin. A [review](https://wordpress.org/support/plugin/cf7-to-zapier/reviews/)
   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.

 * ![](https://ps.w.org/cf7-to-zapier/assets/icon-256x256.jpg?rev=3214555)
 * [CF7 to Webhook](https://wordpress.org/plugins/cf7-to-zapier/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-to-zapier/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-to-zapier/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-to-zapier/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-to-zapier/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-to-zapier/reviews/)

## Tags

 * [Additional Fields](https://wordpress.org/support/topic-tag/additional-fields/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mário Valney](https://wordpress.org/support/users/mariovalney/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/additional-fields-through-additional-settings/#post-9707661)
 * Status: resolved