Version Description
Popover forms will be added in September 2010.
Download this release
Release Info
| Developer | tlovett1 |
| Plugin | |
| Version | 4.0.0.b2 |
| Comparing to | |
| See all releases | |
Code changes from version 4.0.0.b1 to 4.0.0.b2
- css/custom-contact-forms-admin.css +6 -1
- css/custom-contact-forms.css +3 -0
- custom-contact-forms-db.php +19 -17
- custom-contact-forms-export.php +4 -1
- custom-contact-forms-user-data.php +2 -0
- custom-contact-forms.php +44 -39
- download.php +3 -3
- js/custom-contact-forms-admin-inc.js +1 -1
- js/custom-contact-forms-admin.js +4 -4
- readme.txt +1 -1
css/custom-contact-forms-admin.css
CHANGED
|
@@ -171,6 +171,8 @@
|
|
| 171 |
width:1000px;
|
| 172 |
margin:20px 1em 1em 5px;
|
| 173 |
}
|
|
|
|
|
|
|
| 174 |
#customcontactforms-admin #create-styles .style_left { float:left; width:48% }
|
| 175 |
#customcontactforms-admin #create-styles .style_right { width:48%; margin-left:51%; clear:none }
|
| 176 |
#customcontactforms-admin #plugin-news {
|
|
@@ -305,6 +307,9 @@
|
|
| 305 |
-webkit-box-shadow: 0 0 14px #123;
|
| 306 |
box-shadow:0 0 14px #123;
|
| 307 |
}
|
|
|
|
|
|
|
|
|
|
| 308 |
#ccf-usage-popover div.popover-header {
|
| 309 |
background-color:#efefef;
|
| 310 |
padding:9px 9px 9px 20px;
|
|
@@ -329,7 +334,7 @@
|
|
| 329 |
overflow:scroll;
|
| 330 |
position:absolute;
|
| 331 |
bottom:0px;
|
| 332 |
-
top:
|
| 333 |
padding:3px;
|
| 334 |
}
|
| 335 |
#ccf-usage-popover div.popover-body ul { margin:5px 0px 5px 8px; padding:0; border-top:1px solid #efefef; }
|
| 171 |
width:1000px;
|
| 172 |
margin:20px 1em 1em 5px;
|
| 173 |
}
|
| 174 |
+
#customcontactforms-admin #create-styles .inside,
|
| 175 |
+
#customcontactforms-admin #create-styles form { margin-top:0px; padding-top:0 }
|
| 176 |
#customcontactforms-admin #create-styles .style_left { float:left; width:48% }
|
| 177 |
#customcontactforms-admin #create-styles .style_right { width:48%; margin-left:51%; clear:none }
|
| 178 |
#customcontactforms-admin #plugin-news {
|
| 307 |
-webkit-box-shadow: 0 0 14px #123;
|
| 308 |
box-shadow:0 0 14px #123;
|
| 309 |
}
|
| 310 |
+
#ccf-usage-popover #popover-tof { text-align:center; border-bottom:1px #ccc dashed; margin:5px 0 10px 0; padding:0 0 6px 0; }
|
| 311 |
+
#ccf-usage-popover #popover-tof li { display:inline; padding:0 2px 0 3px;
|
| 312 |
+
}
|
| 313 |
#ccf-usage-popover div.popover-header {
|
| 314 |
background-color:#efefef;
|
| 315 |
padding:9px 9px 9px 20px;
|
| 334 |
overflow:scroll;
|
| 335 |
position:absolute;
|
| 336 |
bottom:0px;
|
| 337 |
+
top:3em;
|
| 338 |
padding:3px;
|
| 339 |
}
|
| 340 |
#ccf-usage-popover div.popover-body ul { margin:5px 0px 5px 8px; padding:0; border-top:1px solid #efefef; }
|
css/custom-contact-forms.css
CHANGED
|
@@ -97,6 +97,9 @@ form.customcontactform-sidebar div select { width:auto; }
|
|
| 97 |
left:30%;
|
| 98 |
background-color:white;
|
| 99 |
top:30%;
|
|
|
|
|
|
|
|
|
|
| 100 |
}
|
| 101 |
#ccf-form-success div {
|
| 102 |
background-color:#efefef;
|
| 97 |
left:30%;
|
| 98 |
background-color:white;
|
| 99 |
top:30%;
|
| 100 |
+
-moz-box-shadow:0 0 14px #123;
|
| 101 |
+
-webkit-box-shadow: 0 0 14px #123;
|
| 102 |
+
box-shadow:0 0 14px #123;
|
| 103 |
}
|
| 104 |
#ccf-form-success div {
|
| 105 |
background-color:#efefef;
|
custom-contact-forms-db.php
CHANGED
|
@@ -61,22 +61,22 @@ if (!class_exists('CustomContactFormsDB')) {
|
|
| 61 |
`textarea_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
|
| 62 |
`textarea_height` VARCHAR( 10 ) NOT NULL DEFAULT '100px',
|
| 63 |
`form_borderwidth` VARCHAR( 10 ) NOT NULL DEFAULT '0px',
|
| 64 |
-
`label_width` VARCHAR( 10 ) NOT NULL DEFAULT '
|
| 65 |
-
`form_width` VARCHAR( 10 ) NOT NULL DEFAULT '
|
| 66 |
-
`submit_width` VARCHAR( 10 ) NOT NULL DEFAULT '
|
| 67 |
-
`submit_height` VARCHAR( 10 ) NOT NULL DEFAULT '
|
| 68 |
`label_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1em',
|
| 69 |
`title_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.2em',
|
| 70 |
-
`field_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '
|
| 71 |
`submit_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.1em',
|
| 72 |
`field_bordercolor` VARCHAR( 10 ) NOT NULL DEFAULT '999999',
|
| 73 |
-
`form_borderstyle` VARCHAR( 30 ) NOT NULL DEFAULT '
|
| 74 |
-
`form_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT '
|
| 75 |
-
`field_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '
|
| 76 |
`label_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
|
| 77 |
`title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
|
| 78 |
`submit_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
|
| 79 |
-
`form_fontfamily` VARCHAR( 150 ) NOT NULL DEFAULT '
|
| 80 |
PRIMARY KEY ( `id` )
|
| 81 |
) ENGINE = MYISAM AUTO_INCREMENT=1 ";
|
| 82 |
$wpdb->query($sql3);
|
|
@@ -101,21 +101,21 @@ if (!class_exists('CustomContactFormsDB')) {
|
|
| 101 |
if (!$this->columnExists('form_thank_you_page', CCF_FORMS_TABLE))
|
| 102 |
$wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_thank_you_page` VARCHAR ( 200 ) NOT NULL");
|
| 103 |
if (!$this->columnExists('field_backgroundcolor', CCF_STYLES_TABLE))
|
| 104 |
-
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT '
|
| 105 |
if (!$this->columnExists('field_borderstyle', CCF_STYLES_TABLE))
|
| 106 |
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_borderstyle` VARCHAR( 20 ) NOT NULL DEFAULT 'solid'");
|
| 107 |
if (!$this->columnExists('form_success_title', CCF_FORMS_TABLE))
|
| 108 |
$wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_success_title` VARCHAR( 150 ) NOT NULL DEFAULT 'Form Success!'");
|
| 109 |
if (!$this->columnExists('form_padding', CCF_STYLES_TABLE))
|
| 110 |
-
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_padding` VARCHAR( 20 ) NOT NULL DEFAULT '
|
| 111 |
if (!$this->columnExists('form_margin', CCF_STYLES_TABLE))
|
| 112 |
-
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_margin` VARCHAR( 20 ) NOT NULL DEFAULT '
|
| 113 |
if (!$this->columnExists('title_margin', CCF_STYLES_TABLE))
|
| 114 |
-
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `title_margin` VARCHAR( 20 ) NOT NULL DEFAULT '
|
| 115 |
if (!$this->columnExists('label_margin', CCF_STYLES_TABLE))
|
| 116 |
-
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `label_margin` VARCHAR( 20 ) NOT NULL DEFAULT '
|
| 117 |
if (!$this->columnExists('textarea_backgroundcolor', CCF_STYLES_TABLE))
|
| 118 |
-
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `textarea_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT '
|
| 119 |
if (!$this->columnExists('success_popover_bordercolor', CCF_STYLES_TABLE))
|
| 120 |
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT 'efefef'");
|
| 121 |
if (!$this->columnExists('dropdown_width', CCF_STYLES_TABLE))
|
|
@@ -138,6 +138,8 @@ if (!class_exists('CustomContactFormsDB')) {
|
|
| 138 |
$wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_required` INT( 1 ) NOT NULL DEFAULT '0'");
|
| 139 |
if (!$this->columnExists('form_backgroundcolor', CCF_STYLES_TABLE))
|
| 140 |
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
|
|
|
|
|
|
|
| 141 |
|
| 142 |
}
|
| 143 |
|
|
@@ -508,9 +510,9 @@ if (!class_exists('CustomContactFormsDB')) {
|
|
| 508 |
|
| 509 |
function insertUserData($data_object) {
|
| 510 |
global $wpdb;
|
| 511 |
-
|
| 512 |
$wpdb->insert(CCF_USER_DATA_TABLE, array('data_time' => $data_object->getDataTime(), 'data_formid' => $data_object->getFormID(), 'data_formpage' => $data_object->getFormPage(), 'data_value' => $data_object->getEncodedData()));
|
| 513 |
-
|
| 514 |
return $wpdb->insert_id;
|
| 515 |
}
|
| 516 |
|
| 61 |
`textarea_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
|
| 62 |
`textarea_height` VARCHAR( 10 ) NOT NULL DEFAULT '100px',
|
| 63 |
`form_borderwidth` VARCHAR( 10 ) NOT NULL DEFAULT '0px',
|
| 64 |
+
`label_width` VARCHAR( 10 ) NOT NULL DEFAULT '200px',
|
| 65 |
+
`form_width` VARCHAR( 10 ) NOT NULL DEFAULT '100%',
|
| 66 |
+
`submit_width` VARCHAR( 10 ) NOT NULL DEFAULT 'auto',
|
| 67 |
+
`submit_height` VARCHAR( 10 ) NOT NULL DEFAULT '30px',
|
| 68 |
`label_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1em',
|
| 69 |
`title_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.2em',
|
| 70 |
+
`field_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.3em',
|
| 71 |
`submit_fontsize` VARCHAR( 10 ) NOT NULL DEFAULT '1.1em',
|
| 72 |
`field_bordercolor` VARCHAR( 10 ) NOT NULL DEFAULT '999999',
|
| 73 |
+
`form_borderstyle` VARCHAR( 30 ) NOT NULL DEFAULT 'none',
|
| 74 |
+
`form_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT '',
|
| 75 |
+
`field_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
|
| 76 |
`label_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
|
| 77 |
`title_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
|
| 78 |
`submit_fontcolor` VARCHAR( 20 ) NOT NULL DEFAULT '333333',
|
| 79 |
+
`form_fontfamily` VARCHAR( 150 ) NOT NULL DEFAULT 'Tahoma, Verdana, Arial',
|
| 80 |
PRIMARY KEY ( `id` )
|
| 81 |
) ENGINE = MYISAM AUTO_INCREMENT=1 ";
|
| 82 |
$wpdb->query($sql3);
|
| 101 |
if (!$this->columnExists('form_thank_you_page', CCF_FORMS_TABLE))
|
| 102 |
$wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_thank_you_page` VARCHAR ( 200 ) NOT NULL");
|
| 103 |
if (!$this->columnExists('field_backgroundcolor', CCF_STYLES_TABLE))
|
| 104 |
+
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'f5f5f5'");
|
| 105 |
if (!$this->columnExists('field_borderstyle', CCF_STYLES_TABLE))
|
| 106 |
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_borderstyle` VARCHAR( 20 ) NOT NULL DEFAULT 'solid'");
|
| 107 |
if (!$this->columnExists('form_success_title', CCF_FORMS_TABLE))
|
| 108 |
$wpdb->query("ALTER TABLE `" . CCF_FORMS_TABLE . "` ADD `form_success_title` VARCHAR( 150 ) NOT NULL DEFAULT 'Form Success!'");
|
| 109 |
if (!$this->columnExists('form_padding', CCF_STYLES_TABLE))
|
| 110 |
+
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_padding` VARCHAR( 20 ) NOT NULL DEFAULT '8px'");
|
| 111 |
if (!$this->columnExists('form_margin', CCF_STYLES_TABLE))
|
| 112 |
+
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_margin` VARCHAR( 20 ) NOT NULL DEFAULT '7px'");
|
| 113 |
if (!$this->columnExists('title_margin', CCF_STYLES_TABLE))
|
| 114 |
+
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `title_margin` VARCHAR( 20 ) NOT NULL DEFAULT '4px'");
|
| 115 |
if (!$this->columnExists('label_margin', CCF_STYLES_TABLE))
|
| 116 |
+
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `label_margin` VARCHAR( 20 ) NOT NULL DEFAULT '6px'");
|
| 117 |
if (!$this->columnExists('textarea_backgroundcolor', CCF_STYLES_TABLE))
|
| 118 |
+
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `textarea_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'f5f5f5'");
|
| 119 |
if (!$this->columnExists('success_popover_bordercolor', CCF_STYLES_TABLE))
|
| 120 |
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `success_popover_bordercolor` VARCHAR( 20 ) NOT NULL DEFAULT 'efefef'");
|
| 121 |
if (!$this->columnExists('dropdown_width', CCF_STYLES_TABLE))
|
| 138 |
$wpdb->query("ALTER TABLE `" . CCF_FIELDS_TABLE . "` ADD `field_required` INT( 1 ) NOT NULL DEFAULT '0'");
|
| 139 |
if (!$this->columnExists('form_backgroundcolor', CCF_STYLES_TABLE))
|
| 140 |
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `form_backgroundcolor` VARCHAR( 20 ) NOT NULL DEFAULT 'ffffff'");
|
| 141 |
+
if (!$this->columnExists('field_borderround', CCF_STYLES_TABLE))
|
| 142 |
+
$wpdb->query("ALTER TABLE `" . CCF_STYLES_TABLE . "` ADD `field_borderround` VARCHAR( 20 ) NOT NULL DEFAULT '6px'");
|
| 143 |
|
| 144 |
}
|
| 145 |
|
| 510 |
|
| 511 |
function insertUserData($data_object) {
|
| 512 |
global $wpdb;
|
| 513 |
+
//$wpdb->show_errors();
|
| 514 |
$wpdb->insert(CCF_USER_DATA_TABLE, array('data_time' => $data_object->getDataTime(), 'data_formid' => $data_object->getFormID(), 'data_formpage' => $data_object->getFormPage(), 'data_value' => $data_object->getEncodedData()));
|
| 515 |
+
//$wpdb->print_error();
|
| 516 |
return $wpdb->insert_id;
|
| 517 |
}
|
| 518 |
|
custom-contact-forms-export.php
CHANGED
|
@@ -82,13 +82,16 @@ class CustomContactFormsExport extends CustomContactFormsDB {
|
|
| 82 |
return false;
|
| 83 |
}
|
| 84 |
|
| 85 |
-
function parseMultiQuery($sql, $unescape_semicolons = true) {
|
| 86 |
if (empty($sql)) return false;
|
|
|
|
| 87 |
$commands = preg_split('/\);[\n\r]*/ims', $sql);
|
| 88 |
foreach ($commands as $k => $v) {
|
| 89 |
$commands[$k] = $v . ')';
|
| 90 |
if ($unescape_semicolons)
|
| 91 |
$commands[$k] = CustomContactFormsStatic::unescapeSemiColons($commands[$k]);
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
array_pop($commands);
|
| 94 |
return $commands;
|
| 82 |
return false;
|
| 83 |
}
|
| 84 |
|
| 85 |
+
function parseMultiQuery($sql, $unescape_semicolons = true, $replace_table_prefix = true) {
|
| 86 |
if (empty($sql)) return false;
|
| 87 |
+
$prefix = CustomContactFormsStatic::getWPTablePrefix();
|
| 88 |
$commands = preg_split('/\);[\n\r]*/ims', $sql);
|
| 89 |
foreach ($commands as $k => $v) {
|
| 90 |
$commands[$k] = $v . ')';
|
| 91 |
if ($unescape_semicolons)
|
| 92 |
$commands[$k] = CustomContactFormsStatic::unescapeSemiColons($commands[$k]);
|
| 93 |
+
if ($replace_table_prefix)
|
| 94 |
+
$commands[$k] = preg_replace('/^INSERT INTO `.+?customcontactforms_(.+?)`/is', 'INSERT INTO `' . $prefix . 'customcontactforms_$1`', $commands[$k]);
|
| 95 |
}
|
| 96 |
array_pop($commands);
|
| 97 |
return $commands;
|
custom-contact-forms-user-data.php
CHANGED
|
@@ -36,6 +36,8 @@ if (!class_exists('CustomContactFormsUserData')) {
|
|
| 36 |
$data_array = $this->getDataArray();
|
| 37 |
$encoded_data = '';
|
| 38 |
foreach ($data_array as $key => $value) {
|
|
|
|
|
|
|
| 39 |
$encoded_data .= 's:'.strlen($key).':"'.$key.'";';
|
| 40 |
$encoded_data .= 's:'.strlen($value).':"'.$value.'";';
|
| 41 |
}
|
| 36 |
$data_array = $this->getDataArray();
|
| 37 |
$encoded_data = '';
|
| 38 |
foreach ($data_array as $key => $value) {
|
| 39 |
+
$key = CustomContactFormsStatic::encodeOption($key);
|
| 40 |
+
$value = CustomContactFormsStatic::encodeOption($value);
|
| 41 |
$encoded_data .= 's:'.strlen($key).':"'.$key.'";';
|
| 42 |
$encoded_data .= 's:'.strlen($value).':"'.$value.'";';
|
| 43 |
}
|
custom-contact-forms.php
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
/*
|
| 3 |
Plugin Name: Custom Contact Forms
|
| 4 |
Plugin URI: http://taylorlovett.com/wordpress-plugins
|
| 5 |
-
Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, captchas, tooltip popovers, unlimited fields/forms/form styles, use a custom thank you page or built-in popover with a custom success message set for each form. <a href="options-general.php?page=custom-contact-forms">Settings</a>
|
| 6 |
-
Version: 4.0.0.
|
| 7 |
Author: Taylor Lovett
|
| 8 |
Author URI: http://www.taylorlovett.com
|
| 9 |
*/
|
|
@@ -1065,8 +1065,9 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1065 |
<div id="create-styles" class="postbox">
|
| 1066 |
<h3 class="hndle"><span>Create A Style for Your Forms</span></h3>
|
| 1067 |
<div class="inside">
|
|
|
|
| 1068 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
|
| 1069 |
-
|
| 1070 |
<li>
|
| 1071 |
<label for="style_slug">* Style Slug:</label>
|
| 1072 |
<input type="text" maxlength="30" class="width75" name="style[style_slug]" />
|
|
@@ -1081,7 +1082,7 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1081 |
(ex: FF0000)</li>
|
| 1082 |
<li>
|
| 1083 |
<label for="label_width">Label Width:</label>
|
| 1084 |
-
<input type="text" maxlength="20" value="
|
| 1085 |
(ex: 100px or 20%)</li>
|
| 1086 |
<li>
|
| 1087 |
<label for="label_fontsize">Label Font Size:</label>
|
|
@@ -1101,11 +1102,11 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1101 |
(ex: 100px or 100%)</li>
|
| 1102 |
<li>
|
| 1103 |
<label for="textarea_height">Textarea Field Height:</label>
|
| 1104 |
-
<input type="text" maxlength="20" value="
|
| 1105 |
(ex: 100px or 100%)</li>
|
| 1106 |
<li>
|
| 1107 |
<label for="field_fontsize">Field Font Size:</label>
|
| 1108 |
-
<input type="text" maxlength="20" value="
|
| 1109 |
(ex: 10px, 10pt, 1em</li>
|
| 1110 |
<li>
|
| 1111 |
<label for="field_fontcolor">Field Font Color:</label>
|
|
@@ -1117,15 +1118,15 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1117 |
</li>
|
| 1118 |
<li>
|
| 1119 |
<label for="form_margin">Form Margin:</label>
|
| 1120 |
-
<input type="text" maxlength="20" value="
|
| 1121 |
(ex: 5px or 1em)</li>
|
| 1122 |
<li>
|
| 1123 |
<label for="label_margin">Label Margin:</label>
|
| 1124 |
-
<input type="text" maxlength="20" value="
|
| 1125 |
(ex: 5px or 1em)</li>
|
| 1126 |
<li>
|
| 1127 |
<label for="textarea_backgroundcolor">Textarea Background Color:</label>
|
| 1128 |
-
<input type="text" maxlength="20" value="
|
| 1129 |
(ex: FF0000)</li>
|
| 1130 |
<li>
|
| 1131 |
<label for="success_popover_fontcolor">Success Popover Font Color:</label>
|
|
@@ -1133,45 +1134,49 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1133 |
(ex: 333333)</li>
|
| 1134 |
<li>
|
| 1135 |
<label for="success_popover_title_fontsize">Success Popover Title Font Size:</label>
|
| 1136 |
-
<input type="text" maxlength="20" value="
|
| 1137 |
(ex: 12px, 1em, 100%)</li>
|
| 1138 |
<li>
|
| 1139 |
<label for="form_backgroundcolor">Form Background Color:</label>
|
| 1140 |
-
<input type="text" maxlength="20" value="ffffff" class="width75" name="style[form_backgroundcolor]" />
|
| 1141 |
(ex: 12px, 1em, 100%)</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1142 |
</ul>
|
| 1143 |
<ul class="style_right">
|
| 1144 |
<li>
|
| 1145 |
<label for="input_width">Field Border Color:</label>
|
| 1146 |
-
<input type="text" maxlength="20" value="
|
| 1147 |
(ex: 100px or 100%)</li>
|
| 1148 |
<li>
|
| 1149 |
<label for="form_borderstyle">Form Border Style:</label>
|
| 1150 |
-
<select class="width75" name="style[form_borderstyle]"><?php echo
|
| 1151 |
</li>
|
| 1152 |
<li>
|
| 1153 |
<label for="form_bordercolor">Form Border Color:</label>
|
| 1154 |
-
<input type="text" maxlength="20" value="
|
| 1155 |
(ex: 000000)</li>
|
| 1156 |
<li>
|
| 1157 |
<label for="form_borderwidth">Form Border Width:</label>
|
| 1158 |
-
<input type="text" maxlength="20" value="
|
| 1159 |
(ex: 1px)</li>
|
| 1160 |
<li>
|
| 1161 |
<label for="form_borderwidth">Form Width:</label>
|
| 1162 |
-
<input type="text" maxlength="20" value="
|
| 1163 |
(ex: 100px or 50%)</li>
|
| 1164 |
<li>
|
| 1165 |
<label for="form_borderwidth">Form Font Family:</label>
|
| 1166 |
-
<input type="text" maxlength="
|
| 1167 |
(ex: Verdana, Tahoma, Arial)</li>
|
| 1168 |
<li>
|
| 1169 |
<label for="submit_width">Button Width:</label>
|
| 1170 |
-
<input type="text" maxlength="20" value="
|
| 1171 |
-
(ex: 100px
|
| 1172 |
<li>
|
| 1173 |
<label for="submit_height">Button Height:</label>
|
| 1174 |
-
<input type="text" maxlength="20" value="
|
| 1175 |
(ex: 100px or 30%)</li>
|
| 1176 |
<li>
|
| 1177 |
<label for="submit_fontsize">Button Font Size:</label>
|
|
@@ -1183,15 +1188,15 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1183 |
(ex: FF0000)</li>
|
| 1184 |
<li>
|
| 1185 |
<label for="field_backgroundcolor">Field Background Color:</label>
|
| 1186 |
-
<input type="text" maxlength="20" value="
|
| 1187 |
(ex: FF0000)</li>
|
| 1188 |
<li>
|
| 1189 |
<label for="form_padding">Form Padding:</label>
|
| 1190 |
-
<input type="text" maxlength="20" value="
|
| 1191 |
(ex: 5px or 1em)</li>
|
| 1192 |
<li>
|
| 1193 |
<label for="title_margin">Title Margin:</label>
|
| 1194 |
-
<input type="text" maxlength="20" value="
|
| 1195 |
(ex: 5px or 1em)</li>
|
| 1196 |
<li>
|
| 1197 |
<label for="title_margin">Dropdown Width:</label>
|
|
@@ -1205,10 +1210,6 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1205 |
<label for="success_popover_fontsize">Success Popover Font Size:</label>
|
| 1206 |
<input type="text" maxlength="20" value="12px" class="width75" name="style[success_popover_fontsize]" />
|
| 1207 |
(ex: 12px, 1em, 100%)</li>
|
| 1208 |
-
<li>
|
| 1209 |
-
<label for="success_popover_title_fontsize">Success Popover Title Font Size:</label>
|
| 1210 |
-
<input type="text" maxlength="20" value="12px" class="width75" name="style[success_popover_title_fontsize]" />
|
| 1211 |
-
(ex: 12px, 1em, 100%)</li>
|
| 1212 |
<li>
|
| 1213 |
<label for="success_popover_height">Success Popover Height:</label>
|
| 1214 |
<input type="text" maxlength="20" value="200px" class="width75" name="style[success_popover_height]" />
|
|
@@ -1241,7 +1242,7 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1241 |
<tr class="<?php if ($i % 2 == 0) echo 'evenrow'; ?>">
|
| 1242 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
|
| 1243 |
<td><label>* Slug:</label> <input type="text" maxlength="30" value="<?php echo $style->style_slug; ?>" name="style[style_slug]" /><br />
|
| 1244 |
-
<label>Font Family:</label><input type="text" maxlength="
|
| 1245 |
<label>Textarea Background<br />Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->textarea_backgroundcolor; ?>" name="style[textarea_backgroundcolor]" /><br />
|
| 1246 |
<label>Success Popover<br />Border Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_bordercolor; ?>" name="style[success_popover_bordercolor]" /><br />
|
| 1247 |
<input type="submit" class="submit-styles edit-button" name="style_edit" value="Save" /><br />
|
|
@@ -1264,7 +1265,7 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1264 |
<label>Field Background Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_backgroundcolor; ?>" name="style[field_backgroundcolor]" /><br />
|
| 1265 |
<label>Title Margin:</label><input type="text" maxlength="20" value="<?php echo $style->title_margin; ?>" name="style[title_margin]" /><br />
|
| 1266 |
<label>Success Popover<br />Title Font Size:</label><input type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontsize; ?>" name="style[success_popover_title_fontsize]" />
|
| 1267 |
-
<label>Form Background Color:</label><input type="text" maxlength="20" value="<?php echo $style->form_backgroundcolor; ?>" name="style[form_backgroundcolor]" />
|
| 1268 |
</td>
|
| 1269 |
|
| 1270 |
<td>
|
|
@@ -1291,6 +1292,7 @@ if (!class_exists('CustomContactForms')) {
|
|
| 1291 |
<label>Field Border Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_bordercolor; ?>" name="style[field_bordercolor]" /><br />
|
| 1292 |
<label>Field Border Style:</label><select name="style[field_borderstyle]"><?php echo str_replace('<option>'.$style->field_borderstyle.'</option>', '<option selected="selected">'.$style->field_borderstyle.'</option>', $border_style_options); ?></select><br />
|
| 1293 |
<label>Success Popover<br />Title Font Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontcolor; ?>" name="style[success_popover_title_fontcolor]" /><br />
|
|
|
|
| 1294 |
<input type="hidden" class="object-type" name="object_type" value="style" />
|
| 1295 |
<input name="sid" type="hidden" class="object-id" value="<?php echo $style->id; ?>" />
|
| 1296 |
</td>
|
|
@@ -1569,19 +1571,22 @@ the field names you want required by commas. Remember to use underscores instead
|
|
| 1569 |
if ($admin_options[author_link] == 1) $out .= "\n".'<a class="hide" href="http://www.taylorlovett.com" title="Rockville Web Developer, Wordpress Plugins">Wordpress plugin expert and Rockville Web Developer Taylor Lovett</a>';
|
| 1570 |
|
| 1571 |
if ($form->form_style != 0) {
|
|
|
|
|
|
|
|
|
|
| 1572 |
$form_styles .= '<style type="text/css">' . "\n";
|
| 1573 |
-
$form_styles .= '#' . $form_id . " { width: ".$style->form_width."; padding:".$style->form_padding."; margin:".$style->form_margin."; border:".$style->form_borderwidth." ".$style->form_borderstyle." #".parent::formatStyle($style->form_bordercolor)."; font-family:".$style->form_fontfamily."; }\n";
|
| 1574 |
-
$form_styles .= '#' . $form_id . " div { margin-bottom:6px }\n";
|
| 1575 |
-
$form_styles .= '#' . $form_id . " div div { margin:0; padding:0; }\n";
|
| 1576 |
-
$form_styles .= '#' . $form_id . " h4 { padding:0; margin:".$style->title_margin." ".$style->title_margin." ".$style->title_margin." 0; color:#".parent::formatStyle($style->title_fontcolor)."; font-size:".$style->title_fontsize."; } \n";
|
| 1577 |
-
$form_styles .= '#' . $form_id . " label { padding:0; margin:".$style->label_margin." ".$style->label_margin." ".$style->label_margin." 0; display:block; color:#".parent::formatStyle($style->label_fontcolor)."; width:".$style->label_width."; font-size:".$style->label_fontsize."; } \n";
|
| 1578 |
$form_styles .= '#' . $form_id . " div div input { margin-bottom:2px; line-height:normal; }";
|
| 1579 |
$form_styles .= '#' . $form_id . " input[type=checkbox] { margin:0; }";
|
| 1580 |
$form_styles .= '#' . $form_id . " label.checkbox, #" . $form_id . " label.radio, #" . $form_id . " label.select { display:inline; } \n";
|
| 1581 |
-
$form_styles .= '#' . $form_id . " input[type=text], #" . $form_id . " select { color:#".parent::formatStyle($style->field_fontcolor)."; margin:0; width:".$style->input_width."; font-size:".$style->field_fontsize."; background-color:#".parent::formatStyle($style->field_backgroundcolor)."; border:1px ".$style->field_borderstyle." #".parent::formatStyle($style->field_bordercolor)."; } \n";
|
| 1582 |
-
$form_styles .= '#' . $form_id . " select { width:".$style->dropdown_width."; }\n";
|
| 1583 |
$form_styles .= '#' . $form_id . " .submit { color:#".parent::formatStyle($style->submit_fontcolor)."; width:".$style->submit_width."; height:".$style->submit_height."; font-size:".$style->submit_fontsize."; } \n";
|
| 1584 |
-
$form_styles .= '#' . $form_id . " textarea { color:#".parent::formatStyle($style->field_fontcolor)."; width:".$style->textarea_width."; margin:0; background-color:#".parent::formatStyle($style->textarea_backgroundcolor)."; height:".$style->textarea_height."; font-size:".$style->field_fontsize."; border:1px ".$style->field_borderstyle." #".parent::formatStyle($style->field_bordercolor)."; } \n";
|
| 1585 |
$form_styles .= '</style>' . "\n";
|
| 1586 |
}
|
| 1587 |
|
|
@@ -1593,7 +1598,7 @@ the field names you want required by commas. Remember to use underscores instead
|
|
| 1593 |
$code_type = ($admin_options[code_type] == 'XHTML') ? ' /' : '';
|
| 1594 |
$captcha = parent::selectField('', 'captcha');
|
| 1595 |
$instructions = (empty($captcha->field_instructions)) ? '' : 'title="'.$captcha->field_instructions.'" class="tooltip-field"';
|
| 1596 |
-
$out = '<img width="
|
| 1597 |
<div><label for="captcha'.$form_id.'">* '.$captcha->field_label.'</label> <input type="text" '.$instructions.' name="captcha" id="captcha'.$form_id.'" maxlength="20"'.$code_type.'></div>';
|
| 1598 |
return $out;
|
| 1599 |
}
|
|
@@ -1685,7 +1690,7 @@ the field names you want required by commas. Remember to use underscores instead
|
|
| 1685 |
$data_object = new CustomContactFormsUserData(array('data_array' => $data_array, 'form_page' => $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'], 'form_id' => 0, 'data_time' => time()));
|
| 1686 |
parent::insertUserData($data_object);
|
| 1687 |
$body .= "\n" . 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "\n";
|
| 1688 |
-
if ($admin_options[
|
| 1689 |
$mailer = new CustomContactFormsMailer($_POST[destination_email], $admin_options[default_from_email], $admin_options[default_form_subject], stripslashes($body), $admin_options[wp_mail_function]);
|
| 1690 |
$mailer->send();
|
| 1691 |
} if ($_POST[thank_you_page])
|
| 2 |
/*
|
| 3 |
Plugin Name: Custom Contact Forms
|
| 4 |
Plugin URI: http://taylorlovett.com/wordpress-plugins
|
| 5 |
+
Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form. <a href="options-general.php?page=custom-contact-forms">Settings</a>
|
| 6 |
+
Version: 4.0.0.b2
|
| 7 |
Author: Taylor Lovett
|
| 8 |
Author URI: http://www.taylorlovett.com
|
| 9 |
*/
|
| 1065 |
<div id="create-styles" class="postbox">
|
| 1066 |
<h3 class="hndle"><span>Create A Style for Your Forms</span></h3>
|
| 1067 |
<div class="inside">
|
| 1068 |
+
<p>Use this manager to create styles for your forms. Each field is already filled out with nice look defaults. It is recommended you simply input a slug and click create to see the defaults before you start changing values.</p>
|
| 1069 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
|
| 1070 |
+
<ul class="style_left">
|
| 1071 |
<li>
|
| 1072 |
<label for="style_slug">* Style Slug:</label>
|
| 1073 |
<input type="text" maxlength="30" class="width75" name="style[style_slug]" />
|
| 1082 |
(ex: FF0000)</li>
|
| 1083 |
<li>
|
| 1084 |
<label for="label_width">Label Width:</label>
|
| 1085 |
+
<input type="text" maxlength="20" value="200px" class="width75" name="style[label_width]" />
|
| 1086 |
(ex: 100px or 20%)</li>
|
| 1087 |
<li>
|
| 1088 |
<label for="label_fontsize">Label Font Size:</label>
|
| 1102 |
(ex: 100px or 100%)</li>
|
| 1103 |
<li>
|
| 1104 |
<label for="textarea_height">Textarea Field Height:</label>
|
| 1105 |
+
<input type="text" maxlength="20" value="90px" class="width75" name="style[textarea_height]" />
|
| 1106 |
(ex: 100px or 100%)</li>
|
| 1107 |
<li>
|
| 1108 |
<label for="field_fontsize">Field Font Size:</label>
|
| 1109 |
+
<input type="text" maxlength="20" value="1.3em" class="width75" name="style[field_fontsize]" />
|
| 1110 |
(ex: 10px, 10pt, 1em</li>
|
| 1111 |
<li>
|
| 1112 |
<label for="field_fontcolor">Field Font Color:</label>
|
| 1118 |
</li>
|
| 1119 |
<li>
|
| 1120 |
<label for="form_margin">Form Margin:</label>
|
| 1121 |
+
<input type="text" maxlength="20" value="7px" class="width75" name="style[form_margin]" />
|
| 1122 |
(ex: 5px or 1em)</li>
|
| 1123 |
<li>
|
| 1124 |
<label for="label_margin">Label Margin:</label>
|
| 1125 |
+
<input type="text" maxlength="20" value="5px" class="width75" name="style[label_margin]" />
|
| 1126 |
(ex: 5px or 1em)</li>
|
| 1127 |
<li>
|
| 1128 |
<label for="textarea_backgroundcolor">Textarea Background Color:</label>
|
| 1129 |
+
<input type="text" maxlength="20" value="f5f5f5" class="width75 colorfield" name="style[textarea_backgroundcolor]" />
|
| 1130 |
(ex: FF0000)</li>
|
| 1131 |
<li>
|
| 1132 |
<label for="success_popover_fontcolor">Success Popover Font Color:</label>
|
| 1134 |
(ex: 333333)</li>
|
| 1135 |
<li>
|
| 1136 |
<label for="success_popover_title_fontsize">Success Popover Title Font Size:</label>
|
| 1137 |
+
<input type="text" maxlength="20" value="15px" class="width75" name="style[success_popover_title_fontsize]" />
|
| 1138 |
(ex: 12px, 1em, 100%)</li>
|
| 1139 |
<li>
|
| 1140 |
<label for="form_backgroundcolor">Form Background Color:</label>
|
| 1141 |
+
<input type="text" maxlength="20" value="ffffff" class="width75 colorfield" name="style[form_backgroundcolor]" />
|
| 1142 |
(ex: 12px, 1em, 100%)</li>
|
| 1143 |
+
<li>
|
| 1144 |
+
<label for="field_borderround">Field Border Roundness:</label>
|
| 1145 |
+
<input type="text" maxlength="20" value="6px" class="width75" name="style[field_borderround]" />
|
| 1146 |
+
(ex: 6px, or 0px)</li>
|
| 1147 |
</ul>
|
| 1148 |
<ul class="style_right">
|
| 1149 |
<li>
|
| 1150 |
<label for="input_width">Field Border Color:</label>
|
| 1151 |
+
<input type="text" maxlength="20" value="999999" class="width75 colorfield" name="style[field_bordercolor]" />
|
| 1152 |
(ex: 100px or 100%)</li>
|
| 1153 |
<li>
|
| 1154 |
<label for="form_borderstyle">Form Border Style:</label>
|
| 1155 |
+
<select class="width75" name="style[form_borderstyle]"><?php echo $border_style_options; ?></select>
|
| 1156 |
</li>
|
| 1157 |
<li>
|
| 1158 |
<label for="form_bordercolor">Form Border Color:</label>
|
| 1159 |
+
<input type="text" maxlength="20" value="ffffff" class="width75 colorfield" name="style[form_bordercolor]" />
|
| 1160 |
(ex: 000000)</li>
|
| 1161 |
<li>
|
| 1162 |
<label for="form_borderwidth">Form Border Width:</label>
|
| 1163 |
+
<input type="text" maxlength="20" value="0px" class="width75" name="style[form_borderwidth]" />
|
| 1164 |
(ex: 1px)</li>
|
| 1165 |
<li>
|
| 1166 |
<label for="form_borderwidth">Form Width:</label>
|
| 1167 |
+
<input type="text" maxlength="20" value="100%" class="width75" name="style[form_width]" />
|
| 1168 |
(ex: 100px or 50%)</li>
|
| 1169 |
<li>
|
| 1170 |
<label for="form_borderwidth">Form Font Family:</label>
|
| 1171 |
+
<input type="text" maxlength="120" value="Verdana, tahoma, arial" class="width75" name="style[form_fontfamily]" />
|
| 1172 |
(ex: Verdana, Tahoma, Arial)</li>
|
| 1173 |
<li>
|
| 1174 |
<label for="submit_width">Button Width:</label>
|
| 1175 |
+
<input type="text" maxlength="20" value="auto" class="width75" name="style[submit_width]" />
|
| 1176 |
+
(ex: 100px, 30%, auto)</li>
|
| 1177 |
<li>
|
| 1178 |
<label for="submit_height">Button Height:</label>
|
| 1179 |
+
<input type="text" maxlength="20" value="30px" class="width75" name="style[submit_height]" />
|
| 1180 |
(ex: 100px or 30%)</li>
|
| 1181 |
<li>
|
| 1182 |
<label for="submit_fontsize">Button Font Size:</label>
|
| 1188 |
(ex: FF0000)</li>
|
| 1189 |
<li>
|
| 1190 |
<label for="field_backgroundcolor">Field Background Color:</label>
|
| 1191 |
+
<input type="text" maxlength="20" value="f5f5f5" class="width75 colorfield" name="style[field_backgroundcolor]" />
|
| 1192 |
(ex: FF0000)</li>
|
| 1193 |
<li>
|
| 1194 |
<label for="form_padding">Form Padding:</label>
|
| 1195 |
+
<input type="text" maxlength="20" value="8px" class="width75" name="style[form_padding]" />
|
| 1196 |
(ex: 5px or 1em)</li>
|
| 1197 |
<li>
|
| 1198 |
<label for="title_margin">Title Margin:</label>
|
| 1199 |
+
<input type="text" maxlength="20" value="5px" class="width75" name="style[title_margin]" />
|
| 1200 |
(ex: 5px or 1em)</li>
|
| 1201 |
<li>
|
| 1202 |
<label for="title_margin">Dropdown Width:</label>
|
| 1210 |
<label for="success_popover_fontsize">Success Popover Font Size:</label>
|
| 1211 |
<input type="text" maxlength="20" value="12px" class="width75" name="style[success_popover_fontsize]" />
|
| 1212 |
(ex: 12px, 1em, 100%)</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1213 |
<li>
|
| 1214 |
<label for="success_popover_height">Success Popover Height:</label>
|
| 1215 |
<input type="text" maxlength="20" value="200px" class="width75" name="style[success_popover_height]" />
|
| 1242 |
<tr class="<?php if ($i % 2 == 0) echo 'evenrow'; ?>">
|
| 1243 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
|
| 1244 |
<td><label>* Slug:</label> <input type="text" maxlength="30" value="<?php echo $style->style_slug; ?>" name="style[style_slug]" /><br />
|
| 1245 |
+
<label>Font Family:</label><input type="text" maxlength="120" value="<?php echo $style->form_fontfamily; ?>" name="style[form_fontfamily]" /><br />
|
| 1246 |
<label>Textarea Background<br />Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->textarea_backgroundcolor; ?>" name="style[textarea_backgroundcolor]" /><br />
|
| 1247 |
<label>Success Popover<br />Border Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_bordercolor; ?>" name="style[success_popover_bordercolor]" /><br />
|
| 1248 |
<input type="submit" class="submit-styles edit-button" name="style_edit" value="Save" /><br />
|
| 1265 |
<label>Field Background Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_backgroundcolor; ?>" name="style[field_backgroundcolor]" /><br />
|
| 1266 |
<label>Title Margin:</label><input type="text" maxlength="20" value="<?php echo $style->title_margin; ?>" name="style[title_margin]" /><br />
|
| 1267 |
<label>Success Popover<br />Title Font Size:</label><input type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontsize; ?>" name="style[success_popover_title_fontsize]" />
|
| 1268 |
+
<label>Form Background Color:</label><input type="text" class="colorfield" maxlength="20" value="<?php echo $style->form_backgroundcolor; ?>" name="style[form_backgroundcolor]" />
|
| 1269 |
</td>
|
| 1270 |
|
| 1271 |
<td>
|
| 1292 |
<label>Field Border Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->field_bordercolor; ?>" name="style[field_bordercolor]" /><br />
|
| 1293 |
<label>Field Border Style:</label><select name="style[field_borderstyle]"><?php echo str_replace('<option>'.$style->field_borderstyle.'</option>', '<option selected="selected">'.$style->field_borderstyle.'</option>', $border_style_options); ?></select><br />
|
| 1294 |
<label>Success Popover<br />Title Font Color:</label><input class="colorfield" type="text" maxlength="20" value="<?php echo $style->success_popover_title_fontcolor; ?>" name="style[success_popover_title_fontcolor]" /><br />
|
| 1295 |
+
<label>Field Border Roundness:</label><input name="style[field_borderround]" value="<?php echo $style->field_borderround; ?>" type="text" maxlength="20" /><br />
|
| 1296 |
<input type="hidden" class="object-type" name="object_type" value="style" />
|
| 1297 |
<input name="sid" type="hidden" class="object-id" value="<?php echo $style->id; ?>" />
|
| 1298 |
</td>
|
| 1571 |
if ($admin_options[author_link] == 1) $out .= "\n".'<a class="hide" href="http://www.taylorlovett.com" title="Rockville Web Developer, Wordpress Plugins">Wordpress plugin expert and Rockville Web Developer Taylor Lovett</a>';
|
| 1572 |
|
| 1573 |
if ($form->form_style != 0) {
|
| 1574 |
+
$no_border = array('', '0', '0px', '0%', '0pt', '0em');
|
| 1575 |
+
$round_border = (!in_array($style->field_borderround, $no_border)) ? '-moz-border-radius:'.$style->field_borderround.'; -khtml-border-radius:'.$style->field_borderround.'; -webkit-border-radius:'.$style->field_borderround.'; ' : '';
|
| 1576 |
+
$round_border_none = '-moz-border-radius:0px; -khtml-border-radius:0px; -webkit-border-radius:0px; ';
|
| 1577 |
$form_styles .= '<style type="text/css">' . "\n";
|
| 1578 |
+
$form_styles .= '#' . $form_id . " { width: ".$style->form_width."; text-align:left; padding:".$style->form_padding."; margin:".$style->form_margin."; border:".$style->form_borderwidth." ".$style->form_borderstyle." #".parent::formatStyle($style->form_bordercolor)."; background-color:#".parent::formatStyle($style->form_backgroundcolor)."; font-family:".$style->form_fontfamily."; } \n";
|
| 1579 |
+
$form_styles .= '#' . $form_id . " div { margin-bottom:6px; background-color:inherit; }\n";
|
| 1580 |
+
$form_styles .= '#' . $form_id . " div div { margin:0; background-color:inherit; padding:0; }\n";
|
| 1581 |
+
$form_styles .= '#' . $form_id . " h4 { padding:0; background-color:inherit; margin:".$style->title_margin." ".$style->title_margin." ".$style->title_margin." 0; color:#".parent::formatStyle($style->title_fontcolor)."; font-size:".$style->title_fontsize."; } \n";
|
| 1582 |
+
$form_styles .= '#' . $form_id . " label { padding:0; background-color:inherit; margin:".$style->label_margin." ".$style->label_margin." ".$style->label_margin." 0; display:block; color:#".parent::formatStyle($style->label_fontcolor)."; width:".$style->label_width."; font-size:".$style->label_fontsize."; } \n";
|
| 1583 |
$form_styles .= '#' . $form_id . " div div input { margin-bottom:2px; line-height:normal; }";
|
| 1584 |
$form_styles .= '#' . $form_id . " input[type=checkbox] { margin:0; }";
|
| 1585 |
$form_styles .= '#' . $form_id . " label.checkbox, #" . $form_id . " label.radio, #" . $form_id . " label.select { display:inline; } \n";
|
| 1586 |
+
$form_styles .= '#' . $form_id . " input[type=text], #" . $form_id . " select { ".$round_border." color:#".parent::formatStyle($style->field_fontcolor)."; margin:0; width:".$style->input_width."; font-size:".$style->field_fontsize."; background-color:#".parent::formatStyle($style->field_backgroundcolor)."; border:1px ".$style->field_borderstyle." #".parent::formatStyle($style->field_bordercolor)."; } \n";
|
| 1587 |
+
$form_styles .= '#' . $form_id . " select { ".$round_border_none." width:".$style->dropdown_width."; }\n";
|
| 1588 |
$form_styles .= '#' . $form_id . " .submit { color:#".parent::formatStyle($style->submit_fontcolor)."; width:".$style->submit_width."; height:".$style->submit_height."; font-size:".$style->submit_fontsize."; } \n";
|
| 1589 |
+
$form_styles .= '#' . $form_id . " textarea { ".$round_border." color:#".parent::formatStyle($style->field_fontcolor)."; width:".$style->textarea_width."; margin:0; background-color:#".parent::formatStyle($style->textarea_backgroundcolor)."; height:".$style->textarea_height."; font-size:".$style->field_fontsize."; border:1px ".$style->field_borderstyle." #".parent::formatStyle($style->field_bordercolor)."; } \n";
|
| 1590 |
$form_styles .= '</style>' . "\n";
|
| 1591 |
}
|
| 1592 |
|
| 1598 |
$code_type = ($admin_options[code_type] == 'XHTML') ? ' /' : '';
|
| 1599 |
$captcha = parent::selectField('', 'captcha');
|
| 1600 |
$instructions = (empty($captcha->field_instructions)) ? '' : 'title="'.$captcha->field_instructions.'" class="tooltip-field"';
|
| 1601 |
+
$out = '<img width="96" height="24" alt="Captcha image for a contact form" id="captcha-image" src="' . get_bloginfo('wpurl') . '/wp-content/plugins/custom-contact-forms/image.php?fid='.$form_id.'"'.$code_type.'>
|
| 1602 |
<div><label for="captcha'.$form_id.'">* '.$captcha->field_label.'</label> <input type="text" '.$instructions.' name="captcha" id="captcha'.$form_id.'" maxlength="20"'.$code_type.'></div>';
|
| 1603 |
return $out;
|
| 1604 |
}
|
| 1690 |
$data_object = new CustomContactFormsUserData(array('data_array' => $data_array, 'form_page' => $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'], 'form_id' => 0, 'data_time' => time()));
|
| 1691 |
parent::insertUserData($data_object);
|
| 1692 |
$body .= "\n" . 'Sender IP: ' . $_SERVER['REMOTE_ADDR'] . "\n";
|
| 1693 |
+
if ($admin_options[email_form_submissions] == 1) {
|
| 1694 |
$mailer = new CustomContactFormsMailer($_POST[destination_email], $admin_options[default_from_email], $admin_options[default_form_subject], stripslashes($body), $admin_options[wp_mail_function]);
|
| 1695 |
$mailer->send();
|
| 1696 |
} if ($_POST[thank_you_page])
|
download.php
CHANGED
|
@@ -7,13 +7,13 @@
|
|
| 7 |
|
| 8 |
header('Content-Description: File Transfer');
|
| 9 |
header('Content-Type: application/octet-stream');
|
| 10 |
-
header('Content-Disposition: attachment; filename=' . basename($_GET[location]));
|
| 11 |
header('Content-Transfer-Encoding: binary');
|
| 12 |
header('Expires: 0');
|
| 13 |
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
| 14 |
header('Pragma: public');
|
| 15 |
-
header('Content-Length: ' . filesize($_GET[location]));
|
| 16 |
ob_clean();
|
| 17 |
flush();
|
| 18 |
-
echo file_get_contents($_GET[location]);
|
| 19 |
?>
|
| 7 |
|
| 8 |
header('Content-Description: File Transfer');
|
| 9 |
header('Content-Type: application/octet-stream');
|
| 10 |
+
header('Content-Disposition: attachment; filename=' . basename($_GET['location']));
|
| 11 |
header('Content-Transfer-Encoding: binary');
|
| 12 |
header('Expires: 0');
|
| 13 |
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
| 14 |
header('Pragma: public');
|
| 15 |
+
header('Content-Length: ' . filesize($_GET['location']));
|
| 16 |
ob_clean();
|
| 17 |
flush();
|
| 18 |
+
echo file_get_contents($_GET['location']);
|
| 19 |
?>
|
js/custom-contact-forms-admin-inc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
var $j = jQuery.noConflict();
|
| 2 |
|
| 3 |
function showCCFUsagePopover() {
|
| 4 |
-
$j("#ccf-usage-popover").
|
| 5 |
}
|
| 6 |
|
| 7 |
var fx = {
|
| 1 |
var $j = jQuery.noConflict();
|
| 2 |
|
| 3 |
function showCCFUsagePopover() {
|
| 4 |
+
$j("#ccf-usage-popover").fadeIn('slow');
|
| 5 |
}
|
| 6 |
|
| 7 |
var fx = {
|
js/custom-contact-forms-admin.js
CHANGED
|
@@ -110,8 +110,8 @@ $j(document).ready(function(){
|
|
| 110 |
var object_rows = $j(this).parents("tr:eq(0)");
|
| 111 |
if (object_type == "form" || object_type == "field")
|
| 112 |
object_rows = object_rows.add(object_rows.next());
|
| 113 |
-
object_rows.find("input").each(function() {
|
| 114 |
-
if ($j(this).attr("name").match(/\[/)) {
|
| 115 |
key = $j(this).attr("name");;
|
| 116 |
values = values + "&" + key + "=" + $j(this).attr("value");
|
| 117 |
}
|
|
@@ -168,7 +168,7 @@ $j(document).ready(function(){
|
|
| 168 |
alert("An error has occured, please try again later.");
|
| 169 |
}
|
| 170 |
});
|
| 171 |
-
new_row.
|
| 172 |
-
$j(".ccf-loading-icon").
|
| 173 |
});*/
|
| 174 |
});
|
| 110 |
var object_rows = $j(this).parents("tr:eq(0)");
|
| 111 |
if (object_type == "form" || object_type == "field")
|
| 112 |
object_rows = object_rows.add(object_rows.next());
|
| 113 |
+
object_rows.find("input, select, textarea").each(function() {
|
| 114 |
+
if ($j(this).attr("name").match(/\[/) && $j(this).attr("type") != "submit" && $j(this).attr("type") != "button") {
|
| 115 |
key = $j(this).attr("name");;
|
| 116 |
values = values + "&" + key + "=" + $j(this).attr("value");
|
| 117 |
}
|
| 168 |
alert("An error has occured, please try again later.");
|
| 169 |
}
|
| 170 |
});
|
| 171 |
+
new_row.fadeIn("slow").removeClass("new-object");
|
| 172 |
+
$j(".ccf-loading-icon").remove();
|
| 173 |
});*/
|
| 174 |
});
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: http://www.taylorlovett.com
|
|
| 4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
|
| 5 |
Requires at least: 2.8.1
|
| 6 |
Tested up to: 3.0.1
|
| 7 |
-
Stable tag: 4.0.0.
|
| 8 |
|
| 9 |
Gauranteed to be the most customizable and intuitive contact form plugin for Wordpress.
|
| 10 |
|
| 4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
|
| 5 |
Requires at least: 2.8.1
|
| 6 |
Tested up to: 3.0.1
|
| 7 |
+
Stable tag: 4.0.0.b2
|
| 8 |
|
| 9 |
Gauranteed to be the most customizable and intuitive contact form plugin for Wordpress.
|
| 10 |
|
