Version Description
- Switched header argument of wp_mail over to a filter to remove any potential conflicts with other emailing plugins or themes
- The ability to set a different recipient email address. Previously all email was sent to the WordPress administrator email address.
- Allow the email subject to be customised.
Download this release
Release Info
Developer | megnicholas |
Plugin | Contact Form Clean and Simple |
Version | 4.0.9 |
Comparing to | |
See all releases |
Code changes from version 4.0.8 to 4.0.9
- class.cff_filters.php +28 -0
- class.cff_pluginsettings.php +15 -0
- class.cff_settings.php +70 -13
- clean-and-simple-contact-form-by-meg-nicholas.php +3 -2
- readme.txt +17 -2
- shortcodes/contact-form.php +12 -2
- views/contact-form-with-recaptcha.view.php +6 -4
- views/contact-form.view.php +2 -2
class.cff_filters.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Add and remove filters as we need in order to play nicely
|
5 |
+
*/
|
6 |
+
|
7 |
+
class cff_Filters {
|
8 |
+
|
9 |
+
var $fromEmail;
|
10 |
+
var $fromName;
|
11 |
+
|
12 |
+
function wp_mail_from () {
|
13 |
+
return $this->fromEmail;
|
14 |
+
}
|
15 |
+
|
16 |
+
function wp_mail_from_name () {
|
17 |
+
return $this->fromName;
|
18 |
+
}
|
19 |
+
|
20 |
+
function add($filter, $priority = 10, $args = 1) {
|
21 |
+
add_filter ($filter, array($this,$filter),$priority,$args);
|
22 |
+
}
|
23 |
+
|
24 |
+
function remove($filter, $priority = 10, $args = 1) {
|
25 |
+
remove_filter ($filter, array($this,$filter),$priority,$args);
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
class.cff_pluginsettings.php
CHANGED
@@ -67,5 +67,20 @@ class cff_PluginSettings
|
|
67 |
|
68 |
return isset($options['use_client_validation']) ? $options['use_client_validation'] : true;
|
69 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
67 |
|
68 |
return isset($options['use_client_validation']) ? $options['use_client_validation'] : true;
|
69 |
}
|
70 |
+
static
|
71 |
+
function RecipientEmail()
|
72 |
+
{
|
73 |
+
$options = get_option('cff_options');
|
74 |
+
|
75 |
+
return isset($options['recipient_email']) ? $options['recipient_email'] : get_bloginfo('admin_email');
|
76 |
+
}
|
77 |
+
|
78 |
+
static
|
79 |
+
function Subject()
|
80 |
+
{
|
81 |
+
$options = get_option('cff_options');
|
82 |
+
|
83 |
+
return isset($options['subject']) ? $options['subject'] : get_bloginfo('name') . ' - Web Enquiry';
|
84 |
+
}
|
85 |
}
|
86 |
|
class.cff_settings.php
CHANGED
@@ -40,15 +40,24 @@ class cff_settings
|
|
40 |
<?php screen_icon(); ?>
|
41 |
<h2> Clean and Simple Contact Form Settings</h2>
|
42 |
<hr/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
<form method="post" action="options.php">
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
48 |
settings_fields('test_option_group');
|
49 |
do_settings_sections('contact-form-settings');
|
50 |
-
|
51 |
-
|
|
|
52 |
</form>
|
53 |
</div>
|
54 |
<?php
|
@@ -92,6 +101,18 @@ class cff_settings
|
|
92 |
$this,
|
93 |
'print_section_info_message'
|
94 |
) , 'contact-form-settings');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
add_settings_field('message', 'Message : ', array(
|
96 |
$this,
|
97 |
'create_fields'
|
@@ -132,30 +153,60 @@ class cff_settings
|
|
132 |
{
|
133 |
$options = get_option(CFF_OPTIONS_KEY);
|
134 |
|
|
|
135 |
if (isset($input['use_recaptcha']))
|
136 |
-
{
|
137 |
$options['use_recaptcha'] = true;
|
138 |
-
}
|
139 |
else
|
140 |
-
{
|
141 |
unset($options['use_recaptcha']);
|
142 |
-
}
|
143 |
|
|
|
144 |
if (isset($input['theme'])) $options['theme'] = filter_var($input['theme'], FILTER_SANITIZE_STRING);
|
145 |
|
|
|
146 |
if (isset($input['recaptcha_public_key'])) $options['recaptcha_public_key'] = filter_var($input['recaptcha_public_key'], FILTER_SANITIZE_STRING);
|
147 |
|
|
|
148 |
if (isset($input['recaptcha_private_key'])) $options['recaptcha_private_key'] = filter_var($input['recaptcha_private_key'], FILTER_SANITIZE_STRING);
|
|
|
|
|
149 |
$options['sent_message_heading'] = filter_var($input['sent_message_heading'], FILTER_SANITIZE_STRING);
|
|
|
|
|
150 |
$options['sent_message_body'] = filter_var($input['sent_message_body'], FILTER_SANITIZE_STRING);
|
|
|
|
|
151 |
$options['message'] = filter_var($input['message'], FILTER_SANITIZE_STRING);
|
152 |
|
153 |
-
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
-
|
157 |
-
else $options['use_client_validation'] = false;
|
158 |
update_option(CFF_OPTIONS_KEY, $options);
|
|
|
|
|
159 |
|
160 |
return $input;
|
161 |
}
|
@@ -199,6 +250,12 @@ class cff_settings
|
|
199 |
case 'recaptcha_private_key':
|
200 |
$disabled = cff_PluginSettings::UseRecaptcha() == false ? "disabled" : "";
|
201 |
?><input <?php echo $disabled; ?> type="text" size="60" id="recaptcha_private_key" name="array_key[recaptcha_private_key]" value="<?=cff_PluginSettings::PrivateKey(); ?>" /><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
break;
|
203 |
case 'sent_message_heading':
|
204 |
?><input type="text" size="60" id="sent_message_heading" name="array_key[sent_message_heading]" value="<?=cff_PluginSettings::SentMessageHeading(); ?>" /><?php
|
40 |
<?php screen_icon(); ?>
|
41 |
<h2> Clean and Simple Contact Form Settings</h2>
|
42 |
<hr/>
|
43 |
+
<p>You are using version <?php echo CFF_VERSION_NUM;?></p>
|
44 |
+
<p>If you find this plugin useful please consider
|
45 |
+
<a target="_blank"
|
46 |
+
href="http://wordpress.org/support/view/plugin-reviews/<?php echo CFF_PLUGIN_NAME; ?>">
|
47 |
+
leaving a review
|
48 |
+
</a>
|
49 |
+
. Thank you!
|
50 |
+
</p>
|
51 |
<form method="post" action="options.php">
|
52 |
+
<?
|
53 |
+
submit_button();
|
54 |
|
55 |
+
/* This prints out all hidden setting fields*/
|
56 |
settings_fields('test_option_group');
|
57 |
do_settings_sections('contact-form-settings');
|
58 |
+
|
59 |
+
submit_button();
|
60 |
+
?>
|
61 |
</form>
|
62 |
</div>
|
63 |
<?php
|
101 |
$this,
|
102 |
'print_section_info_message'
|
103 |
) , 'contact-form-settings');
|
104 |
+
add_settings_field('recipient_email', 'Recipient Email : ', array(
|
105 |
+
$this,
|
106 |
+
'create_fields'
|
107 |
+
) , 'contact-form-settings', 'section_message', array(
|
108 |
+
'recipient_email'
|
109 |
+
));
|
110 |
+
add_settings_field('subject', 'Email Subject: ', array(
|
111 |
+
$this,
|
112 |
+
'create_fields'
|
113 |
+
) , 'contact-form-settings', 'section_message', array(
|
114 |
+
'subject'
|
115 |
+
));
|
116 |
add_settings_field('message', 'Message : ', array(
|
117 |
$this,
|
118 |
'create_fields'
|
153 |
{
|
154 |
$options = get_option(CFF_OPTIONS_KEY);
|
155 |
|
156 |
+
//use_recaptcha
|
157 |
if (isset($input['use_recaptcha']))
|
|
|
158 |
$options['use_recaptcha'] = true;
|
|
|
159 |
else
|
|
|
160 |
unset($options['use_recaptcha']);
|
|
|
161 |
|
162 |
+
//recaptcha theme
|
163 |
if (isset($input['theme'])) $options['theme'] = filter_var($input['theme'], FILTER_SANITIZE_STRING);
|
164 |
|
165 |
+
//recaptcha_public_key
|
166 |
if (isset($input['recaptcha_public_key'])) $options['recaptcha_public_key'] = filter_var($input['recaptcha_public_key'], FILTER_SANITIZE_STRING);
|
167 |
|
168 |
+
//recaptcha_private_key
|
169 |
if (isset($input['recaptcha_private_key'])) $options['recaptcha_private_key'] = filter_var($input['recaptcha_private_key'], FILTER_SANITIZE_STRING);
|
170 |
+
|
171 |
+
//sent_message_heading
|
172 |
$options['sent_message_heading'] = filter_var($input['sent_message_heading'], FILTER_SANITIZE_STRING);
|
173 |
+
|
174 |
+
//sent_message_body
|
175 |
$options['sent_message_body'] = filter_var($input['sent_message_body'], FILTER_SANITIZE_STRING);
|
176 |
+
|
177 |
+
//message
|
178 |
$options['message'] = filter_var($input['message'], FILTER_SANITIZE_STRING);
|
179 |
|
180 |
+
//load_stylesheet
|
181 |
+
if (isset($input['load_stylesheet']))
|
182 |
+
$options['load_stylesheet'] = true;
|
183 |
+
else
|
184 |
+
$options['load_stylesheet'] = false;
|
185 |
+
|
186 |
+
//use_client_validation
|
187 |
+
if (isset($input['use_client_validation']))
|
188 |
+
$options['use_client_validation'] = true;
|
189 |
+
else
|
190 |
+
$options['use_client_validation'] = false;
|
191 |
+
|
192 |
+
//recipient_email
|
193 |
+
if (!filter_var($input['recipient_email'], FILTER_VALIDATE_EMAIL)) {
|
194 |
+
unset($options['recipient_email']);
|
195 |
+
}
|
196 |
+
else {
|
197 |
+
$options['recipient_email']=$input['recipient_email'];
|
198 |
+
}
|
199 |
+
|
200 |
+
//subject
|
201 |
+
$options['subject'] = trim(filter_var($input['subject'], FILTER_SANITIZE_STRING));
|
202 |
+
if ( empty($options['subject']) ) {
|
203 |
+
unset($options['subject']);
|
204 |
+
}
|
205 |
|
206 |
+
//update the options
|
|
|
207 |
update_option(CFF_OPTIONS_KEY, $options);
|
208 |
+
|
209 |
+
|
210 |
|
211 |
return $input;
|
212 |
}
|
250 |
case 'recaptcha_private_key':
|
251 |
$disabled = cff_PluginSettings::UseRecaptcha() == false ? "disabled" : "";
|
252 |
?><input <?php echo $disabled; ?> type="text" size="60" id="recaptcha_private_key" name="array_key[recaptcha_private_key]" value="<?=cff_PluginSettings::PrivateKey(); ?>" /><?php
|
253 |
+
break;
|
254 |
+
case 'recipient_email':
|
255 |
+
?><input type="text" size="60" id="recipient_email" name="array_key[recipient_email]" value="<?=cff_PluginSettings::RecipientEmail(); ?>" /><?php
|
256 |
+
break;
|
257 |
+
case 'subject':
|
258 |
+
?><input type="text" size="60" id="subject" name="array_key[subject]" value="<?=cff_PluginSettings::Subject(); ?>" /><?php
|
259 |
break;
|
260 |
case 'sent_message_heading':
|
261 |
?><input type="text" size="60" id="sent_message_heading" name="array_key[sent_message_heading]" value="<?=cff_PluginSettings::SentMessageHeading(); ?>" /><?php
|
clean-and-simple-contact-form-by-meg-nicholas.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
Plugin Name: Clean and Simple Contact Form
|
8 |
Plugin URI: http://www.megnicholas.co.uk/wordpress-plugins/clean-and-simple-contact-form
|
9 |
Description: A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
|
10 |
-
Version: 4.0.
|
11 |
Author: Meghan Nicholas
|
12 |
Author URI: http://www.megnicholas.co.uk
|
13 |
License: GPLv2 or later
|
@@ -38,6 +38,7 @@ include ('class.cff_pluginsettings.php');
|
|
38 |
include ('class.cff_settings.php');
|
39 |
include ('class.cff_contact.php');
|
40 |
include ('class.view.php');
|
|
|
41 |
|
42 |
if (cff_PluginSettings::UseRecaptcha()) include ('recaptcha-php-1.11/recaptchalib.php');
|
43 |
|
@@ -51,7 +52,7 @@ if (!defined('CFF_PLUGIN_URL')) define('CFF_PLUGIN_URL', WP_PLUGIN_URL . '/' . C
|
|
51 |
|
52 |
if (!defined('CFF_VERSION_KEY')) define('CFF_VERSION_KEY', 'cff_version');
|
53 |
|
54 |
-
if (!defined('CFF_VERSION_NUM')) define('CFF_VERSION_NUM', '4.0.
|
55 |
|
56 |
if (!defined('CFF_OPTIONS_KEY')) define('CFF_OPTIONS_KEY', 'cff_options');
|
57 |
|
7 |
Plugin Name: Clean and Simple Contact Form
|
8 |
Plugin URI: http://www.megnicholas.co.uk/wordpress-plugins/clean-and-simple-contact-form
|
9 |
Description: A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
|
10 |
+
Version: 4.0.9
|
11 |
Author: Meghan Nicholas
|
12 |
Author URI: http://www.megnicholas.co.uk
|
13 |
License: GPLv2 or later
|
38 |
include ('class.cff_settings.php');
|
39 |
include ('class.cff_contact.php');
|
40 |
include ('class.view.php');
|
41 |
+
include ('class.cff_filters.php');
|
42 |
|
43 |
if (cff_PluginSettings::UseRecaptcha()) include ('recaptcha-php-1.11/recaptchalib.php');
|
44 |
|
52 |
|
53 |
if (!defined('CFF_VERSION_KEY')) define('CFF_VERSION_KEY', 'cff_version');
|
54 |
|
55 |
+
if (!defined('CFF_VERSION_NUM')) define('CFF_VERSION_NUM', '4.0.9');
|
56 |
|
57 |
if (!defined('CFF_OPTIONS_KEY')) define('CFF_OPTIONS_KEY', 'cff_options');
|
58 |
|
readme.txt
CHANGED
@@ -3,10 +3,10 @@ Contributors: MegNicholas
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AKQM4KSBQ4H66
|
4 |
License: GPLv2 or later
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
-
Tags: simple, contact, form, bootstrap, twitter, google, reCAPTCHA, ajax, secure
|
7 |
Requires at least: 3.3
|
8 |
Tested up to: 3.5
|
9 |
-
Stable tag: 4.0.
|
10 |
|
11 |
A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
|
12 |
|
@@ -94,20 +94,33 @@ Here is a list of things that you can change
|
|
94 |
|
95 |
* **reCAPTCHA Theme**: Here you can change the reCAPTCHA box theme so that it fits with the style of your website.
|
96 |
|
|
|
|
|
|
|
|
|
97 |
== Screenshots ==
|
98 |
1. Contact Form With reCAPTCHA
|
99 |
2. Contact Form Without reCAPTCHA
|
100 |
3. Message Sent
|
101 |
4. Contact Form Options Screen
|
|
|
102 |
|
103 |
== Demo ==
|
104 |
This is a demonstration of this plugin working on the default Twenty Twelve theme ->
|
105 |
[Clean and Simple Contact Form Demonstration](http://demo.megnicholas.co.uk/wordpress-clean-and-simple-contact-form "Plugin Demonstration")
|
106 |
|
|
|
|
|
|
|
|
|
107 |
== Frequently Asked Questions ==
|
108 |
A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
|
109 |
|
110 |
== Changelog ==
|
|
|
|
|
|
|
|
|
111 |
= 4.0.8 =
|
112 |
* Fixed a bug: When using reCAPTCHA ajax did not work.
|
113 |
* Fixed a bug: Ajax validation was not checking email address were equal (server side was doing it instead)
|
@@ -119,6 +132,8 @@ A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap mark
|
|
119 |
|
120 |
|
121 |
== Upgrade Notice ==
|
|
|
|
|
122 |
= 4.0.8 =
|
123 |
Ajax now works when your form has reCAPTCHA on it. Ajax validation is now cleaner.
|
124 |
= 4.0.7 =
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AKQM4KSBQ4H66
|
4 |
License: GPLv2 or later
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
+
Tags: simple, contact, form, contact button, contact form, contact form plugin, contacts, contacts form plugin, contact me, feedback form, bootstrap, twitter, google, reCAPTCHA, ajax, secure
|
7 |
Requires at least: 3.3
|
8 |
Tested up to: 3.5
|
9 |
+
Stable tag: 4.0.9
|
10 |
|
11 |
A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
|
12 |
|
94 |
|
95 |
* **reCAPTCHA Theme**: Here you can change the reCAPTCHA box theme so that it fits with the style of your website.
|
96 |
|
97 |
+
* **!NEW! Recipient Email**: The email address where you would like all messages to be sent. This will default to the email address you have specified under 'E-Mail Address' in your WordPress General Settings. If you want your mail sent to a different address then enter it here.
|
98 |
+
|
99 |
+
* **!NEW! Email Subject**: This is the email subject that will appear on all messages. If you would like to set it to something different then enter it here.
|
100 |
+
|
101 |
== Screenshots ==
|
102 |
1. Contact Form With reCAPTCHA
|
103 |
2. Contact Form Without reCAPTCHA
|
104 |
3. Message Sent
|
105 |
4. Contact Form Options Screen
|
106 |
+
5. Place this shortcode on your post or page to deploy
|
107 |
|
108 |
== Demo ==
|
109 |
This is a demonstration of this plugin working on the default Twenty Twelve theme ->
|
110 |
[Clean and Simple Contact Form Demonstration](http://demo.megnicholas.co.uk/wordpress-clean-and-simple-contact-form "Plugin Demonstration")
|
111 |
|
112 |
+
==About Meg Nicholas ==
|
113 |
+
I am a freelance WordPress Developer.
|
114 |
+
[Hire me for all your Wordpress needs](http://www.megnicholas.co.uk "Hire Me").
|
115 |
+
|
116 |
== Frequently Asked Questions ==
|
117 |
A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
|
118 |
|
119 |
== Changelog ==
|
120 |
+
= 4.0.9 =
|
121 |
+
* Switched header argument of wp_mail over to a filter to remove any potential conflicts with other emailing plugins or themes
|
122 |
+
* The ability to set a different recipient email address. Previously all email was sent to the WordPress administrator email address.
|
123 |
+
* Allow the email subject to be customised.
|
124 |
= 4.0.8 =
|
125 |
* Fixed a bug: When using reCAPTCHA ajax did not work.
|
126 |
* Fixed a bug: Ajax validation was not checking email address were equal (server side was doing it instead)
|
132 |
|
133 |
|
134 |
== Upgrade Notice ==
|
135 |
+
= 4.0.9 =
|
136 |
+
More customisation: recipient email address, and email subject.
|
137 |
= 4.0.8 =
|
138 |
Ajax now works when your form has reCAPTCHA on it. Ajax validation is now cleaner.
|
139 |
= 4.0.7 =
|
shortcodes/contact-form.php
CHANGED
@@ -5,12 +5,18 @@ function cff_ContactForm()
|
|
5 |
{
|
6 |
|
7 |
$contact = new cff_Contact;
|
|
|
8 |
|
9 |
if ($contact->IsValid())
|
10 |
{
|
11 |
-
$
|
|
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
{
|
15 |
$view = new CFF_View('message-sent');
|
16 |
$view->Set('heading',cff_PluginSettings::SentMessageHeading());
|
@@ -21,6 +27,10 @@ function cff_ContactForm()
|
|
21 |
$view = new CFF_View('message-not-sent');
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
24 |
return $view->Render();
|
25 |
}
|
26 |
|
5 |
{
|
6 |
|
7 |
$contact = new cff_Contact;
|
8 |
+
$filters = new cff_Filters;
|
9 |
|
10 |
if ($contact->IsValid())
|
11 |
{
|
12 |
+
$filters->fromEmail=$contact->Email;
|
13 |
+
$filters->fromName=$contact->Name;
|
14 |
|
15 |
+
//add filters
|
16 |
+
$filters->add('wp_mail_from');
|
17 |
+
$filters->add('wp_mail_from_name');
|
18 |
+
|
19 |
+
if (wp_mail(cff_PluginSettings::RecipientEmail() , cff_PluginSettings::Subject(), $contact->Message))
|
20 |
{
|
21 |
$view = new CFF_View('message-sent');
|
22 |
$view->Set('heading',cff_PluginSettings::SentMessageHeading());
|
27 |
$view = new CFF_View('message-not-sent');
|
28 |
}
|
29 |
|
30 |
+
//remove filters (play nice)
|
31 |
+
$filters->remove('wp_mail_from');
|
32 |
+
$filters->remove('wp_mail_from_name');
|
33 |
+
|
34 |
return $view->Render();
|
35 |
}
|
36 |
|
views/contact-form-with-recaptcha.view.php
CHANGED
@@ -10,6 +10,8 @@
|
|
10 |
<form id="frmContact" name="frmContact" method="post">
|
11 |
|
12 |
<?php wp_nonce_field('cff_contact','cff_nonce'); ?>
|
|
|
|
|
13 |
|
14 |
<!-- Clean and Simple Contact Form. Version <?php echo $version; ?> -->
|
15 |
<div class="control-group">
|
@@ -34,7 +36,7 @@
|
|
34 |
if (isset($contact->Errors['Confirm-Email'])) echo ' error'; ?>">
|
35 |
<label class="control-label" for="cfconfirm-email">Confirm Email Address:</label>
|
36 |
<div class="controls">
|
37 |
-
<input class="input-xlarge {email:true, equalTo:'#cf-Email', messages:{equalTo:'Please enter the same email address again.'}}" type="text" id="cfconfirm-email" name="cfconfirm-email" value="<?php echo $contact->ConfirmEmail; ?>" placeholder="Confirm Your Email Address">
|
38 |
<span for="cfconfirm-email" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Confirm-Email'])) echo $contact->Errors['Confirm-Email']; ?></span>
|
39 |
</div>
|
40 |
</div>
|
@@ -63,8 +65,8 @@
|
|
63 |
<div class="control-group<?php
|
64 |
if (isset($contact->Errors['recaptcha'])) echo ' error'; ?>">
|
65 |
<div id="recaptcha_div" class="controls">
|
66 |
-
|
67 |
-
<span class="help-inline"><?php echo $contact->Errors['recaptcha']; ?></span>
|
68 |
</div>
|
69 |
</div>
|
70 |
|
@@ -73,4 +75,4 @@
|
|
73 |
<button type="submit" class="btn">Send Message</button>
|
74 |
</div>
|
75 |
</div>
|
76 |
-
</form>
|
10 |
<form id="frmContact" name="frmContact" method="post">
|
11 |
|
12 |
<?php wp_nonce_field('cff_contact','cff_nonce'); ?>
|
13 |
+
|
14 |
+
<!-- Clean and Simple Contact Form by megnicholas. Version <?php echo $version; ?> -->
|
15 |
|
16 |
<!-- Clean and Simple Contact Form. Version <?php echo $version; ?> -->
|
17 |
<div class="control-group">
|
36 |
if (isset($contact->Errors['Confirm-Email'])) echo ' error'; ?>">
|
37 |
<label class="control-label" for="cfconfirm-email">Confirm Email Address:</label>
|
38 |
<div class="controls">
|
39 |
+
<input class="input-xlarge {email:true, required:true, equalTo:'#cf-Email', messages:{equalTo:'Please enter the same email address again.',required:'Please enter the same email address again.'}}" type="text" id="cfconfirm-email" name="cfconfirm-email" value="<?php echo $contact->ConfirmEmail; ?>" placeholder="Confirm Your Email Address">
|
40 |
<span for="cfconfirm-email" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Confirm-Email'])) echo $contact->Errors['Confirm-Email']; ?></span>
|
41 |
</div>
|
42 |
</div>
|
65 |
<div class="control-group<?php
|
66 |
if (isset($contact->Errors['recaptcha'])) echo ' error'; ?>">
|
67 |
<div id="recaptcha_div" class="controls">
|
68 |
+
<?php echo recaptcha_get_html($contact->RecaptchaPublicKey,null,isset($_SERVER['HTTPS'])); ?>
|
69 |
+
<span class="help-inline"><?php if (isset($contact->Errors['recaptcha'])) echo $contact->Errors['recaptcha']; ?></span>
|
70 |
</div>
|
71 |
</div>
|
72 |
|
75 |
<button type="submit" class="btn">Send Message</button>
|
76 |
</div>
|
77 |
</div>
|
78 |
+
</form>
|
views/contact-form.view.php
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
if (isset($contact->Errors['Confirm-Email'])) echo ' error'; ?>">
|
22 |
<label class="control-label" for="cfconfirm-email">Confirm Email Address:</label>
|
23 |
<div class="controls">
|
24 |
-
<input class="input-xlarge {email:true, equalTo:'#cf-Email', messages:{equalTo:'Please enter the same email address again.'}}" type="text" id="cfconfirm-email" name="cfconfirm-email" value="<?php echo $contact->ConfirmEmail; ?>" placeholder="Confirm Your Email Address">
|
25 |
<span for="cfconfirm-email" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Confirm-Email'])) echo $contact->Errors['Confirm-Email']; ?></span>
|
26 |
</div>
|
27 |
</div>
|
@@ -51,4 +51,4 @@
|
|
51 |
<button type="submit" class="btn">Send Message</button>
|
52 |
</div>
|
53 |
</div>
|
54 |
-
</form>
|
21 |
if (isset($contact->Errors['Confirm-Email'])) echo ' error'; ?>">
|
22 |
<label class="control-label" for="cfconfirm-email">Confirm Email Address:</label>
|
23 |
<div class="controls">
|
24 |
+
<input class="input-xlarge {email:true, required:true, equalTo:'#cf-Email', messages:{equalTo:'Please enter the same email address again.',required:'Please enter the same email address again.'}}" type="text" id="cfconfirm-email" name="cfconfirm-email" value="<?php echo $contact->ConfirmEmail; ?>" placeholder="Confirm Your Email Address">
|
25 |
<span for="cfconfirm-email" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Confirm-Email'])) echo $contact->Errors['Confirm-Email']; ?></span>
|
26 |
</div>
|
27 |
</div>
|
51 |
<button type="submit" class="btn">Send Message</button>
|
52 |
</div>
|
53 |
</div>
|
54 |
+
</form>
|