Contact Form 7 Multi-Step Forms - Version 1.0

Version Description

Initial release.

Download this release

Release Info

Developer webheadllc
Plugin Icon 128x128 Contact Form 7 Multi-Step Forms
Version 1.0
Comparing to
See all releases

Version 1.0

contact-form-7-multi-step-module.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Contact Form 7 Multi-Step Forms
4
+ Plugin URI: http://www.mymonkeydo.com/contact-form-7-multi-step-module/
5
+ Description: Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
6
+ Author: Webhead LLC.
7
+ Author URI: http://webheadcoder.com
8
+ Version: 0.9
9
+ */
10
+ /* Copyright 2012 Webhead LLC (email: info at webheadcoder.com)
11
+
12
+ This program is free software; you can redistribute it and/or
13
+ modify it under the terms of the GNU General Public License
14
+ as published by the Free Software Foundation; either version 2
15
+ of the License, or (at your option) any later version.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
+ */
26
+
27
+
28
+ if (!in_array('contact-form-7-modules/hidden.php', get_option( 'active_plugins', array() ))) {
29
+ require_once(plugin_dir_path(__FILE__) . 'module-hidden.php');
30
+ }
31
+ require_once(plugin_dir_path(__FILE__) . 'module-session.php');
32
+
33
+ /**
34
+ * init_sessions()
35
+ *
36
+ * @uses session_id()
37
+ * @uses session_start()
38
+ */
39
+ function wh_init_sessions() {
40
+ if (!session_id()) {
41
+ session_start();
42
+ }
43
+ }
44
+ add_action('init', 'wh_init_sessions');
45
+
46
+ /**
47
+ * Hide the second step of a form. looks at hidden field 'step'.
48
+ * Always show if the form is the first step.
49
+ * If it's not the first step, make sure it's the next form in the steps.
50
+ */
51
+ function wh_hide_cf7_step_2($cf7) {
52
+ $formstring = $cf7->form;
53
+ //check if form has a step field
54
+ if (!is_admin() && preg_match('/\[hidden step "(\d+)-(\d+)"\]/', $formstring, $matches)) {
55
+ if (!isset($matches[1]) || ($matches[1] != 1 && !isset($_SESSION['step'])) || ($matches[1] != 1 && ((int) $_SESSION['step']) + 1 != $matches[1])) {
56
+ $cf7->form = apply_filters('wh_hide_cf7_step_message', "Please fill out the form on the previous page");
57
+ }
58
+ if (count($matches) == 3 && $matches[1] != $matches[2]) {
59
+ add_filter('wpcf7_ajax_json_echo', 'wh_clear_success_message', 10, 2);
60
+ }
61
+ }
62
+ return $cf7;
63
+ }
64
+ add_action('wpcf7_contact_form', 'wh_hide_cf7_step_2');
65
+
66
+ /**
67
+ * Handle a multi-step cf7 form.
68
+ */
69
+ function wh_store_data_steps(&$cf7) {
70
+ if (isset($cf7->posted_data['step'])) {
71
+ if (preg_match('/(\d+)-(\d+)/', $cf7->posted_data['step'], $matches)) {
72
+ $curr_step = $matches[1];
73
+ $last_step = $matches[2];
74
+ }
75
+ $prev_data = isset($_SESSION['cf7_posted_data'])?$_SESSION['cf7_posted_data']:array();
76
+ //remove empty [form] tags from posted_data so $prev_data can be stored.
77
+ $fes = wpcf7_scan_shortcode();
78
+ foreach ( $fes as $fe ) {
79
+ if ( empty( $fe['name'] ) || $fe['type'] != 'form' )
80
+ continue;
81
+ unset($cf7->posted_data[$fe['name']]);
82
+ }
83
+ if ($curr_step != $last_step) {
84
+ $cf7->skip_mail = true;
85
+ $_SESSION['step'] = $curr_step;
86
+ $_SESSION['cf7_posted_data'] = array_merge($prev_data, $cf7->posted_data);
87
+ }
88
+ else {
89
+ $cf7->posted_data = array_merge($prev_data, $cf7->posted_data);
90
+ unset($_SESSION['step']);
91
+ unset($_SESSION['cf7_posted_data']);
92
+ }
93
+ }
94
+ }
95
+
96
+ add_action( 'wpcf7_before_send_mail', 'wh_store_data_steps', 9 );
97
+
98
+ /**
99
+ * Hide success message if form is redirecting to another page.
100
+ */
101
+ function wh_clear_success_message($items, $result) {
102
+ remove_filter('wpcf7_ajax_json_echo', 'wh_clear_success_message');
103
+ if ($items['mailSent'] && isset($items['onSentOk']) && count($items['onSentOk']) > 0) {
104
+ $items['onSentOk'][] = "$('" . $items['into'] . "').find('div.wpcf7-response-output').css('opacity',0);";
105
+ }
106
+ return $items;
107
+ }
108
+
109
+
110
+ /************************************************************************************************************
111
+ * Contact Form 7 has a nice success message after submitting its forms, but on a multi-step form,
112
+ * this can cause confusion if it shows and the page immediately leaves to the next page.
113
+ * The functions below hide the success messages on multi-step forms.
114
+ ************************************************************************************************************/
115
+
116
+ /**
117
+ * Hide form when done.
118
+ */
119
+ function wh_hide_multistep_form($items, $result) {
120
+ remove_filter('wpcf7_ajax_json_echo', 'wh_hide_multistep_form');
121
+ if ($items['mailSent'] && !isset($items['onSentOk'])) {
122
+ $items['onSentOk'] = array("$('" . $items['into'] . " form').children().not('div.wpcf7-response-output').hide();");
123
+ }
124
+ return $items;
125
+ }
126
+
127
+ /**
128
+ * Add filter to clear form if this is a multistep form.
129
+ */
130
+ function wh_cf7_before_mail($cf7) {
131
+ if (isset($_SESSION['step'])) {
132
+ add_filter('wpcf7_ajax_json_echo', 'wh_hide_multistep_form', 10, 2);
133
+ }
134
+ }
135
+ add_action( 'wpcf7_before_send_mail', 'wh_cf7_before_mail', 8 );
136
+
module-hidden.php ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Included if Contact Form 7 Modules: Hidden Fields is not active.
4
+
5
+ Author: Katz Web Services, Inc.
6
+ Author URI: http://www.katzwebservices.com
7
+ Version: 1.2.1
8
+ */
9
+
10
+ /* Copyright 2011 Katz Web Services, Inc. (email: info at katzwebservices.com)
11
+
12
+ This program is free software; you can redistribute it and/or modify
13
+ it under the terms of the GNU General Public License as published by
14
+ the Free Software Foundation; either version 2 of the License, or
15
+ (at your option) any later version.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
+ */
26
+
27
+ /**
28
+ ** A base module for [hidden] and [hidden*]
29
+ **/
30
+
31
+
32
+ /* Shortcode handler */
33
+
34
+ add_filter('wpcf7_form_elements', 'wpcf7_form_elements_return_false');
35
+ function wpcf7_form_elements_return_false($form) {
36
+ $brform = preg_replace('/<p>(<input\stype="hidden"(?:.*?))<\/p>/isme', "'<div class=\'hidden\' style=\'display:none;\'>'.\"\n\".str_replace('<br>', '', str_replace('<br />', '', stripslashes_deep('\\1'))).\"\n\".'</div>'", $form);
37
+ return $brform;
38
+ }
39
+
40
+ add_action('plugins_loaded', 'contact_form_7_hidden_fields', 10);
41
+
42
+ function contact_form_7_hidden_fields() {
43
+ global $pagenow;
44
+ if(function_exists('wpcf7_add_shortcode')) {
45
+ wpcf7_add_shortcode( 'hidden', 'wpcf7_hidden_shortcode_handler', true );
46
+ wpcf7_add_shortcode( 'hidden*', 'wpcf7_hidden_shortcode_handler', true );
47
+ } else {
48
+ if($pagenow != 'plugins.php') { return; }
49
+ add_action('admin_notices', 'cfhiddenfieldserror');
50
+ wp_enqueue_script('thickbox');
51
+ function cfhiddenfieldserror() {
52
+ $out = '<div class="error" id="messages"><p>';
53
+ if(file_exists(WP_PLUGIN_DIR.'/contact-form-7/wp-contact-form-7.php')) {
54
+ $out .= 'The Contact Form 7 is installed, but <strong>you must activate Contact Form 7</strong> below for the Hidden Fields Module to work.';
55
+ } else {
56
+ $out .= 'The Contact Form 7 plugin must be installed for the Hidden Fields Module to work. <a href="'.admin_url('plugin-install.php?tab=plugin-information&plugin=contact-form-7&from=plugins&TB_iframe=true&width=600&height=550').'" class="thickbox" title="Contact Form 7">Install Now.</a>';
57
+ }
58
+ $out .= '</p></div>';
59
+ echo $out;
60
+ }
61
+ }
62
+ }
63
+
64
+ /**
65
+ ** A base module for [hidden], [hidden*]
66
+ **/
67
+
68
+ /* Shortcode handler */
69
+
70
+ function wpcf7_hidden_shortcode_handler( $tag ) {
71
+ if ( ! is_array( $tag ) )
72
+ return '';
73
+
74
+ $type = $tag['type'];
75
+ $name = $tag['name'];
76
+ $options = (array) $tag['options'];
77
+ $values = (array) $tag['values'];
78
+
79
+ if ( empty( $name ) )
80
+ return '';
81
+
82
+ $atts = '';
83
+ $id_att = '';
84
+ $class_att = '';
85
+ $size_att = '';
86
+ $maxlength_att = '';
87
+ $tabindex_att = '';
88
+ $title_att = '';
89
+
90
+ $class_att .= ' wpcf7-hidden';
91
+
92
+ if ( 'hidden*' == $type )
93
+ $class_att .= ' wpcf7-validates-as-required';
94
+
95
+ foreach ( $options as $option ) {
96
+ if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
97
+ $id_att = $matches[1];
98
+
99
+ } elseif ( preg_match( '%^class:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
100
+ $class_att .= ' ' . $matches[1];
101
+ }
102
+ }
103
+
104
+ $value = (string) reset( $values );
105
+
106
+ if ( wpcf7_script_is() && $value && preg_grep( '%^watermark$%', $options ) ) {
107
+ $class_att .= ' wpcf7-use-title-as-watermark';
108
+ $title_att .= sprintf( ' %s', $value );
109
+ $value = '';
110
+ }
111
+
112
+ if ( wpcf7_is_posted() )
113
+ $value = stripslashes_deep( $_POST[$name] );
114
+
115
+ if ( $id_att ) {
116
+ $id_att = trim( $id_att );
117
+ $atts .= ' id="' . trim( $id_att ) . '"';
118
+ }
119
+ if ( $class_att )
120
+ $atts .= ' class="' . trim( $class_att ) . '"';
121
+
122
+ global $post;
123
+ if(is_object($post)) {
124
+ if (strtolower($value) == 'post_title' || strtolower($value) == 'post-title') { $value = $post->post_title; }
125
+ if (strtolower($value) == 'post_url') { $value = $post->guid; }
126
+ if (strtolower($value) == 'post_category') {
127
+ $categories = get_the_category();$catnames = array();
128
+ foreach($categories as $cat) { $catnames[] = $cat->cat_name; }
129
+ if(is_array($catnames)) { $value = implode(', ', $catnames); }
130
+ }
131
+ if (strtolower($value) == 'post_author') { $value = $post->post_author; }
132
+ if (strtolower($value) == 'post_date') { $value = $post->post_date; }
133
+ if (preg_match('/^custom_field\-(.*?)$/ism', $value)) {
134
+ $custom_field = preg_replace('/custom_field\-(.*?)/ism', '$1', $value);
135
+ $value = get_post_meta($post->ID, $custom_field, true) ? get_post_meta($post->ID, $custom_field, true) : '';
136
+ }
137
+ }
138
+
139
+ $value = apply_filters('wpcf7_hidden_field_value', apply_filters('wpcf7_hidden_field_value_'.$id_att, $value));
140
+
141
+ $html = '<input type="hidden" name="' . $name . '" value="' . esc_attr( $value ) . '"' . $atts . ' />';
142
+
143
+ return $html;
144
+ }
145
+
146
+
147
+ /* Tag generator */
148
+
149
+ add_action( 'admin_init', 'wpcf7_add_tag_generator_hidden', 30 );
150
+
151
+ function wpcf7_add_tag_generator_hidden() {
152
+ if(function_exists('wpcf7_add_tag_generator')) {
153
+ wpcf7_add_tag_generator( 'hidden', __( 'Hidden field', 'wpcf7' ),
154
+ 'wpcf7-tg-pane-hidden', 'wpcf7_tg_pane_hidden' );
155
+ }
156
+ }
157
+
158
+ function wpcf7_tg_pane_hidden() {
159
+ ?>
160
+ <div id="wpcf7-tg-pane-hidden" class="hidden">
161
+ <form action="">
162
+
163
+ <table>
164
+ <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
165
+
166
+ <tr>
167
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
168
+ <input type="text" name="id" class="idvalue oneline option" /></td>
169
+ </tr>
170
+
171
+ <tr>
172
+ <td><?php echo esc_html( __( 'Default value', 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>
173
+
174
+ <td>
175
+ <br /><input type="checkbox" name="watermark" class="option" />&nbsp;<?php echo esc_html( __( 'Use this text as watermark?', 'wpcf7' ) ); ?>
176
+ </td>
177
+ </tr>
178
+ </table>
179
+
180
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="hidden" class="tag" readonly="readonly" onfocus="this.select()" /></div>
181
+
182
+ <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'wpcf7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
183
+ </form>
184
+ </div>
185
+ <?php
186
+ }
187
+ ?>
module-session.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Copyright 2012 Webhead LLC (email: info at webheadcoder.com)
3
+
4
+ This program is free software; you can redistribute it and/or
5
+ modify it under the terms of the GNU General Public License
6
+ as published by the Free Software Foundation; either version 2
7
+ of the License, or (at your option) any later version.
8
+
9
+ This program is distributed in the hope that it will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ GNU General Public License for more details.
13
+
14
+ You should have received a copy of the GNU General Public License
15
+ along with this program; if not, write to the Free Software
16
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
+
18
+ */
19
+
20
+ add_action('plugins_loaded', 'contact_form_7_form_codes', 10);
21
+
22
+ function contact_form_7_form_codes() {
23
+ global $pagenow;
24
+ if(function_exists('wpcf7_add_shortcode')) {
25
+ wpcf7_add_shortcode( 'form', 'wpcf7_form_shortcode_handler', true );
26
+ wpcf7_add_shortcode( 'form*', 'wpcf7_form_shortcode_handler', true );
27
+ } else {
28
+ if($pagenow != 'plugins.php') { return; }
29
+ add_action('admin_notices', 'cfformfieldserror');
30
+ wp_enqueue_script('thickbox');
31
+ function cfformfieldserror() {
32
+ $out = '<div class="error" id="messages"><p>';
33
+ if(file_exists(WP_PLUGIN_DIR.'/contact-form-7/wp-contact-form-7.php')) {
34
+ $out .= 'The Contact Form 7 is installed, but <strong>you must activate Contact Form 7</strong> below for the [form] code to work.';
35
+ } else {
36
+ $out .= 'The Contact Form 7 plugin must be installed for the Form Display code to work. <a href="'.admin_url('plugin-install.php?tab=plugin-information&plugin=contact-form-7&from=plugins&TB_iframe=true&width=600&height=550').'" class="thickbox" title="Contact Form 7">Install Now.</a>';
37
+ }
38
+ $out .= '</p></div>';
39
+ echo $out;
40
+ }
41
+ }
42
+ }
43
+
44
+ /* Shortcode handler */
45
+
46
+ function wpcf7_form_shortcode_handler( $tag ) {
47
+ if ( ! is_array( $tag ) )
48
+ return '';
49
+ $type = $tag['type'];
50
+ $name = $tag['name'];
51
+ $options = (array) $tag['options'];
52
+ $values = (array) $tag['values'];
53
+
54
+ if ( empty( $name ) )
55
+ return '';
56
+
57
+ $atts = '';
58
+ $id_att = '';
59
+ $class_att = '';
60
+ $size_att = '';
61
+ $maxlength_att = '';
62
+ $tabindex_att = '';
63
+ $title_att = '';
64
+
65
+ $class_att .= ' wpcf7-form';
66
+
67
+ foreach ( $options as $option ) {
68
+ if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
69
+ $id_att = $matches[1];
70
+ }
71
+ }
72
+
73
+ if ( $id_att ) {
74
+ $id_att = trim( $id_att );
75
+ }
76
+
77
+ //return raw value, let filters sanitize if needed.
78
+ $value = isset($_SESSION['cf7_posted_data'][$name])?$_SESSION['cf7_posted_data'][$name]:'';
79
+ if (is_array($value)) {
80
+ $value = implode(", ", $value);
81
+ }
82
+ $value = apply_filters('wpcf7_form_field_value', apply_filters('wpcf7_form_field_value_'.$id_att, $value));
83
+
84
+ return $value;
85
+ }
86
+
87
+
88
+ /* Tag generator */
89
+
90
+ add_action( 'admin_init', 'wpcf7_add_tag_generator_form', 30 );
91
+
92
+ function wpcf7_add_tag_generator_form() {
93
+ if(function_exists('wpcf7_add_tag_generator')) {
94
+ wpcf7_add_tag_generator( 'form', __( 'Form value', 'wpcf7' ),
95
+ 'wpcf7-tg-pane-form', 'wpcf7_tg_pane_form' );
96
+ }
97
+ }
98
+
99
+ function wpcf7_tg_pane_form() {
100
+ ?>
101
+ <div id="wpcf7-tg-pane-form" class="hidden">
102
+ <form action="">
103
+
104
+ <table>
105
+ <tr><td><?php echo esc_html( __( 'Name of previous form field', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
106
+
107
+ <tr>
108
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
109
+ <input type="text" name="id" class="idvalue oneline option" /></td>
110
+ </tr>
111
+ </table>
112
+
113
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="form" class="tag" readonly="readonly" onfocus="this.select()" /></div>
114
+
115
+ <div class="tg-mail-tag"><?php echo esc_html( __( "Mail fields currently not supported.", 'wpcf7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" readonly="readonly" /></div>
116
+ </form>
117
+ </div>
118
+ <?php
119
+ }
120
+ ?>
readme.txt ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Plugin Name ===
2
+ Contributors: webheadllc
3
+ Tags: contact form 7, multistep form, form, multiple pages, store form
4
+ Requires at least: 3.4.1
5
+ Tested up to: 3.5.1
6
+ Stable tag: 1.0
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
11
+
12
+ == Description ==
13
+
14
+ I needed a contact form that spanned across multiple pages and in the end would send an email with all the info collected. This plugin does just that. This plugin requires the Contact Form 7 Wordpress plugin.
15
+
16
+ **Usage**
17
+ 1. Create a contact form 7 form as you normally would.
18
+ 1. Add a hidden tag named "step" with the value being the current step dash ("-") total steps. If you have a 5-step form and you are creating the first step, the hidden field would look like:
19
+ [hidden step "1-5"]
20
+ the last step, would look like:
21
+ [hidden step "5-5"]
22
+ 1. In the "Additional Settings" textarea at the bottom of the form editing page, add in the location of the next form.
23
+ If the next form is located on My2ndPage on example.com you would add the following to the "Additional Settings" textarea:
24
+ on_sent_ok: "location.replace('http://example.com/My2ndPage/');"
25
+ 1. Repeat steps 1 - 3. On the form that will actually send a email, do not do step 3 unless you want the form to redirect
26
+ the user to another page.
27
+
28
+ In a contact form, to retrieve fields from previous forms you can use something like [form your-email] where "your-email" is the name of the field from the previous form. This would be useful on the last step where it is confirming all the info from previous forms.
29
+
30
+ **Additional Info**
31
+ The hidden field is taken directly from the "Contact Form 7 Modules". If you have that installed, the Multi-Step plugin will use that.
32
+
33
+ == Frequently Asked Questions ==
34
+
35
+ = Why did you do this? =
36
+
37
+ I have used countless free plugins and have saved countless hours. I could not find any plugin that does multi page forms, but have seen a few requests for it. I decided to give some hours back.
38
+
39
+
40
+ == Changelog ==
41
+
42
+ = 1.0 =
43
+ Initial release.