Contact form 7 – Acceptance Labels
-
Hi I implemented contact form 7 and need your help to make an improvement.
In the acceptance.php file at the end of the function wpcf7_acceptance_shortcode_handler I added.if ($tag->has_option( 'use_label_element' )) { $label_open = '<label>'; $label_close = '</label>'; } $html = sprintf( "<span class='wpcf7-form-control-wrap %s'>%s<input %s />%s<span class='wpcf7-list-item-label'></span>%s</span>", sanitize_html_class( $tag->name ), $label_open, $atts, $validation_error, $label_close); return $html;
I know that this is not ideal, but I need the use_label_element attribute to work on the shortcode.
It would also be nice if it can retain the structure that other labels have.
label
-> input
-> input labelThis is used to do some custom styling to checkboxes.
- The topic ‘Contact form 7 – Acceptance Labels’ is closed to new replies.