Title: Mapping hidden fields
Last modified: December 4, 2024

---

# Mapping hidden fields

 *  [amanda3ip](https://wordpress.org/support/users/amanda3ip/)
 * (@amanda3ip)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/mapping-hidden-fields/)
 * I have three hidden fields in my Contact form 7.
    - language: getting this value from WMP ICL_LANGUAGE
    - lead-source
    - interested in
 * I use the filter wpcf7_form_hidden_fields to fill the values dynamic.
 * But when I sent the form, in my ZOHO these fields are emty, although I have mapped
   these fields.
 * I need to do something special to send hidden fields to my zoho?
 * Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [CRM Perks Support](https://wordpress.org/support/users/crmperkshelp/)
 * (@crmperkshelp)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/mapping-hidden-fields/#post-18179890)
 * How and when you fill these fields
 * when plugin sends data to zoho, these fields are not filled
 *  Thread Starter [amanda3ip](https://wordpress.org/support/users/amanda3ip/)
 * (@amanda3ip)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/mapping-hidden-fields/#post-18180035)
 * The url I’m testing is [https://3ipuntweb.host3ip.eu/integracio-moodle-wordrpress-smatx/](https://3ipuntweb.host3ip.eu/integracio-moodle-wordrpress-smatx/)
 * I have this code in my functions.php
 *     ```wp-block-code
       //add hidden fields in contact form 7add_filter('wpcf7_form_hidden_fields', function ($hidden_fields) {    if (is_page()) {        $interested_in = '';        $lead_source = '';        $page_title = get_the_title();        switch($page_title){            case 'Moodle':                $interested_in = 'Moodle';                $lead_source = '';                default;                break;            case 'Moodle App':                $interested_in = 'Moodle Mobile - BMA';                $lead_source = 'Formulari web BMA';                break;            case 'Workplace':                $interested_in = 'Workplace';                $lead_source = '';                break;            case 'Moodle Educator Qualification':                $interested_in = 'MEC';                $lead_source = 'Formulari web MEC';                break;            case 'Goodle':                $interested_in = 'Goodle';                $lead_source = 'Formulari web Goodle';                break;            case 'Fresk':                $interested_in = ''; /* no existe*/                $lead_source = '';                break;            case 'Necessites bonificar la teva formació amb FUNDAE?':            case '¿Necesitas bonificar tu formación con FUNDAE?':                $interested_in = 'Fundae';                $lead_source = 'Formulari web FUNDAE';                break;            case 'Homologa el teu Moodle amb SEPE':            case 'Homologa tu Moodle con SEPE':                $interested_in = 'SEPE';                $lead_source = 'Formulari web SEPE';                break;            case 'Smatx':                $interested_in = 'Smatx';                $lead_source = 'Formulari Smatx';                break;            case 'Continguts':            case 'Contenidos':                $interested_in = 'Continguts';                $lead_source = '';                break;            case 'Gamificació':            case 'Gamificación':                $interested_in = ''; /* no existe*/                $lead_source = '';                break;            case 'Desenvolupament a mida':            case 'Desarrollo a medida':            case 'Custom development':                $interested_in = 'Development';                $lead_source = '';                break;            case 'Desenvolupament web':            case 'Desarrollo web':            case 'Web development':                $interested_in = 'Wordpress';                $lead_source = '';                break;            case 'Totara':                $interested_in = ''; /* no existe */                $lead_source = '';                break;            case 'Kit Digital':                $interested_in = 'Kit Digital';                $lead_source = 'Formulari web KitDigital';                break;        }        $hidden_fields['interested-in'] = $interested_in;        $hidden_fields['lead-source'] = $lead_source;        if (function_exists('icl_object_id')) { // Verifica que WPML esté activo            $current_lang = apply_filters('wpml_current_language', NULL);            $lang ='';            switch ($current_lang) {                case 'ca':                    $lang = 'Català';                    break;                default;                case 'es':                    $lang = 'Castellà';                    break;                case 'en':                    $lang = 'Anglès';                    break;            }            $hidden_fields['language'] = $lang;        }    }    return $hidden_fields;});
       ```
   
 * And before send this form, If I inspect the source code I have:
 *     ```wp-block-code
       <div style="display: none;"><input type="hidden" name="_wpcf7" value="33779"><input type="hidden" name="_wpcf7_version" value="6.0.1"><input type="hidden" name="_wpcf7_locale" value="ca"><input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f33779-p27552-o1"><input type="hidden" name="_wpcf7_container_post" value="27552"><input type="hidden" name="_wpcf7_posted_data_hash" value=""><input type="hidden" name="interested-in" value="Smatx"><input type="hidden" name="lead-source" value="Formulari Smatx"><input type="hidden" name="language" value="Català"></div>
       ```
   
 * So here, I have these 3 fields filled, but when I send the form these fields 
   are empty
 *  Thread Starter [amanda3ip](https://wordpress.org/support/users/amanda3ip/)
 * (@amanda3ip)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/mapping-hidden-fields/#post-18187694)
 * Any news related with this problem?
 * Thanks in advance
 *  Thread Starter [amanda3ip](https://wordpress.org/support/users/amanda3ip/)
 * (@amanda3ip)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/mapping-hidden-fields/#post-18219454)
 * Hi,
 * Please, let me know if you have news related with these… I need this information
   as soon as possible…
 * Best regards

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Mapping hidden fields’ is closed to new replies.

 * ![](https://ps.w.org/cf7-zoho/assets/icon-256x256.png?rev=2585030)
 * [WP Zoho for Contact Form 7, WPForms, Elementor, Formidable and Ninja Forms - CRM, Bigin](https://wordpress.org/plugins/cf7-zoho/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-zoho/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-zoho/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-zoho/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-zoho/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-zoho/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [amanda3ip](https://wordpress.org/support/users/amanda3ip/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/mapping-hidden-fields/#post-18219454)
 * Status: not resolved