[Plugin: Contact Form 7] Need some help with Radio buttons..
-
I am using CF7 radio buttons with a CSS style switcher, when you choose a radio, it triggers a style sheet to populate images. The style switcher requires an ID to trigger, I am using the $value as the ID, but there may be spaces, and that is no good.. So I tried some regex to reformat of the $value, but that doesn’t pass in the email.
Here is a sample from my plugins/contact-form-7/modules/checkbox.php starting around line 120
if ( $label_first ) { // put label first, input last $item = '<div class="art"><span class="wpcf7-list-item-label ' . esc_attr( $value ) . '">' . esc_html( $label ) . '</span> '; $item .= '<input type="' . $input_type . '" name="' . $name . ( $multiple ? '[]' : '' ) . '"onClick="chooseStyle(this.value, 60)" value="' . esc_attr( $value ) . '"' . $checked . $tabindex . $onclick . ' />'; } else { $item = '<div class="art"><input type="' . $input_type . '" name="' . $name . ( $multiple ? '[]' : '' ). '" onClick="chooseStyle(this.value, 60)" value="' . esc_attr( preg_replace($pattern, $replacement, $value) ) . '"' . $checked . $tabindex . $onclick . ' />'; $item .= ' <span class="wpcf7-list-item-label ' . esc_attr( preg_replace($pattern, $replacement, $value) ) . '">' . esc_html( $label ) . '</span>' . '<br /><a class="' . esc_attr( preg_replace($pattern, $replacement, $value) ) . ' sample" href="#" rel="#' . esc_attr( preg_replace($pattern, $replacement, $value) ) . '">' . '</a></div>'; }
Question is, is there a way to create classes and IDs with “-“s and pass the $value in the email without?
- The topic ‘[Plugin: Contact Form 7] Need some help with Radio buttons..’ is closed to new replies.