Answer the question
In order to leave comments, you need to log in
How to create shortcode for contact form 7 in wordpress?
I need to create a select field in Contact Form 7 to select a woocommerce product category. The output should be automatic, I found the code, but it only adds to the form, the data does not go to the letter template. And most importantly, this shortcode is not in the panel of ready-made standard Contact Form 7 shortcodes? How to be, can you advise another plugin, where this select will be
Here is the code (taken from the website)
add_action( 'wpcf7_init', 'custom_add_form_tag_clock' );
function custom_add_form_tag_clock() {
wpcf7_add_form_tag( 'clock', 'custom_clock_form_tag_handler' ); // "clock" is the type of the form-tag
}
function custom_clock_form_tag_handler( $tag ) {
return "мое время: " . date_i18n( get_option( 'time_format' ) );
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question