Version Description
Fix previous button not showing class attribute.
Download this release
Release Info
Developer | webheadllc |
Plugin | Contact Form 7 Multi-Step Forms |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.0.2
- contact-form-7-multi-step-module.php +2 -2
- form-tags/module-back.php +4 -7
- readme.txt +34 -30
contact-form-7-multi-step-module.php
CHANGED
@@ -5,7 +5,7 @@ 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: 2.0.
|
9 |
*/
|
10 |
/* Copyright 2012 Webhead LLC (email: info at webheadcoder.com)
|
11 |
|
@@ -24,7 +24,7 @@ Version: 2.0.1
|
|
24 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
25 |
*/
|
26 |
|
27 |
-
define( 'CF7MSM_VERSION', '2.0.
|
28 |
define( 'CF7MSM_PLUGIN', __FILE__ );
|
29 |
define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
|
30 |
define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
|
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: 2.0.2
|
9 |
*/
|
10 |
/* Copyright 2012 Webhead LLC (email: info at webheadcoder.com)
|
11 |
|
24 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
25 |
*/
|
26 |
|
27 |
+
define( 'CF7MSM_VERSION', '2.0.2' );
|
28 |
define( 'CF7MSM_PLUGIN', __FILE__ );
|
29 |
define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
|
30 |
define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
|
form-tags/module-back.php
CHANGED
@@ -24,8 +24,7 @@ function cf7msm_add_shortcode_back() {
|
|
24 |
if (function_exists('wpcf7_add_shortcode')) {
|
25 |
wpcf7_add_shortcode(
|
26 |
array( 'back', 'previous' ),
|
27 |
-
'cf7msm_back_shortcode_handler'
|
28 |
-
true
|
29 |
);
|
30 |
}
|
31 |
}
|
@@ -44,7 +43,7 @@ function cf7msm_back_shortcode_handler( $tag ) {
|
|
44 |
$atts = array();
|
45 |
|
46 |
$atts['class'] = $tag->get_class_option( $class );
|
47 |
-
|
48 |
$atts['tabindex'] = $tag->get_option( 'tabindex', 'int', true );
|
49 |
|
50 |
$value = isset( $tag->values[0] ) ? $tag->values[0] : '';
|
@@ -75,16 +74,14 @@ function cf7msm_back_shortcode_handler( $tag ) {
|
|
75 |
function cf7msm_add_tag_generator_back() {
|
76 |
if ( class_exists( 'WPCF7_TagGenerator' ) ) {
|
77 |
$tag_generator = WPCF7_TagGenerator::get_instance();
|
78 |
-
$tag_generator->add( 'previous', __( 'previous', 'cf7msm' ),
|
|
|
79 |
}
|
80 |
else if ( function_exists( 'wpcf7_add_tag_generator' ) ) {
|
81 |
wpcf7_add_tag_generator( 'back', __( 'Back button', 'wpcf7' ),
|
82 |
'wpcf7-cf7msm-back', 'wpcf7_cf7msm_back', array( 'nameless' => 1 ) );
|
83 |
}
|
84 |
}
|
85 |
-
add_action( 'admin_init', 'cf7msm_add_tag_generator_back', 30 );
|
86 |
-
|
87 |
-
|
88 |
add_action( 'admin_init', 'cf7msm_add_tag_generator_back', 55 );
|
89 |
|
90 |
|
24 |
if (function_exists('wpcf7_add_shortcode')) {
|
25 |
wpcf7_add_shortcode(
|
26 |
array( 'back', 'previous' ),
|
27 |
+
'cf7msm_back_shortcode_handler'
|
|
|
28 |
);
|
29 |
}
|
30 |
}
|
43 |
$atts = array();
|
44 |
|
45 |
$atts['class'] = $tag->get_class_option( $class );
|
46 |
+
$atts['id'] = $tag->get_id_option();
|
47 |
$atts['tabindex'] = $tag->get_option( 'tabindex', 'int', true );
|
48 |
|
49 |
$value = isset( $tag->values[0] ) ? $tag->values[0] : '';
|
74 |
function cf7msm_add_tag_generator_back() {
|
75 |
if ( class_exists( 'WPCF7_TagGenerator' ) ) {
|
76 |
$tag_generator = WPCF7_TagGenerator::get_instance();
|
77 |
+
$tag_generator->add( 'previous', __( 'previous', 'cf7msm' ),
|
78 |
+
'cf7msm_previous_tag_pane', array( 'nameless' => 1 ) );
|
79 |
}
|
80 |
else if ( function_exists( 'wpcf7_add_tag_generator' ) ) {
|
81 |
wpcf7_add_tag_generator( 'back', __( 'Back button', 'wpcf7' ),
|
82 |
'wpcf7-cf7msm-back', 'wpcf7_cf7msm_back', array( 'nameless' => 1 ) );
|
83 |
}
|
84 |
}
|
|
|
|
|
|
|
85 |
add_action( 'admin_init', 'cf7msm_add_tag_generator_back', 55 );
|
86 |
|
87 |
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: webheadllc
|
3 |
Donate Link: http://webheadcoder.com/donate-cf7-multi-step-forms
|
4 |
-
Tags: contact form 7, multistep form, form, multiple pages, store form
|
5 |
Requires at least: 3.4.1
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -18,19 +18,25 @@ Sample of this working is at [http://webheadcoder.com/contact-form-7-multi-step-
|
|
18 |
|
19 |
**Usage**
|
20 |
|
21 |
-
1. Create
|
|
|
|
|
22 |
|
23 |
1. Place your cursor at the end of the form.
|
24 |
|
25 |
1. On the "Form" tab of the Contact Form 7 form, click on the button named "multistep".
|
26 |
|
27 |
-
1. In the popup, type in the current step and total steps in your multi-step process. For example, if this is the first form in a total of 3 forms, type in "1" for Current Step and "3" in Total Steps.
|
28 |
|
29 |
-
1. The Next Page URL is the url that contains your next form. If this form is the last step, you can leave
|
30 |
|
31 |
1. Click "Insert Tag"
|
32 |
|
33 |
-
1.
|
|
|
|
|
|
|
|
|
34 |
|
35 |
|
36 |
**Additional Tags**
|
@@ -48,52 +54,50 @@ Sample of this working is at [http://webheadcoder.com/contact-form-7-multi-step-
|
|
48 |
* This plugin does not support large forms with many steps. See [http://webheadcoder.com/too-many-cookies/](http://webheadcoder.com/too-many-cookies/) for more details and suggestions.
|
49 |
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
The instructions below are only for older versions of the plugin. This is only kept here for reference and will be removed in the next release.
|
54 |
-
|
55 |
-
1. Create a contact form 7 form as you normally would.
|
56 |
|
57 |
-
1. Add a hidden tag named "step" with the value being <current_step>-<total-steps>. For example, if you have a 5-step form and you are creating the first step, the form would need: `[hidden step "1-5"]`. The last form in this example would need: `[hidden step "5-5"]`
|
58 |
|
59 |
-
|
60 |
-
If the next form is located on my-second-page on example.com you would add the following all on one line to "Additional Settings": `on_sent_ok: "location.replace('http://example.com/my-second-page/');"`
|
61 |
|
62 |
-
|
63 |
-
the user to another page.
|
64 |
|
65 |
-
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.
|
66 |
|
67 |
-
|
68 |
|
69 |
-
|
70 |
|
71 |
|
|
|
72 |
|
|
|
|
|
73 |
|
74 |
-
|
75 |
|
|
|
76 |
|
77 |
-
=
|
78 |
|
79 |
-
|
|
|
80 |
|
81 |
|
82 |
-
=
|
83 |
|
84 |
-
|
85 |
|
|
|
86 |
|
87 |
-
=
|
88 |
|
89 |
-
|
90 |
|
91 |
-
= My form values aren't being sent in the email. I get [multiform "your-name"] instead of the actual person's name. =
|
92 |
|
93 |
-
|
94 |
|
|
|
|
|
95 |
|
96 |
-
== Changelog ==
|
97 |
|
98 |
= 2.0.1 =
|
99 |
Minor fix to detecting if previous form was filled.
|
1 |
=== Plugin Name ===
|
2 |
Contributors: webheadllc
|
3 |
Donate Link: http://webheadcoder.com/donate-cf7-multi-step-forms
|
4 |
+
Tags: contact form 7, multistep form, form, multiple pages, store form, contact, multi, step
|
5 |
Requires at least: 3.4.1
|
6 |
+
Tested up to: 4.5
|
7 |
+
Stable tag: 2.0.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
18 |
|
19 |
**Usage**
|
20 |
|
21 |
+
1. Create one page or post for each step in your multi-step form process. If you have 3 steps, create 3 pages/posts. You will need the urls to these when creating your forms.
|
22 |
+
|
23 |
+
1. Create a Contact Form 7 form.
|
24 |
|
25 |
1. Place your cursor at the end of the form.
|
26 |
|
27 |
1. On the "Form" tab of the Contact Form 7 form, click on the button named "multistep".
|
28 |
|
29 |
+
1. In the popup, type in the current step and total steps in your multi-step process. For example, if this is the first form in a total of 3 forms, type in "1" for Current Step and "3" in Total Steps. If this is the last form in your process, type in "3" for current Step and "3" in Total Steps.
|
30 |
|
31 |
+
1. The Next Page URL is the url that contains your next form. If this form is the last step, you can leave the URL field blank or fill it in to redirect the user to some other page.
|
32 |
|
33 |
1. Click "Insert Tag"
|
34 |
|
35 |
+
1. Save your completed form and place the form's shortcode into the appropriate Page/Post you created in step 1.
|
36 |
+
|
37 |
+
1. Repeat for **each form** in your multi-step form process.
|
38 |
+
|
39 |
+
1. Only the final step will send an email. To include fields from your other forms simply enter the mail-tags from the other forms. For example if your first form has the field `your-email` you can include `[your-email]` in the Mail tab on the last form.
|
40 |
|
41 |
|
42 |
**Additional Tags**
|
54 |
* This plugin does not support large forms with many steps. See [http://webheadcoder.com/too-many-cookies/](http://webheadcoder.com/too-many-cookies/) for more details and suggestions.
|
55 |
|
56 |
|
57 |
+
== Frequently Asked Questions ==
|
|
|
|
|
|
|
|
|
58 |
|
|
|
59 |
|
60 |
+
= Why "place your cursor at the end of the form" before inserting the multistep tag? =
|
|
|
61 |
|
62 |
+
The `multistep` form tag is a hidden field and tries not to add any spacing to your form. In this effort, anything directly after this tag may be hidden. To prevent this, add a carriage return after the `multistep` form tag, or just follow the directions and place the form tag at the end of the form.
|
|
|
63 |
|
|
|
64 |
|
65 |
+
= I keep getting the "Please fill out the form on the previous page" message. What's wrong? =
|
66 |
|
67 |
+
If you have everything set up correctly and you get a message saying, "Please fill out the form on the previous page" after submitting the first form, then it's probably your caching system not allowing cookies to be set in the normal way. No workarounds or fixes are planned at this time. You will need to turn off caching for the affected pages.
|
68 |
|
69 |
|
70 |
+
= How can I show a summary of what the user entered or show fields from previous steps? =
|
71 |
|
72 |
+
`[multiform "your-name"]`
|
73 |
+
The multiform form-tag can be used to display a field from a previous step. Replace `your-name` with the name of your field.
|
74 |
|
75 |
+
= My form values aren't being sent in the email. I get [multiform "your-name"] instead of the actual person's name. =
|
76 |
|
77 |
+
The multiform form-tag should only be used on the Form tab. On the Mail tab follow the instructions from the Contact Fom 7 documentation. So if you wanted to show the `your-name` field, type `[your-name]`.
|
78 |
|
79 |
+
= Can I have an email sent on the first step of the multi-step forms? =
|
80 |
|
81 |
+
Yes, you can, but it requires you to add code to your theme's functions.php file. See this forum post for more details:
|
82 |
+
[https://wordpress.org/support/topic/send-auto-responder-on-step-one-of-multi-step-1?replies=6](https://wordpress.org/support/topic/send-auto-responder-on-step-one-of-multi-step-1?replies=6)
|
83 |
|
84 |
|
85 |
+
= My forms are not working as expected. What's wrong? =
|
86 |
|
87 |
+
- Make sure you have the `multi-step` tag on each and every form.
|
88 |
|
89 |
+
- It is very common for other plugins to have javascript errors which can prevent this plugin from running properly. Deactivate all other plugins and try again.
|
90 |
|
91 |
+
= Previous button leads to 'undefined' =
|
92 |
|
93 |
+
This is caused by a multistep form tag not having the correct step. For example your form for step 2 of 3 may have `[multistep "1-3-http://a.com/step-3"]`, but instead it should be `[multistep "2-3-http://a.com/step-3"]`.
|
94 |
|
|
|
95 |
|
96 |
+
== Changelog ==
|
97 |
|
98 |
+
= 2.0.2 =
|
99 |
+
Fix previous button not showing class attribute.
|
100 |
|
|
|
101 |
|
102 |
= 2.0.1 =
|
103 |
Minor fix to detecting if previous form was filled.
|