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

Version Description

Download this release

Release Info

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

Code changes from version 1.0.2 to 1.0.3

admin/views/CFMViewManage_cfm.php CHANGED
@@ -362,17 +362,6 @@ class CFMViewManage_cfm {
362
  gen = <?php echo (($id != 0) ? $row->counter : 1); ?>;
363
 
364
  function enable() {
365
- for (iiiii = 0; iiiii < 1000; iiiii++) {
366
- if (document.getElementsByTagName("iframe")[iiiii]) {
367
- if (document.getElementsByTagName("iframe")[iiiii].id == 'form_maker_editor_ifr') {
368
- id_ifr_editor = iiiii;
369
- break;
370
- }
371
- else {
372
- id_ifr_editor = -1;
373
- }
374
- }
375
- }
376
  if (document.getElementById('formMakerDiv').style.display == 'block') {
377
  jQuery('#formMakerDiv').slideToggle(200);}else{jQuery('#formMakerDiv').slideToggle(400);
378
  }
@@ -889,6 +878,7 @@ class CFMViewManage_cfm {
889
  <a onclick="alert('This option is disabled in free version.'); return false;" href="#" class="button-secondary" id="edit_css" title="Edit CSS">
890
  Edit CSS
891
  </a>
 
892
  </td>
893
  </tr>
894
  <tr valign="top">
362
  gen = <?php echo (($id != 0) ? $row->counter : 1); ?>;
363
 
364
  function enable() {
 
 
 
 
 
 
 
 
 
 
 
365
  if (document.getElementById('formMakerDiv').style.display == 'block') {
366
  jQuery('#formMakerDiv').slideToggle(200);}else{jQuery('#formMakerDiv').slideToggle(400);
367
  }
878
  <a onclick="alert('This option is disabled in free version.'); return false;" href="#" class="button-secondary" id="edit_css" title="Edit CSS">
879
  Edit CSS
880
  </a>
881
+ <div class="spider_description spider_free_desc">Themes are disabled in free version.</div>
882
  </td>
883
  </tr>
884
  <tr valign="top">
admin/views/CFMViewSubmissions_cfm.php CHANGED
@@ -29,7 +29,7 @@ class CFMViewSubmissions_cfm {
29
  <br />
30
  This section allows you to view form submissions.
31
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-7.html">Read More in User Manual</a><br /><br />
32
- This feature is disabled for the non-commercial version.
33
  </div>
34
  <div style="float: right; text-align: right;">
35
  <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromContactFormBuilder.php">
29
  <br />
30
  This section allows you to view form submissions.
31
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-7.html">Read More in User Manual</a><br /><br />
32
+ <span style="color: #FF0000;">This feature is disabled for the non-commercial version.</span>
33
  </div>
34
  <div style="float: right; text-align: right;">
35
  <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromContactFormBuilder.php">
admin/views/CFMViewThemes_cfm.php CHANGED
@@ -28,7 +28,7 @@ class CFMViewThemes_cfm {
28
  <div style="float: left; font-size: 14px; font-weight: bold;">
29
  This section allows you to edit form themes.
30
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-2.html">Read More in User Manual</a><br /><br />
31
- This feature is disabled for the non-commercial version.<br /><br />
32
  Here are some examples standard templates included in the commercial version.
33
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://wpdemo.web-dorado.com/contact-form-builder">Demo</a>
34
  </div>
28
  <div style="float: left; font-size: 14px; font-weight: bold;">
29
  This section allows you to edit form themes.
30
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-2.html">Read More in User Manual</a><br /><br />
31
+ <span style="color: #FF0000;">This feature is disabled for the non-commercial version.</span><br /><br />
32
  Here are some examples standard templates included in the commercial version.
33
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://wpdemo.web-dorado.com/contact-form-builder">Demo</a>
34
  </div>
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.2
7
  * Author: http://web-dorado.com/
8
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
9
  */
@@ -102,21 +102,30 @@ function cfm_do_output_buffer() {
102
  add_action('init', 'cfm_do_output_buffer');
103
 
104
  function contact_form_maker_frontend_main($content) {
105
- $pattern = '[\[Contact_Form_Builder id="([0-9]*)"\]]';
106
- $count_forms_in_post = preg_match_all($pattern, $content, $matches_form);
107
- if ($count_forms_in_post) {
108
- require_once (WD_CFM_DIR . '/frontend/controllers/CFMControllerForm_maker.php');
109
- $controller = new CFMControllerForm_maker();
110
- for ($jj = 0; $jj < $count_forms_in_post; $jj++) {
111
- $padron = $matches_form[0][$jj];
112
- $replacment = $controller->execute($matches_form[1][$jj]);
113
- $content = str_replace($padron, $replacment, $content);
 
 
 
114
  }
115
  }
116
  return $content;
117
  }
118
  add_filter('the_content', 'contact_form_maker_frontend_main', 5000);
119
 
 
 
 
 
 
 
120
 
121
  // Add the Contact Form Builder button to editor.
122
  add_action('wp_ajax_CFMShortcode', 'contact_form_maker_ajax');
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.3
7
  * Author: http://web-dorado.com/
8
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
9
  */
102
  add_action('init', 'cfm_do_output_buffer');
103
 
104
  function contact_form_maker_frontend_main($content) {
105
+ global $cfm_generate_action;
106
+ if ($cfm_generate_action) {
107
+ $pattern = '[\[Contact_Form_Builder id="([0-9]*)"\]]';
108
+ $count_forms_in_post = preg_match_all($pattern, $content, $matches_form);
109
+ if ($count_forms_in_post) {
110
+ require_once (WD_CFM_DIR . '/frontend/controllers/CFMControllerForm_maker.php');
111
+ $controller = new CFMControllerForm_maker();
112
+ for ($jj = 0; $jj < $count_forms_in_post; $jj++) {
113
+ $padron = $matches_form[0][$jj];
114
+ $replacment = $controller->execute($matches_form[1][$jj]);
115
+ $content = str_replace($padron, $replacment, $content);
116
+ }
117
  }
118
  }
119
  return $content;
120
  }
121
  add_filter('the_content', 'contact_form_maker_frontend_main', 5000);
122
 
123
+ $cfm_generate_action = 0;
124
+ function cfm_generate_action() {
125
+ global $cfm_generate_action;
126
+ $cfm_generate_action = 1;
127
+ }
128
+ add_filter('wp_head', 'cfm_generate_action', 10000);
129
 
130
  // Add the Contact Form Builder button to editor.
131
  add_action('wp_ajax_CFMShortcode', 'contact_form_maker_ajax');
css/contact_form_maker_frontend.css CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  .radio-div,
2
  .radio-div *,
3
  .checkbox-div,
1
+ .wdform_map {
2
+ width: inherit !important;
3
+ }
4
+
5
+ div.wdform-element-section {
6
+ width: initial !important;
7
+ }
8
+
9
  .radio-div,
10
  .radio-div *,
11
  .checkbox-div,
css/contact_form_maker_tables.css CHANGED
@@ -620,9 +620,9 @@ div.wd_preview a {
620
  }
621
 
622
  .cfm_logo {
623
- font-family: cursive;
624
- font-size: 23px;
625
- font-weight: bold;
626
  }
627
 
628
  .cfm_black {
@@ -632,3 +632,7 @@ div.wd_preview a {
632
  .cfm_white {
633
  color: #FFFFFF;
634
  }
 
 
 
 
620
  }
621
 
622
  .cfm_logo {
623
+ font-family: cursive !important;
624
+ font-size: 23px !important;
625
+ font-weight: bold !important;
626
  }
627
 
628
  .cfm_black {
632
  .cfm_white {
633
  color: #FFFFFF;
634
  }
635
+
636
+ .spider_free_desc {
637
+ color: #FF0000 !important;
638
+ }
js/contactformmaker.js CHANGED
@@ -2,7 +2,6 @@ j = 2;
2
  var c;
3
  var need_enable = true;;
4
  var a = new Array();
5
- var id_ifr_editor = -1;
6
  if (ajaxurl.indexOf("://") != -1) {
7
  var url_for_ajax = ajaxurl;
8
  }
@@ -1105,8 +1104,8 @@ function close_window() {
1105
  document.getElementById('edit_table').innerHTML = "";
1106
  document.getElementById('show_table').innerHTML = "";
1107
  document.getElementById('main_editor').style.display = "none";
1108
- if (document.getElementsByTagName("iframe")[id_ifr_editor]) {
1109
- ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
1110
  ifr = getIFrameDocument(ifr_id);
1111
  ifr.body.innerHTML = "";
1112
  }
@@ -1601,21 +1600,22 @@ function remove_option(id, num)
1601
  choices_td.removeChild(br);
1602
  }
1603
 
1604
- function getIFrameDocument(aID){
1605
- var rv = null;
1606
- /* if contentDocument exists, W3C compliant (Mozilla) */
1607
- if (document.getElementById(aID).contentDocument){
1608
- rv = document.getElementById(aID).contentDocument;
1609
- } else {
1610
- /* IE */
1611
- rv = document.frames[aID].document;
1612
- }
1613
- return rv;
 
1614
  }
1615
 
1616
  function delete_last_child() {
1617
- if (document.getElementsByTagName("iframe")[id_ifr_editor]) {
1618
- ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
1619
  ifr = getIFrameDocument(ifr_id);
1620
  ifr.body.innerHTML = "";
1621
  }
@@ -1857,8 +1857,8 @@ function type_section_break(i, w_editor){
1857
  document.getElementById('main_editor').style.display="block";
1858
  document.getElementById('main_editor').style.left=iReturnLeft+30+"px";
1859
  document.getElementById('main_editor').style.top=iReturnTop+45+"px";
1860
- if (document.getElementsByTagName("iframe")[id_ifr_editor] && document.getElementById('form_maker_editor').style.display == "none") {
1861
- ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
1862
  ifr = getIFrameDocument(ifr_id);
1863
  ifr.body.innerHTML = w_editor;
1864
  }
@@ -1932,8 +1932,8 @@ function type_editor(i, w_editor){
1932
  document.getElementById('main_editor').style.left=iReturnLeft+30+"px";
1933
  document.getElementById('main_editor').style.top=iReturnTop+45+"px";
1934
 
1935
- if (document.getElementsByTagName("iframe")[id_ifr_editor] && document.getElementById('form_maker_editor').style.display == "none") {
1936
- ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
1937
  ifr = getIFrameDocument(ifr_id);
1938
  ifr.body.innerHTML = w_editor;
1939
  }
@@ -9736,8 +9736,8 @@ function add(key) {
9736
  i=document.getElementById('editing_id').value;
9737
  document.getElementById('editing_id').value = "";
9738
  wdform_field_in_editor=document.getElementById(i+"_element_sectionform_id_temp");
9739
- if (document.getElementsByTagName("iframe")[id_ifr_editor] && document.getElementById('form_maker_editor').style.display == "none") {
9740
- ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
9741
  ifr = getIFrameDocument(ifr_id);
9742
  wdform_field_in_editor.innerHTML = ifr.body.innerHTML;
9743
  }
@@ -9810,8 +9810,8 @@ function add(key) {
9810
  in_editor.setAttribute("align", 'left');
9811
  in_editor.setAttribute("class", 'wdform_section_break');
9812
 
9813
- if (document.getElementsByTagName("iframe")[id_ifr_editor] && document.getElementById('form_maker_editor').style.display == "none") {
9814
- ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
9815
  ifr = getIFrameDocument(ifr_id);
9816
  in_editor.innerHTML = ifr.body.innerHTML;
9817
  }
@@ -9863,8 +9863,8 @@ function add(key) {
9863
  document.getElementById('editing_id').value="";
9864
  wdform_field=document.getElementById("wdform_field"+i);
9865
  destroyChildren(wdform_field);
9866
- if (document.getElementsByTagName("iframe")[id_ifr_editor] && document.getElementById('form_maker_editor').style.display == "none") {
9867
- ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
9868
  ifr = getIFrameDocument(ifr_id);
9869
  wdform_field.innerHTML = ifr.body.innerHTML;
9870
  }
@@ -9977,8 +9977,8 @@ function add(key) {
9977
 
9978
 
9979
 
9980
- if (document.getElementsByTagName("iframe")[id_ifr_editor] && document.getElementById('form_maker_editor').style.display == "none") {
9981
- ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
9982
  ifr = getIFrameDocument(ifr_id);
9983
  wdform_field.innerHTML = ifr.body.innerHTML;
9984
  }
2
  var c;
3
  var need_enable = true;;
4
  var a = new Array();
 
5
  if (ajaxurl.indexOf("://") != -1) {
6
  var url_for_ajax = ajaxurl;
7
  }
1104
  document.getElementById('edit_table').innerHTML = "";
1105
  document.getElementById('show_table').innerHTML = "";
1106
  document.getElementById('main_editor').style.display = "none";
1107
+ if (document.getElementById("form_maker_editor_ifr")) {
1108
+ ifr_id = "form_maker_editor_ifr";
1109
  ifr = getIFrameDocument(ifr_id);
1110
  ifr.body.innerHTML = "";
1111
  }
1600
  choices_td.removeChild(br);
1601
  }
1602
 
1603
+ function getIFrameDocument(aID) {
1604
+ var rv = null;
1605
+ if (document.getElementById(aID) && document.getElementById(aID).contentDocument){
1606
+ /* if contentDocument exists, W3C compliant (Mozilla) */
1607
+ rv = document.getElementById(aID).contentDocument;
1608
+ }
1609
+ else if (document.getElementById(aID)) {
1610
+ /* IE */
1611
+ rv = document.frames[aID].document;
1612
+ }
1613
+ return rv;
1614
  }
1615
 
1616
  function delete_last_child() {
1617
+ if (document.getElementById("form_maker_editor_ifr")) {
1618
+ ifr_id = "form_maker_editor_ifr";
1619
  ifr = getIFrameDocument(ifr_id);
1620
  ifr.body.innerHTML = "";
1621
  }
1857
  document.getElementById('main_editor').style.display="block";
1858
  document.getElementById('main_editor').style.left=iReturnLeft+30+"px";
1859
  document.getElementById('main_editor').style.top=iReturnTop+45+"px";
1860
+ if (document.getElementById("form_maker_editor_ifr") && document.getElementById('form_maker_editor').style.display == "none") {
1861
+ ifr_id = "form_maker_editor_ifr";
1862
  ifr = getIFrameDocument(ifr_id);
1863
  ifr.body.innerHTML = w_editor;
1864
  }
1932
  document.getElementById('main_editor').style.left=iReturnLeft+30+"px";
1933
  document.getElementById('main_editor').style.top=iReturnTop+45+"px";
1934
 
1935
+ if (document.getElementById("form_maker_editor_ifr") && document.getElementById('form_maker_editor').style.display == "none") {
1936
+ ifr_id = "form_maker_editor_ifr";
1937
  ifr = getIFrameDocument(ifr_id);
1938
  ifr.body.innerHTML = w_editor;
1939
  }
9736
  i=document.getElementById('editing_id').value;
9737
  document.getElementById('editing_id').value = "";
9738
  wdform_field_in_editor=document.getElementById(i+"_element_sectionform_id_temp");
9739
+ if (document.getElementById("form_maker_editor_ifr") && document.getElementById('form_maker_editor').style.display == "none") {
9740
+ ifr_id = "form_maker_editor_ifr";
9741
  ifr = getIFrameDocument(ifr_id);
9742
  wdform_field_in_editor.innerHTML = ifr.body.innerHTML;
9743
  }
9810
  in_editor.setAttribute("align", 'left');
9811
  in_editor.setAttribute("class", 'wdform_section_break');
9812
 
9813
+ if (document.getElementById("form_maker_editor_ifr") && document.getElementById('form_maker_editor').style.display == "none") {
9814
+ ifr_id = "form_maker_editor_ifr";
9815
  ifr = getIFrameDocument(ifr_id);
9816
  in_editor.innerHTML = ifr.body.innerHTML;
9817
  }
9863
  document.getElementById('editing_id').value="";
9864
  wdform_field=document.getElementById("wdform_field"+i);
9865
  destroyChildren(wdform_field);
9866
+ if (document.getElementById("form_maker_editor_ifr") && document.getElementById('form_maker_editor').style.display == "none") {
9867
+ ifr_id = "form_maker_editor_ifr";
9868
  ifr = getIFrameDocument(ifr_id);
9869
  wdform_field.innerHTML = ifr.body.innerHTML;
9870
  }
9977
 
9978
 
9979
 
9980
+ if (document.getElementById("form_maker_editor_ifr") && document.getElementById('form_maker_editor').style.display == "none") {
9981
+ ifr_id = "form_maker_editor_ifr";
9982
  ifr = getIFrameDocument(ifr_id);
9983
  wdform_field.innerHTML = ifr.body.innerHTML;
9984
  }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Contact Form Builder ===
2
  Contributors: webdorado
3
  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 us form, contact manager
5
  Requires at least: 3.0
6
  Tested up to: 3.9.1
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
1
  === Contact Form Builder ===
2
  Contributors: webdorado
3
  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.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10