Contact Form Builder – a plugin for creating contact and feedback forms - Version 1.0.35

Version Description

Fixed: Inserting fields to custom text in Email.

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Contact Form Builder – a plugin for creating contact and feedback forms
Version 1.0.35
Comparing to
See all releases

Code changes from version 1.0.34 to 1.0.35

admin/views/CFMViewManage_cfm.php CHANGED
@@ -1012,8 +1012,7 @@ class CFMViewManage_cfm {
1012
  <img src="<?php echo WD_CFM_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_from_labels').style.display='block';" style="vertical-align: middle; display:inline-block; margin:0px; float:none; cursor: pointer;" />
1013
  <div style="position: relative; top: -3px;">
1014
  <div id="mail_from_labels" class="email_labels" style="display: none;">
1015
- <?php
1016
- $choise = "document.getElementById('mail_from_name')";
1017
  for ($i = 0; $i < count($label_label); $i++) {
1018
  if (!$field_exist[$i]) {
1019
  continue;
@@ -1026,7 +1025,7 @@ class CFMViewManage_cfm {
1026
  $fld_label = $fld_label[0] . ' ...';
1027
  }
1028
  ?>
1029
- <a onClick="insertAtCursor(<?php echo $choise; ?>,'<?php echo $param; ?>'); document.getElementById('mail_from_labels').style.display='none';" style="display: block; text-decoration:none;"><?php echo $fld_label; ?></a>
1030
  <?php
1031
  }
1032
  ?>
@@ -1091,7 +1090,6 @@ class CFMViewManage_cfm {
1091
  <div style="position: relative; top: -3px;">
1092
  <div id="mail_subject_labels" class="email_labels" style="display: none;" >
1093
  <?php
1094
- $choise = "document.getElementById('mail_subject')";
1095
  for ($i = 0; $i < count($label_label); $i++) {
1096
  if (!$field_exist[$i]) {
1097
  continue;
@@ -1104,7 +1102,7 @@ class CFMViewManage_cfm {
1104
  $fld_label = $fld_label[0] . ' ...';
1105
  }
1106
  ?>
1107
- <a onClick="insertAtCursor(<?php echo $choise; ?>,'<?php echo $param; ?>'); document.getElementById('mail_subject_labels').style.display='none';" style="display: block; text-decoration: none;"><?php echo $fld_label; ?></a>
1108
  <?php
1109
  }
1110
  ?>
@@ -1128,18 +1126,17 @@ class CFMViewManage_cfm {
1128
  <td class="fm_options_value">
1129
  <div style="margin-bottom:5px">
1130
  <?php
1131
- $choise = "document.getElementById('script_mail')";
1132
  for ($i = 0; $i < count($label_label); $i++) {
1133
  if (!$field_exist[$i]) {
1134
  continue;
1135
  }
1136
  $param = htmlspecialchars(addslashes($label_label[$i]));
1137
  ?>
1138
- <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo htmlspecialchars($label_label[$i]); ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
1139
  <?php
1140
  }
1141
  ?>
1142
- <input style="border: 1px solid silver; font-size: 11px; font-weight: bold; display: block;" type="button" value="<?php echo __("All fields list", "contact_form_maker"); ?>" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
1143
  </div>
1144
  <?php
1145
  if (user_can_richedit()) {
@@ -1200,7 +1197,6 @@ class CFMViewManage_cfm {
1200
  <div style="position: relative; top: -3px;">
1201
  <div id="mail_from_name_user_labels" class="email_labels" style="display:none;">
1202
  <?php
1203
- $choise = "document.getElementById('mail_from_name_user')";
1204
  for ($i = 0; $i < count($label_label); $i++) {
1205
  if (!$field_exist[$i]) {
1206
  continue;
@@ -1213,7 +1209,7 @@ class CFMViewManage_cfm {
1213
  $fld_label = $fld_label[0] . ' ...';
1214
  }
1215
  ?>
1216
- <a onClick="insertAtCursor(<?php echo $choise; ?>,'<?php echo $param; ?>'); document.getElementById('mail_from_name_user_labels').style.display='none';" style="display: block; text-decoration: none;"><?php echo $fld_label; ?></a>
1217
  <?php
1218
  }
1219
  ?>
@@ -1255,7 +1251,6 @@ class CFMViewManage_cfm {
1255
  <div style="position: relative; top: -3px;">
1256
  <div id="mail_subject_user_labels" class="email_labels" style="display: none;">
1257
  <?php
1258
- $choise = "document.getElementById('mail_subject_user')";
1259
  for ($i = 0; $i < count($label_label); $i++) {
1260
  if (!$field_exist[$i]) {
1261
  continue;
@@ -1268,7 +1263,7 @@ class CFMViewManage_cfm {
1268
  $fld_label = $fld_label[0] . ' ...';
1269
  }
1270
  ?>
1271
- <a onClick="insertAtCursor(<?php echo $choise; ?>,'<?php echo $param; ?>'); document.getElementById('mail_subject_user_labels').style.display='none';" style="display: block; text-decoration: none;"><?php echo $fld_label; ?></a>
1272
  <?php
1273
  }
1274
  ?>
@@ -1292,18 +1287,17 @@ class CFMViewManage_cfm {
1292
  <td class="fm_options_value">
1293
  <div style="margin-bottom:5px">
1294
  <?php
1295
- $choise = "document.getElementById('script_mail_user')";
1296
  for ($i = 0; $i < count($label_label); $i++) {
1297
  if (!$field_exist[$i]) {
1298
  continue;
1299
  }
1300
  $param = htmlspecialchars(addslashes($label_label[$i]));
1301
  ?>
1302
- <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo htmlspecialchars($label_label[$i]); ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
1303
  <?php
1304
  }
1305
  ?>
1306
- <input style="border: 1px solid silver; font-size: 11px; font-weight: bold; display: block;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
1307
  </div>
1308
  <?php
1309
  if (user_can_richedit()) {
1012
  <img src="<?php echo WD_CFM_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_from_labels').style.display='block';" style="vertical-align: middle; display:inline-block; margin:0px; float:none; cursor: pointer;" />
1013
  <div style="position: relative; top: -3px;">
1014
  <div id="mail_from_labels" class="email_labels" style="display: none;">
1015
+ <?php
 
1016
  for ($i = 0; $i < count($label_label); $i++) {
1017
  if (!$field_exist[$i]) {
1018
  continue;
1025
  $fld_label = $fld_label[0] . ' ...';
1026
  }
1027
  ?>
1028
+ <a onClick="insertAtCursor('mail_from_name','<?php echo $param; ?>'); document.getElementById('mail_from_labels').style.display='none';" style="display: block; text-decoration:none;"><?php echo $fld_label; ?></a>
1029
  <?php
1030
  }
1031
  ?>
1090
  <div style="position: relative; top: -3px;">
1091
  <div id="mail_subject_labels" class="email_labels" style="display: none;" >
1092
  <?php
 
1093
  for ($i = 0; $i < count($label_label); $i++) {
1094
  if (!$field_exist[$i]) {
1095
  continue;
1102
  $fld_label = $fld_label[0] . ' ...';
1103
  }
1104
  ?>
1105
+ <a onClick="insertAtCursor('mail_subject','<?php echo $param; ?>'); document.getElementById('mail_subject_labels').style.display='none';" style="display: block; text-decoration: none;"><?php echo $fld_label; ?></a>
1106
  <?php
1107
  }
1108
  ?>
1126
  <td class="fm_options_value">
1127
  <div style="margin-bottom:5px">
1128
  <?php
 
1129
  for ($i = 0; $i < count($label_label); $i++) {
1130
  if (!$field_exist[$i]) {
1131
  continue;
1132
  }
1133
  $param = htmlspecialchars(addslashes($label_label[$i]));
1134
  ?>
1135
+ <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo htmlspecialchars($label_label[$i]); ?>" onClick="insertAtCursor('script_mail', '<?php echo $param; ?>')" />
1136
  <?php
1137
  }
1138
  ?>
1139
+ <input style="border: 1px solid silver; font-size: 11px; font-weight: bold; display: block;" type="button" value="<?php echo __("All fields list", "contact_form_maker"); ?>" onClick="insertAtCursor('script_mail', 'all')" />
1140
  </div>
1141
  <?php
1142
  if (user_can_richedit()) {
1197
  <div style="position: relative; top: -3px;">
1198
  <div id="mail_from_name_user_labels" class="email_labels" style="display:none;">
1199
  <?php
 
1200
  for ($i = 0; $i < count($label_label); $i++) {
1201
  if (!$field_exist[$i]) {
1202
  continue;
1209
  $fld_label = $fld_label[0] . ' ...';
1210
  }
1211
  ?>
1212
+ <a onClick="insertAtCursor('mail_from_name_user','<?php echo $param; ?>'); document.getElementById('mail_from_name_user_labels').style.display='none';" style="display: block; text-decoration: none;"><?php echo $fld_label; ?></a>
1213
  <?php
1214
  }
1215
  ?>
1251
  <div style="position: relative; top: -3px;">
1252
  <div id="mail_subject_user_labels" class="email_labels" style="display: none;">
1253
  <?php
 
1254
  for ($i = 0; $i < count($label_label); $i++) {
1255
  if (!$field_exist[$i]) {
1256
  continue;
1263
  $fld_label = $fld_label[0] . ' ...';
1264
  }
1265
  ?>
1266
+ <a onClick="insertAtCursor('mail_subject_user','<?php echo $param; ?>'); document.getElementById('mail_subject_user_labels').style.display='none';" style="display: block; text-decoration: none;"><?php echo $fld_label; ?></a>
1267
  <?php
1268
  }
1269
  ?>
1287
  <td class="fm_options_value">
1288
  <div style="margin-bottom:5px">
1289
  <?php
 
1290
  for ($i = 0; $i < count($label_label); $i++) {
1291
  if (!$field_exist[$i]) {
1292
  continue;
1293
  }
1294
  $param = htmlspecialchars(addslashes($label_label[$i]));
1295
  ?>
1296
+ <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo htmlspecialchars($label_label[$i]); ?>" onClick="insertAtCursor('script_mail_user', '<?php echo $param; ?>')" />
1297
  <?php
1298
  }
1299
  ?>
1300
+ <input style="border: 1px solid silver; font-size: 11px; font-weight: bold; display: block;" type="button" value="All fields list" onClick="insertAtCursor('script_mail_user', 'all')" />
1301
  </div>
1302
  <?php
1303
  if (user_can_richedit()) {
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.34
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -170,7 +170,7 @@ if (class_exists('WP_Widget')) {
170
  // Activate plugin.
171
  function contact_form_maker_activate() {
172
  $version = get_option("wd_contact_form_maker_version");
173
- $new_version = '1.0.34';
174
  if ($version && version_compare($version, $new_version, '<')) {
175
  require_once WD_CFM_DIR . "/contact-form-builder-update.php";
176
  contact_form_maker_update($version);
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.35
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
170
  // Activate plugin.
171
  function contact_form_maker_activate() {
172
  $version = get_option("wd_contact_form_maker_version");
173
+ $new_version = '1.0.35';
174
  if ($version && version_compare($version, $new_version, '<')) {
175
  require_once WD_CFM_DIR . "/contact-form-builder-update.php";
176
  contact_form_maker_update($version);
js/contact_form_maker_manage.js CHANGED
@@ -182,9 +182,16 @@ function set_type(type) {
182
  }
183
  }
184
 
185
- function insertAtCursor(myField, myValue) {
 
186
  if (myField.style.display == "none") {
187
- tinyMCE.execCommand('mceInsertContent', false, "%" + myValue + "%");
 
 
 
 
 
 
188
  return;
189
  }
190
  if (document.selection) {
182
  }
183
  }
184
 
185
+ function insertAtCursor(id, myValue) {
186
+ var myField = document.getElementById(id);
187
  if (myField.style.display == "none") {
188
+ var ed = tinymce.get(id);
189
+ if (typeof ed.insertContent == "undefined") {
190
+ tinyMCE.execCommand('mceInsertContent', false, "%" + myValue + "%");
191
+ }
192
+ else {
193
+ ed.insertContent("%" + myValue + "%");
194
+ }
195
  return;
196
  }
197
  if (document.selection) {
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 contact 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, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, text input, validation, send copy, form with captcha, advanced form, recaptcha, contact form with captcha
5
  Requires at least: 3.4
6
  Tested up to: 4.4
7
- Stable tag: 1.0.34
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -138,6 +138,9 @@ After downloading the ZIP file,
138
 
139
  == Changelog ==
140
 
 
 
 
141
  = 1.0.34 =
142
  Changed: Featured plugins page.
143
 
4
  Tags: form, forms, contact form, contact forms, contact form plugin, contact forms plugin, forms plugin, Contact Form Builder, contact form manager, multiple contact 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, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, text input, validation, send copy, form with captcha, advanced form, recaptcha, contact form with captcha
5
  Requires at least: 3.4
6
  Tested up to: 4.4
7
+ Stable tag: 1.0.35
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
138
 
139
  == Changelog ==
140
 
141
+ = 1.0.35 =
142
+ Fixed: Inserting fields to custom text in Email.
143
+
144
  = 1.0.34 =
145
  Changed: Featured plugins page.
146