Getting value without shortcode
-
Is there a way to get a value from a form field that’s not using a CF7 shortcode?
I tried a snippet that I found in another support ticket:
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( ‘quote-list’ ) ) ) {
$quotelist = $tag->name;$data[‘quote-list’] = ( isset( $_POST[ $quotelist ] ) ) ? sanitize_text_field( $_POST[ $quotelist ] ) : ”;
}
}return $data;
}add_filter( ‘ctz_get_data_from_contact_form’, ‘vadimpopowsky_ctz_get_data_from_contact_form’, 10, 2 );
However, the “quote-list” in this case didn’t make it to Zapier. My field is hidden with a textarea value and I know it gets picked up by CF7 but I can’t get it to Zapier.
Here’s my form html:
<textarea name=”quote-list” cols=”40″ rows=”10″ class=”wpcf7-form-control wpcf7-textarea” aria-invalid=”false”> ****************************************************
FP 101 Contemporary Fireplace SKU:FP 101 | 1
****************************************************
</textarea>
- The topic ‘Getting value without shortcode’ is closed to new replies.