• Resolved richyvoc

    (@richyvoc)


    Hello,
    Thank you for the plugin. Worked out of the box for text fields.
    I created radio button and checkbox fields manually in html with contact form 7.
    Here is a code example:

    <div id="nombredeportes" class="typedevehicule">
                <div class="typesvoiture2 justname">
                    <input type="radio" id="3portes" name="portes[]" value="3 portes"  /><br><label>3 portes</label>
                </div>
                <div class="typesvoiture2 justname">
                    <input type="radio" id="5portes" name="portes[]" value="5 portes" /><br><label>5 portes</label>
                </div>
                <div class="typesvoiture2 justname">
                    <input type="radio" id="portesindifferent" name="portes[]" value="portes indifférent" checked /><br><label>Indifférent</label>
                </div>
    
            </div>

    I am able to get the info into the email (in this case using [portes] but the json data sent to Zapier is showing up as empty. How can I get the data (selected radio button text) or checkboxes that are clicked to show in Zapier?

    I thank you in advance for any and all help.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mário Valney

    (@mariovalney)

    Hi.

    By now we only CF7 tags are supported.

    You can add data manually:

    add_filter( 'ctz_get_data_from_contact_form', 'richyvoc_ctz_get_data_from_contact_form' );
    function richyvoc_ctz_get_data_from_contact_form( $data ) {
        // Add your POST to $data
    
        return $data;
    }
    Thread Starter richyvoc

    (@richyvoc)

    Hi again,
    I’m having problems with the syntax. Would you be kind enough to explain what I’m doing wrong. I’m using the example of my first post where radio buttons are manually included.

    add_filter( 'ctz_get_data_from_contact_form', 'richyvoc_ctz_get_data_from_contact_form' );
    function richyvoc_ctz_get_data_from_contact_form( $data ) {
     

    $submission = WPCF7_Submission::get_instance();

    if ( empty( $submission ) ) return $data;
    $url = $submission->get_meta( ‘url’ );
    $portes = $submission[‘portes’];

    $data[‘_url’] = ( ! empty( $url ) ) ? esc_url( $url ) : ”;
    $data[‘portes’] = ( ! empty( $portes ) ) ? $portes : ”;`
    }`

    URL shows up correctly in Zapier but not PORTES.
    Thanks for your help.

    Plugin Author Mário Valney

    (@mariovalney)

    Hi!

    I’m sorry for taking so much time to answer.
    Are you still needing my help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘radio button and checkboxes empty in Zapier’ is closed to new replies.