Version Description
Download this release
Release Info
Developer | webdorado |
Plugin | Contact Form Builder – a plugin for creating contact and feedback forms |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
- admin/views/CFMViewManage_cfm.php +24 -14
- contact-form-builder.php +1 -1
- frontend/models/CFMModelForm_maker.php +5 -5
- frontend/views/CFMViewForm_maker.php +3 -11
- readme.txt +1 -1
admin/views/CFMViewManage_cfm.php
CHANGED
@@ -932,23 +932,28 @@ class CFMViewManage_cfm {
|
|
932 |
<td class="fm_options_value">
|
933 |
<?php
|
934 |
$is_other = TRUE;
|
|
|
935 |
for ($i = 0; $i < $fields_count - 1; $i++) {
|
936 |
-
|
|
|
|
|
|
|
937 |
<div>
|
938 |
-
<input type="radio" name="mail_from" id="mail_from<?php echo $i; ?>" value="<?php echo
|
939 |
<label for="mail_from<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
940 |
</div>
|
941 |
-
|
942 |
-
|
943 |
-
|
|
|
944 |
}
|
945 |
}
|
946 |
?>
|
947 |
-
<div style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>">
|
948 |
<input type="radio" id="other" name="mail_from" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('mail_from_other')" />
|
949 |
<label for="other">Other</label>
|
950 |
</div>
|
951 |
-
<input type="text" style="width: <?php echo ($fields_count == 1) ? '250px' : '235px; margin-left: 15px' ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other" name="mail_from_other" value="<?php echo ($is_other) ? $row->mail_from : ''; ?>" />
|
952 |
</td>
|
953 |
</tr>
|
954 |
<tr valign="top">
|
@@ -989,23 +994,28 @@ class CFMViewManage_cfm {
|
|
989 |
<td class="fm_options_value">
|
990 |
<?php
|
991 |
$is_other = TRUE;
|
|
|
992 |
for ($i = 0; $i < $fields_count - 1; $i++) {
|
993 |
-
|
|
|
|
|
|
|
994 |
<div>
|
995 |
-
<input type="radio" name="reply_to" id="reply_to<?php echo $i; ?>" value="<?php echo
|
996 |
<label for="reply_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
997 |
</div>
|
998 |
<?php
|
999 |
-
|
1000 |
-
|
|
|
1001 |
}
|
1002 |
}
|
1003 |
?>
|
1004 |
-
<div style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>">
|
1005 |
<input type="radio" id="other1" name="reply_to" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('reply_to_other')" />
|
1006 |
<label for="other1">Other</label>
|
1007 |
</div>
|
1008 |
-
<input type="text" style="width: <?php echo ($fields_count == 1) ? '250px' : '235px; margin-left: 15px'; ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" />
|
1009 |
</td>
|
1010 |
</tr>
|
1011 |
<tr valign="top">
|
@@ -1166,7 +1176,7 @@ class CFMViewManage_cfm {
|
|
1166 |
</tr>
|
1167 |
<tr valign="top">
|
1168 |
<td class="fm_options_label">
|
1169 |
-
<label for="reply_to_user">Reply to<br />(if different from "Email
|
1170 |
</td>
|
1171 |
<td class="fm_options_value">
|
1172 |
<input type="text" id="reply_to_user" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" style="width: 250px;" />
|
932 |
<td class="fm_options_value">
|
933 |
<?php
|
934 |
$is_other = TRUE;
|
935 |
+
$field_disabled = TRUE;
|
936 |
for ($i = 0; $i < $fields_count - 1; $i++) {
|
937 |
+
$field_id = substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i]));
|
938 |
+
if (!in_array($field_id, $disabled_fields)) {
|
939 |
+
$field_disabled = FALSE;
|
940 |
+
?>
|
941 |
<div>
|
942 |
+
<input type="radio" name="mail_from" id="mail_from<?php echo $i; ?>" value="<?php echo $field_id; ?>" <?php echo ($field_id == $row->mail_from ? 'checked="checked"' : '' ); ?> onclick="wdhide('mail_from_other')" />
|
943 |
<label for="mail_from<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
944 |
</div>
|
945 |
+
<?php
|
946 |
+
if ($field_id == $row->mail_from) {
|
947 |
+
$is_other = FALSE;
|
948 |
+
}
|
949 |
}
|
950 |
}
|
951 |
?>
|
952 |
+
<div style="<?php echo ($fields_count == 1 || $field_disabled) ? 'display:none;' : ''; ?>">
|
953 |
<input type="radio" id="other" name="mail_from" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('mail_from_other')" />
|
954 |
<label for="other">Other</label>
|
955 |
</div>
|
956 |
+
<input type="text" style="width: <?php echo ($fields_count == 1 || $field_disabled) ? '250px' : '235px; margin-left: 15px' ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other" name="mail_from_other" value="<?php echo ($is_other && !$field_disabled) ? $row->mail_from : ''; ?>" />
|
957 |
</td>
|
958 |
</tr>
|
959 |
<tr valign="top">
|
994 |
<td class="fm_options_value">
|
995 |
<?php
|
996 |
$is_other = TRUE;
|
997 |
+
$field_disabled = TRUE;
|
998 |
for ($i = 0; $i < $fields_count - 1; $i++) {
|
999 |
+
$field_id = substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i]));
|
1000 |
+
if (!in_array($field_id, $disabled_fields)) {
|
1001 |
+
$field_disabled = FALSE;
|
1002 |
+
?>
|
1003 |
<div>
|
1004 |
+
<input type="radio" name="reply_to" id="reply_to<?php echo $i; ?>" value="<?php echo $field_id; ?>" <?php echo ($field_id == $row->reply_to ? 'checked="checked"' : ''); ?> onclick="wdhide('reply_to_other')" />
|
1005 |
<label for="reply_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
1006 |
</div>
|
1007 |
<?php
|
1008 |
+
if ($field_id == $row->reply_to) {
|
1009 |
+
$is_other = FALSE;
|
1010 |
+
}
|
1011 |
}
|
1012 |
}
|
1013 |
?>
|
1014 |
+
<div style="<?php echo ($fields_count == 1 || $field_disabled) ? 'display: none;' : ''; ?>">
|
1015 |
<input type="radio" id="other1" name="reply_to" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('reply_to_other')" />
|
1016 |
<label for="other1">Other</label>
|
1017 |
</div>
|
1018 |
+
<input type="text" style="width: <?php echo ($fields_count == 1 || $field_disabled) ? '250px' : '235px; margin-left: 15px'; ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to && !$field_disabled) ? $row->reply_to : ''; ?>" />
|
1019 |
</td>
|
1020 |
</tr>
|
1021 |
<tr valign="top">
|
1176 |
</tr>
|
1177 |
<tr valign="top">
|
1178 |
<td class="fm_options_label">
|
1179 |
+
<label for="reply_to_user">Reply to<br />(if different from "Email From")</label>
|
1180 |
</td>
|
1181 |
<td class="fm_options_value">
|
1182 |
<input type="text" id="reply_to_user" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" style="width: 250px;" />
|
contact-form-builder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Contact Form Builder
|
4 |
* Plugin URI: http://web-dorado.com/products/wordpress-contact-form-builder.html
|
5 |
* Description: Contact Form Builder is an advanced plugin to add contact forms into your website. It comes along with multiple default templates which can be customized.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: http://web-dorado.com/
|
8 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
*/
|
3 |
* Plugin Name: Contact Form Builder
|
4 |
* Plugin URI: http://web-dorado.com/products/wordpress-contact-form-builder.html
|
5 |
* Description: Contact Form Builder is an advanced plugin to add contact forms into your website. It comes along with multiple default templates which can be customized.
|
6 |
+
* Version: 1.0.7
|
7 |
* Author: http://web-dorado.com/
|
8 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
*/
|
frontend/models/CFMModelForm_maker.php
CHANGED
@@ -559,11 +559,11 @@ class CFMModelForm_maker {
|
|
559 |
}
|
560 |
foreach ($label_order_original as $key => $label_each) {
|
561 |
$type = $label_type[$key];
|
562 |
-
if (strpos($row->script_mail_user, "%" . $label_each . "%") !== FALSE) {
|
563 |
$new_value = $this->custom_fields_mail($type, $key, $id);
|
564 |
$new_script = str_replace("%" . $label_each . "%", $new_value, $new_script);
|
565 |
}
|
566 |
-
if (strpos($fromname, "%" . $label_each . "%")
|
567 |
$new_value = str_replace('<br>', ', ', $this->custom_fields_mail($type, $key, $id));
|
568 |
if (substr($new_value, -2) == ', ') {
|
569 |
$new_value = substr($new_value, 0, -2);
|
@@ -649,7 +649,7 @@ class CFMModelForm_maker {
|
|
649 |
$fromname = $row->mail_from_name;
|
650 |
}
|
651 |
else {
|
652 |
-
$fromname =
|
653 |
}
|
654 |
if ($row->mail_mode) {
|
655 |
$content_type = "text/html";
|
@@ -664,11 +664,11 @@ class CFMModelForm_maker {
|
|
664 |
}
|
665 |
foreach ($label_order_original as $key => $label_each) {
|
666 |
$type = $label_type[$key];
|
667 |
-
if (strpos($row->script_mail, "%" . $label_each . "%") !== FALSE) {
|
668 |
$new_value = $this->custom_fields_mail($type, $key, $id);
|
669 |
$new_script = str_replace("%" . $label_each . "%", $new_value, $new_script);
|
670 |
}
|
671 |
-
if (strpos($fromname, "%" . $label_each . "%")
|
672 |
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id));
|
673 |
if (substr($new_value, -2) == ', ') {
|
674 |
$new_value = substr($new_value, 0, -2);
|
559 |
}
|
560 |
foreach ($label_order_original as $key => $label_each) {
|
561 |
$type = $label_type[$key];
|
562 |
+
if (strpos($row->script_mail_user, "%" . $label_each . "%") !== FALSE && !in_array($key,$disabled_fields)) {
|
563 |
$new_value = $this->custom_fields_mail($type, $key, $id);
|
564 |
$new_script = str_replace("%" . $label_each . "%", $new_value, $new_script);
|
565 |
}
|
566 |
+
if (strpos($fromname, "%" . $label_each . "%") !== FALSE && !in_array($key,$disabled_fields)) {
|
567 |
$new_value = str_replace('<br>', ', ', $this->custom_fields_mail($type, $key, $id));
|
568 |
if (substr($new_value, -2) == ', ') {
|
569 |
$new_value = substr($new_value, 0, -2);
|
649 |
$fromname = $row->mail_from_name;
|
650 |
}
|
651 |
else {
|
652 |
+
$fromname = '';
|
653 |
}
|
654 |
if ($row->mail_mode) {
|
655 |
$content_type = "text/html";
|
664 |
}
|
665 |
foreach ($label_order_original as $key => $label_each) {
|
666 |
$type = $label_type[$key];
|
667 |
+
if (strpos($row->script_mail, "%" . $label_each . "%") !== FALSE && !in_array($key,$disabled_fields)) {
|
668 |
$new_value = $this->custom_fields_mail($type, $key, $id);
|
669 |
$new_script = str_replace("%" . $label_each . "%", $new_value, $new_script);
|
670 |
}
|
671 |
+
if (strpos($fromname, "%" . $label_each . "%") !== FALSE && !in_array($key,$disabled_fields)) {
|
672 |
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id));
|
673 |
if (substr($new_value, -2) == ', ') {
|
674 |
$new_value = substr($new_value, 0, -2);
|
frontend/views/CFMViewForm_maker.php
CHANGED
@@ -1121,18 +1121,10 @@ class CFMViewForm_maker {
|
|
1121 |
<?php echo $onload_js; ?>
|
1122 |
}
|
1123 |
|
1124 |
-
function
|
1125 |
-
if (contactformOldFunctionOnLoad<?php echo $id ?>) {
|
1126 |
-
contactformOldFunctionOnLoad<?php echo $id ?>();
|
1127 |
-
}
|
1128 |
contactformOnload<?php echo $id ?>();
|
1129 |
-
}
|
1130 |
-
|
1131 |
-
contactformOldFunctionOnLoad<?php echo $id ?> = window.onload;
|
1132 |
-
window.onload = contactformAddToOnload<?php echo $id ?>;
|
1133 |
-
}
|
1134 |
-
var contactformOldFunctionOnLoad<?php echo $id ?> = null;
|
1135 |
-
contactformLoadBody<?php echo $id ?>();
|
1136 |
form_view_count<?php echo $id ?> = 0;
|
1137 |
jQuery(document).ready(function () {
|
1138 |
if (document.getElementById(<?php echo $id ?>+'contactform_view1')) {
|
1121 |
<?php echo $onload_js; ?>
|
1122 |
}
|
1123 |
|
1124 |
+
jQuery(window).load(function () {
|
|
|
|
|
|
|
1125 |
contactformOnload<?php echo $id ?>();
|
1126 |
+
});
|
1127 |
+
|
|
|
|
|
|
|
|
|
|
|
1128 |
form_view_count<?php echo $id ?> = 0;
|
1129 |
jQuery(document).ready(function () {
|
1130 |
if (document.getElementById(<?php echo $id ?>+'contactform_view1')) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-contact-form-builder.html
|
|
4 |
Tags: form, forms, contact form, contact forms, contact form plugin,contact forms plugin, forms plugin, Contact Form Builder, contact form manager, multiple contac forms, custom form,Contact Form Builder with recaptcha, contact form with google map, feedback form, feedback forms, contact us, wordpress contact form, email form, feedback, web form, contact me, email, contact manager, contact us form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
4 |
Tags: form, forms, contact form, contact forms, contact form plugin,contact forms plugin, forms plugin, Contact Form Builder, contact form manager, multiple contac forms, custom form,Contact Form Builder with recaptcha, contact form with google map, feedback form, feedback forms, contact us, wordpress contact form, email form, feedback, web form, contact me, email, contact manager, contact us form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9.1
|
7 |
+
Stable tag: 1.0.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|