• 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)
  • How and when you fill these fields

    when plugin sends data to zoho, these fields are not filled

    Thread Starter amanda3ip

    (@amanda3ip)

    The url I’m testing is https://3ipuntweb.host3ip.eu/integracio-moodle-wordrpress-smatx/

    I have this code in my functions.php

    //add hidden fields in contact form 7

    add_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:

    <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

    (@amanda3ip)

    Any news related with this problem?

    Thanks in advance

    Thread Starter amanda3ip

    (@amanda3ip)

    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)
  • You must be logged in to reply to this topic.