Contact Form 7 Checkbox Function
-
Dear all,
I am trying to make a function within the Contact Form 7 plugin that gives users different question based on which checkbox they highlight.I am using the following checkbox element within contact form 7.
<label> <b>Applications</b> </label> [checkbox checkbox-945 use_label_element "Propulsion and Stabilization?" "Transit Systems?" "Bearing and Sealing?" "Mooring" "Lighting"]
I want the function to do something along the lines of this:
If checkbox “Propulsion and Stabilization” is checked display question 1 and 2.
If checkbox “Transit Systems” is checked display question 3 and 4.
If checkboxes “Propulsion and Stabilization” and “Transit Systems” are checked display question 1,2,3 and 4.I have started writing something with the help of stackoverflow but couldn’t figure out where to add my own variables instead of the given variables that are displayed.
add_action('init', 'Checkbox'); function Checkbox() { $options = get_option( 'creative_settings' ); // If is checked, activate function to display coming soon page if( $options['creative_checkbox_field_1'] == '1' ) { add_action('get_header', 'coming_soon_mode'); } else { //do nothing } return; }
Any help is appreciated
- The topic ‘Contact Form 7 Checkbox Function’ is closed to new replies.