Version Description
Required fields option will be added in mid-August 2010
Download this release
Release Info
Developer | tlovett1 |
Plugin | Custom Contact Forms |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- custom-contact-forms.css +4 -3
- custom-contact-forms.php +19 -5
- readme.txt +5 -2
custom-contact-forms.css
CHANGED
@@ -29,11 +29,12 @@ form.customcontactform h4, form.customcontactform-sidebar h4 {
|
|
29 |
font-size:1.4em;
|
30 |
font-weight:bold;
|
31 |
}
|
32 |
-
form.customcontactform ul li label
|
33 |
display:block;
|
34 |
padding:0;
|
35 |
-
width:
|
36 |
}
|
|
|
37 |
form.customcontactform ul li label.checkbox, form.customcontactform-sidebar ul li label.checkbox {
|
38 |
display:inline;
|
39 |
width:20%;
|
@@ -103,7 +104,7 @@ form.customcontactform-sidebar ul li input[type=text], form.customcontactform-si
|
|
103 |
#customcontactforms-admin #general-settings {
|
104 |
float:left;
|
105 |
clear:both;
|
106 |
-
height:
|
107 |
width:29em;
|
108 |
margin:20px 1em 1em 5px;
|
109 |
}
|
29 |
font-size:1.4em;
|
30 |
font-weight:bold;
|
31 |
}
|
32 |
+
form.customcontactform ul li label {
|
33 |
display:block;
|
34 |
padding:0;
|
35 |
+
width:100%;
|
36 |
}
|
37 |
+
form.customcontactform-sidebar ul li label { width:100%; }
|
38 |
form.customcontactform ul li label.checkbox, form.customcontactform-sidebar ul li label.checkbox {
|
39 |
display:inline;
|
40 |
width:20%;
|
104 |
#customcontactforms-admin #general-settings {
|
105 |
float:left;
|
106 |
clear:both;
|
107 |
+
height:53em;
|
108 |
width:29em;
|
109 |
margin:20px 1em 1em 5px;
|
110 |
}
|
custom-contact-forms.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Custom Contact Forms
|
4 |
Plugin URI: http://taylorlovett.com/wordpress-plugins
|
5 |
Description: Custom Contact Forms is a plugin for handling and displaying custom web forms [customcontact form=1] in any page, post, category, or archive in which you want the form to show. This plugin allows you to create fields with a variety of options and to attach them to specific forms you create; definitely allows for more customization than any other Wordpress Contact Form plugin; comes with a customizable captcha spam blocker! Also comes with a web form widget to drag-and-drop in to your sidebar. <a href="options-general.php?page=custom-contact-forms" title="Maryland Wordpress Developer">Plugin Settings</a>
|
6 |
-
Version: 1.1.
|
7 |
Author: <a href="http://www.taylorlovett.com" title="Maryland Wordpress Developer">Taylor Lovett</a>
|
8 |
Author URI: http://www.taylorlovett.com
|
9 |
*/
|
@@ -40,7 +40,7 @@ if (!class_exists('CustomContactForms')) {
|
|
40 |
|
41 |
function getAdminOptions() {
|
42 |
$admin_email = get_option('admin_email');
|
43 |
-
$customcontactAdminOptions = array('show_widget_home' => 1, 'show_widget_pages' => 1, 'show_widget_singles' => 1, 'show_widget_categories' => 1, 'show_widget_archives' => 1, 'default_to_email' => $admin_email, 'default_from_email' => $admin_email, 'default_form_subject' => 'Someone Filled Out Your Contact Form!', 'custom_thank_you' => '', 'thank_you_message' => 'Thank you for filling out our form. We will respond to your inquiry ASAP.'); // defaults
|
44 |
$customcontactOptions = get_option($this->adminOptionsName);
|
45 |
if (!empty($customcontactOptions)) {
|
46 |
foreach ($customcontactOptions as $key => $option)
|
@@ -118,7 +118,6 @@ if (!class_exists('CustomContactForms')) {
|
|
118 |
}
|
119 |
|
120 |
function printAdminPage() {
|
121 |
-
parent::encodeOption('sfsfd');
|
122 |
$admin_options = $this->getAdminOptions();
|
123 |
if ($_POST[form_create]) {
|
124 |
parent::insertForm($_POST[form_slug], $_POST[form_title], $_POST[form_action], $_POST[form_method], $_POST[submit_button_text], $_POST[custom_code]);
|
@@ -397,6 +396,9 @@ if (!class_exists('CustomContactForms')) {
|
|
397 |
</tr>
|
398 |
<?php
|
399 |
}
|
|
|
|
|
|
|
400 |
?>
|
401 |
</tbody>
|
402 |
<tfoot>
|
@@ -439,6 +441,13 @@ if (!class_exists('CustomContactForms')) {
|
|
439 |
<input name="custom_thank_you" value="<?php echo $admin_options[custom_thank_you]; ?>" type="text" maxlength="150" />
|
440 |
</li>
|
441 |
<li class="descrip">Leaving this blank will show the default thank you message on form completion.</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
<li>
|
443 |
<label for="thank_you_message">Default Thank You Message:</label><br />
|
444 |
<textarea rows="6" cols="47" name="thank_you_message"><?php echo $admin_options[thank_you_message]; ?></textarea>
|
@@ -532,6 +541,7 @@ if (!class_exists('CustomContactForms')) {
|
|
532 |
function getFormCode($fid, $is_sidebar, $args) {
|
533 |
if ($is_sidebar) extract($args);
|
534 |
$this->startSession();
|
|
|
535 |
$form = parent::selectForm($fid, '');
|
536 |
$class = (!$is_sidebar) ? 'customcontactform' : 'customcontactform-sidebar';
|
537 |
$action = (!empty($form->form_action)) ? $form->form_action : get_permalink();
|
@@ -542,7 +552,11 @@ if (!class_exists('CustomContactForms')) {
|
|
542 |
foreach ($fields as $field_id) {
|
543 |
$field = parent::selectField($field_id, '');
|
544 |
$input_id = 'id="'.parent::decodeOption($field->field_slug, 1, 1).'"';
|
545 |
-
$field_value =
|
|
|
|
|
|
|
|
|
546 |
if ($field->user_field == 0 && $field->field_slug == 'captcha') {
|
547 |
$out .= '<li>' . $this->getCaptchaCode() . '</li>';
|
548 |
} elseif ($field->field_type == 'Text') {
|
@@ -562,7 +576,7 @@ if (!class_exists('CustomContactForms')) {
|
|
562 |
|
563 |
function getCaptchaCode() {
|
564 |
$out = '<img id="captcha-image" src="' . get_bloginfo('wpurl') . '/wp-content/plugins/custom-contact-forms/image.php">
|
565 |
-
<br /><input type="text" name="captcha" id="captcha" maxlength="20" />';
|
566 |
|
567 |
return $out;
|
568 |
}
|
3 |
Plugin Name: Custom Contact Forms
|
4 |
Plugin URI: http://taylorlovett.com/wordpress-plugins
|
5 |
Description: Custom Contact Forms is a plugin for handling and displaying custom web forms [customcontact form=1] in any page, post, category, or archive in which you want the form to show. This plugin allows you to create fields with a variety of options and to attach them to specific forms you create; definitely allows for more customization than any other Wordpress Contact Form plugin; comes with a customizable captcha spam blocker! Also comes with a web form widget to drag-and-drop in to your sidebar. <a href="options-general.php?page=custom-contact-forms" title="Maryland Wordpress Developer">Plugin Settings</a>
|
6 |
+
Version: 1.1.1
|
7 |
Author: <a href="http://www.taylorlovett.com" title="Maryland Wordpress Developer">Taylor Lovett</a>
|
8 |
Author URI: http://www.taylorlovett.com
|
9 |
*/
|
40 |
|
41 |
function getAdminOptions() {
|
42 |
$admin_email = get_option('admin_email');
|
43 |
+
$customcontactAdminOptions = array('show_widget_home' => 1, 'show_widget_pages' => 1, 'show_widget_singles' => 1, 'show_widget_categories' => 1, 'show_widget_archives' => 1, 'default_to_email' => $admin_email, 'default_from_email' => $admin_email, 'default_form_subject' => 'Someone Filled Out Your Contact Form!', 'custom_thank_you' => '', 'thank_you_message' => 'Thank you for filling out our form. We will respond to your inquiry ASAP.', 'remember_field_values' => 0); // defaults
|
44 |
$customcontactOptions = get_option($this->adminOptionsName);
|
45 |
if (!empty($customcontactOptions)) {
|
46 |
foreach ($customcontactOptions as $key => $option)
|
118 |
}
|
119 |
|
120 |
function printAdminPage() {
|
|
|
121 |
$admin_options = $this->getAdminOptions();
|
122 |
if ($_POST[form_create]) {
|
123 |
parent::insertForm($_POST[form_slug], $_POST[form_title], $_POST[form_action], $_POST[form_method], $_POST[submit_button_text], $_POST[custom_code]);
|
396 |
</tr>
|
397 |
<?php
|
398 |
}
|
399 |
+
$remember_check = ($admin_options[remember_field_values] == 0) ? 'selected="selected"' : '';
|
400 |
+
$remember_fields = '<option value="1">Yes</option><option '.$remember_check.' value="0">No</option>';
|
401 |
+
|
402 |
?>
|
403 |
</tbody>
|
404 |
<tfoot>
|
441 |
<input name="custom_thank_you" value="<?php echo $admin_options[custom_thank_you]; ?>" type="text" maxlength="150" />
|
442 |
</li>
|
443 |
<li class="descrip">Leaving this blank will show the default thank you message on form completion.</li>
|
444 |
+
|
445 |
+
<li>
|
446 |
+
<label for="remember_field_values">Remember Field Values:</label>
|
447 |
+
<select name="remember_field_values"><?php echo $remember_fields; ?></select>
|
448 |
+
</li>
|
449 |
+
<li class="descrip">Setting this to blank will have fields remember how they were last filled out.</li>
|
450 |
+
|
451 |
<li>
|
452 |
<label for="thank_you_message">Default Thank You Message:</label><br />
|
453 |
<textarea rows="6" cols="47" name="thank_you_message"><?php echo $admin_options[thank_you_message]; ?></textarea>
|
541 |
function getFormCode($fid, $is_sidebar, $args) {
|
542 |
if ($is_sidebar) extract($args);
|
543 |
$this->startSession();
|
544 |
+
$admin_options = $this->getAdminOptions();
|
545 |
$form = parent::selectForm($fid, '');
|
546 |
$class = (!$is_sidebar) ? 'customcontactform' : 'customcontactform-sidebar';
|
547 |
$action = (!empty($form->form_action)) ? $form->form_action : get_permalink();
|
552 |
foreach ($fields as $field_id) {
|
553 |
$field = parent::selectField($field_id, '');
|
554 |
$input_id = 'id="'.parent::decodeOption($field->field_slug, 1, 1).'"';
|
555 |
+
$field_value = parent::decodeOption($field->field_value, 1, 1);
|
556 |
+
if ($_SESSION[fields][$field->field_slug]) {
|
557 |
+
if ($admin_options[remember_field_values] == 1)
|
558 |
+
$field_value = $_SESSION[fields][$field->field_slug];
|
559 |
+
}
|
560 |
if ($field->user_field == 0 && $field->field_slug == 'captcha') {
|
561 |
$out .= '<li>' . $this->getCaptchaCode() . '</li>';
|
562 |
} elseif ($field->field_type == 'Text') {
|
576 |
|
577 |
function getCaptchaCode() {
|
578 |
$out = '<img id="captcha-image" src="' . get_bloginfo('wpurl') . '/wp-content/plugins/custom-contact-forms/image.php">
|
579 |
+
<br /><label for="captcha">Type the text:</label> <input type="text" name="captcha" id="captcha" maxlength="20" />';
|
580 |
|
581 |
return $out;
|
582 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Plugin Name: Custom Contact Forms
|
|
3 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
|
4 |
Requires at least: 2.7.1
|
5 |
Tested up to: 3.0
|
6 |
-
Stable tag: 1.1.
|
7 |
Contributors: Taylor Lovett
|
8 |
Download link: http://www.taylorlovett.com/wordpress-plugins/
|
9 |
Author: Taylor Lovett
|
@@ -43,4 +43,7 @@ Required fields option will be added in mid-August 2010
|
|
43 |
* custom-contact-forms.php - New functions for error handling and captcha
|
44 |
* custom-contact-forms.css - Forms restyled
|
45 |
* custom-contact-forms-images.php - Image handling class added
|
46 |
-
* image.php, images/ - Image for captcha displaying
|
|
|
|
|
|
3 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
|
4 |
Requires at least: 2.7.1
|
5 |
Tested up to: 3.0
|
6 |
+
Stable tag: 1.1.1
|
7 |
Contributors: Taylor Lovett
|
8 |
Download link: http://www.taylorlovett.com/wordpress-plugins/
|
9 |
Author: Taylor Lovett
|
43 |
* custom-contact-forms.php - New functions for error handling and captcha
|
44 |
* custom-contact-forms.css - Forms restyled
|
45 |
* custom-contact-forms-images.php - Image handling class added
|
46 |
+
* image.php, images/ - Image for captcha displaying
|
47 |
+
1.1.1
|
48 |
+
* custom-contact-forms.css - Label styles changed
|
49 |
+
* custom-contact-forms.php - Admin option added to remember field values
|