Version Description
Download this release
Release Info
Developer | webdorado |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.7.6 |
Comparing to | |
See all releases |
Code changes from version 1.7.5 to 1.7.6
- admin/controllers/FMControllerManage_fm.php +69 -3
- admin/models/FMModelManage_fm.php +12 -0
- admin/views/FMViewBlocked_ips_fm.php +1 -1
- admin/views/FMViewManage_fm.php +516 -10
- admin/views/FMViewSubmissions_fm.php +1 -1
- admin/views/FMViewThemes_fm.php +2 -2
- css/form_maker_frontend.css +4 -0
- css/style.css +34 -0
- form-maker.php +3 -3
- form_maker_insert.php +21 -10
- form_maker_update.php +17 -0
- frontend/controllers/FMControllerForm_maker.php +3 -0
- frontend/models/FMModelForm_maker.php +1446 -1672
- frontend/views/FMViewForm_maker.php +513 -73
- images/add_condition.png +0 -0
- js/form_maker_editor_button.js +1 -1
- js/form_maker_manage.js +450 -0
- {images → js/images}/form_maker_edit_but.png +0 -0
- js/main_div_front_end.js +1 -1
- readme.txt +1 -1
admin/controllers/FMControllerManage_fm.php
CHANGED
@@ -322,6 +322,17 @@ function before_reset() {
|
|
322 |
$mail_from_user = (isset($_POST['mail_from_user']) ? esc_html(stripslashes($_POST['mail_from_user'])) : '');
|
323 |
$mail_from_name_user = (isset($_POST['mail_from_name_user']) ? esc_html(stripslashes($_POST['mail_from_name_user'])) : '');
|
324 |
$reply_to_user = (isset($_POST['reply_to_user']) ? esc_html(stripslashes($_POST['reply_to_user'])) : '');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
$script_mail_user = (isset($_POST['script_mail_user']) ? stripslashes($_POST['script_mail_user']) : '%all%');
|
326 |
$submit_text = (isset($_POST['submit_text']) ? stripslashes($_POST['submit_text']) : '');
|
327 |
$url = (isset($_POST['url']) ? esc_html(stripslashes($_POST['url'])) : '');
|
@@ -364,6 +375,17 @@ function before_reset() {
|
|
364 |
'mail_from_user' => $mail_from_user,
|
365 |
'mail_from_name_user' => $mail_from_name_user,
|
366 |
'reply_to_user' => $reply_to_user,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
'script_mail_user' => $script_mail_user,
|
368 |
'submit_text' => $submit_text,
|
369 |
'url' => $url,
|
@@ -539,7 +561,7 @@ function before_reset() {
|
|
539 |
'%s',
|
540 |
'%s',
|
541 |
'%s',
|
542 |
-
'%
|
543 |
'%s',
|
544 |
'%s',
|
545 |
'%s',
|
@@ -679,6 +701,17 @@ function before_reset() {
|
|
679 |
'mail_from_user' => '',
|
680 |
'mail_from_name_user' => '',
|
681 |
'reply_to_user' => '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
682 |
), array(
|
683 |
'%s',
|
684 |
'%s',
|
@@ -700,7 +733,7 @@ function before_reset() {
|
|
700 |
'%s',
|
701 |
'%s',
|
702 |
'%s',
|
703 |
-
'%
|
704 |
'%s',
|
705 |
'%s',
|
706 |
'%s',
|
@@ -719,6 +752,17 @@ function before_reset() {
|
|
719 |
'%s',
|
720 |
'%s',
|
721 |
'%s',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
722 |
));
|
723 |
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
724 |
// $_POST['current_id'] = $id;
|
@@ -796,6 +840,17 @@ function before_reset() {
|
|
796 |
'mail_from_user' => $row->mail_from_user,
|
797 |
'mail_from_name_user' => $row->mail_from_name_user,
|
798 |
'reply_to_user' => $row->reply_to_user,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
), array(
|
800 |
'%s',
|
801 |
'%s',
|
@@ -817,7 +872,7 @@ function before_reset() {
|
|
817 |
'%s',
|
818 |
'%s',
|
819 |
'%s',
|
820 |
-
'%
|
821 |
'%s',
|
822 |
'%s',
|
823 |
'%s',
|
@@ -836,6 +891,17 @@ function before_reset() {
|
|
836 |
'%s',
|
837 |
'%s',
|
838 |
'%s',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
839 |
));
|
840 |
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
841 |
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
322 |
$mail_from_user = (isset($_POST['mail_from_user']) ? esc_html(stripslashes($_POST['mail_from_user'])) : '');
|
323 |
$mail_from_name_user = (isset($_POST['mail_from_name_user']) ? esc_html(stripslashes($_POST['mail_from_name_user'])) : '');
|
324 |
$reply_to_user = (isset($_POST['reply_to_user']) ? esc_html(stripslashes($_POST['reply_to_user'])) : '');
|
325 |
+
$condition = (isset($_POST['condition']) ? esc_html(stripslashes($_POST['condition'])) : '');
|
326 |
+
$mail_cc = (isset($_POST['mail_cc']) ? esc_html(stripslashes($_POST['mail_cc'])) : '');
|
327 |
+
$mail_cc_user = (isset($_POST['mail_cc_user']) ? esc_html(stripslashes($_POST['mail_cc_user'])) : '');
|
328 |
+
$mail_bcc = (isset($_POST['mail_bcc']) ? esc_html(stripslashes($_POST['mail_bcc'])) : '');
|
329 |
+
$mail_bcc_user = (isset($_POST['mail_bcc_user']) ? esc_html(stripslashes($_POST['mail_bcc_user'])) : '');
|
330 |
+
$mail_subject = (isset($_POST['mail_subject']) ? esc_html(stripslashes($_POST['mail_subject'])) : '');
|
331 |
+
$mail_subject_user = (isset($_POST['mail_subject_user']) ? esc_html(stripslashes($_POST['mail_subject_user'])) : '');
|
332 |
+
$mail_mode = (isset($_POST['mail_mode']) ? esc_html(stripslashes($_POST['mail_mode'])) : 1);
|
333 |
+
$mail_mode_user = (isset($_POST['mail_mode_user']) ? esc_html(stripslashes($_POST['mail_mode_user'])) : 1);
|
334 |
+
$mail_attachment = (isset($_POST['mail_attachment']) ? esc_html(stripslashes($_POST['mail_attachment'])) : 1);
|
335 |
+
$mail_attachment_user = (isset($_POST['mail_attachment_user']) ? esc_html(stripslashes($_POST['mail_attachment_user'])) : 1);
|
336 |
$script_mail_user = (isset($_POST['script_mail_user']) ? stripslashes($_POST['script_mail_user']) : '%all%');
|
337 |
$submit_text = (isset($_POST['submit_text']) ? stripslashes($_POST['submit_text']) : '');
|
338 |
$url = (isset($_POST['url']) ? esc_html(stripslashes($_POST['url'])) : '');
|
375 |
'mail_from_user' => $mail_from_user,
|
376 |
'mail_from_name_user' => $mail_from_name_user,
|
377 |
'reply_to_user' => $reply_to_user,
|
378 |
+
'condition' => $condition,
|
379 |
+
'mail_cc' => $mail_cc,
|
380 |
+
'mail_cc_user' => $mail_cc_user,
|
381 |
+
'mail_bcc' => $mail_bcc,
|
382 |
+
'mail_bcc_user' => $mail_bcc_user,
|
383 |
+
'mail_subject' => $mail_subject,
|
384 |
+
'mail_subject_user' => $mail_subject_user,
|
385 |
+
'mail_mode' => $mail_mode,
|
386 |
+
'mail_mode_user' => $mail_mode_user,
|
387 |
+
'mail_attachment' => $mail_attachment,
|
388 |
+
'mail_attachment_user' => $mail_attachment_user,
|
389 |
'script_mail_user' => $script_mail_user,
|
390 |
'submit_text' => $submit_text,
|
391 |
'url' => $url,
|
561 |
'%s',
|
562 |
'%s',
|
563 |
'%s',
|
564 |
+
'%s',
|
565 |
'%s',
|
566 |
'%s',
|
567 |
'%s',
|
701 |
'mail_from_user' => '',
|
702 |
'mail_from_name_user' => '',
|
703 |
'reply_to_user' => '',
|
704 |
+
'condition' => '',
|
705 |
+
'mail_cc' => '',
|
706 |
+
'mail_cc_user' => '',
|
707 |
+
'mail_bcc' => '',
|
708 |
+
'mail_bcc_user' => '',
|
709 |
+
'mail_subject' => '',
|
710 |
+
'mail_subject_user' => '',
|
711 |
+
'mail_mode' => 1,
|
712 |
+
'mail_mode_user' => 1,
|
713 |
+
'mail_attachment' => 1,
|
714 |
+
'mail_attachment_user' => 1,
|
715 |
), array(
|
716 |
'%s',
|
717 |
'%s',
|
733 |
'%s',
|
734 |
'%s',
|
735 |
'%s',
|
736 |
+
'%s',
|
737 |
'%s',
|
738 |
'%s',
|
739 |
'%s',
|
752 |
'%s',
|
753 |
'%s',
|
754 |
'%s',
|
755 |
+
'%s',
|
756 |
+
'%s',
|
757 |
+
'%s',
|
758 |
+
'%s',
|
759 |
+
'%s',
|
760 |
+
'%s',
|
761 |
+
'%s',
|
762 |
+
'%d',
|
763 |
+
'%d',
|
764 |
+
'%d',
|
765 |
+
'%d',
|
766 |
));
|
767 |
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
768 |
// $_POST['current_id'] = $id;
|
840 |
'mail_from_user' => $row->mail_from_user,
|
841 |
'mail_from_name_user' => $row->mail_from_name_user,
|
842 |
'reply_to_user' => $row->reply_to_user,
|
843 |
+
'condition' => $row->condition,
|
844 |
+
'mail_cc' => $row->mail_cc,
|
845 |
+
'mail_cc_user' => $row->mail_cc_user,
|
846 |
+
'mail_bcc' => $row->mail_bcc,
|
847 |
+
'mail_bcc_user' => $row->mail_bcc_user,
|
848 |
+
'mail_subject' => $row->mail_subject,
|
849 |
+
'mail_subject_user' => $row->mail_subject_user,
|
850 |
+
'mail_mode' => $row->mail_mode,
|
851 |
+
'mail_mode_user' => $row->mail_mode_user,
|
852 |
+
'mail_attachment' => $row->mail_attachment,
|
853 |
+
'mail_attachment_user' => $row->mail_attachment_user,
|
854 |
), array(
|
855 |
'%s',
|
856 |
'%s',
|
872 |
'%s',
|
873 |
'%s',
|
874 |
'%s',
|
875 |
+
'%s',
|
876 |
'%s',
|
877 |
'%s',
|
878 |
'%s',
|
891 |
'%s',
|
892 |
'%s',
|
893 |
'%s',
|
894 |
+
'%s',
|
895 |
+
'%s',
|
896 |
+
'%s',
|
897 |
+
'%s',
|
898 |
+
'%s',
|
899 |
+
'%s',
|
900 |
+
'%s',
|
901 |
+
'%d',
|
902 |
+
'%d',
|
903 |
+
'%d',
|
904 |
+
'%d',
|
905 |
));
|
906 |
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
907 |
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
admin/models/FMModelManage_fm.php
CHANGED
@@ -1779,6 +1779,18 @@ class FMModelManage_fm {
|
|
1779 |
$row->mail_from_user = '';
|
1780 |
$row->mail_from_name_user = '';
|
1781 |
$row->reply_to_user = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1782 |
}
|
1783 |
return $row;
|
1784 |
}
|
1779 |
$row->mail_from_user = '';
|
1780 |
$row->mail_from_name_user = '';
|
1781 |
$row->reply_to_user = '';
|
1782 |
+
|
1783 |
+
$row->condition = '';
|
1784 |
+
$row->mail_cc = '';
|
1785 |
+
$row->mail_cc_user = '';
|
1786 |
+
$row->mail_bcc = '';
|
1787 |
+
$row->mail_bcc_user = '';
|
1788 |
+
$row->mail_subject = '';
|
1789 |
+
$row->mail_subject_user = '';
|
1790 |
+
$row->mail_mode = 1;
|
1791 |
+
$row->mail_mode_user = 1;
|
1792 |
+
$row->mail_attachment = 1;
|
1793 |
+
$row->mail_attachment_user = 1;
|
1794 |
}
|
1795 |
return $row;
|
1796 |
}
|
admin/views/FMViewBlocked_ips_fm.php
CHANGED
@@ -38,7 +38,7 @@ class FMViewBlocked_ips_fm {
|
|
38 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
39 |
</div>
|
40 |
<div style="float: right; text-align: right;">
|
41 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/
|
42 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
43 |
</a>
|
44 |
</div>
|
38 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
39 |
</div>
|
40 |
<div style="float: right; text-align: right;">
|
41 |
+
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromFormMaker.php">
|
42 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
43 |
</a>
|
44 |
</div>
|
admin/views/FMViewManage_fm.php
CHANGED
@@ -38,7 +38,7 @@ class FMViewManage_fm {
|
|
38 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
39 |
</div>
|
40 |
<div style="float: right; text-align: right;">
|
41 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/
|
42 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
43 |
</a>
|
44 |
</div>
|
@@ -424,7 +424,7 @@ class FMViewManage_fm {
|
|
424 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-4.html">Read More in User Manual</a>
|
425 |
</div>
|
426 |
<div style="float: right; text-align: right;">
|
427 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/
|
428 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
429 |
</a>
|
430 |
</div>
|
@@ -1375,7 +1375,7 @@ class FMViewManage_fm {
|
|
1375 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-4.html">Read More in User Manual</a>
|
1376 |
</div>
|
1377 |
<div style="float: right; text-align: right;">
|
1378 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/
|
1379 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
1380 |
</a>
|
1381 |
</div>
|
@@ -2260,7 +2260,7 @@ class FMViewManage_fm {
|
|
2260 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-3.html">Read More in User Manual</a>
|
2261 |
</div>
|
2262 |
<div style="float: right; text-align: right;">
|
2263 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/
|
2264 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
2265 |
</a>
|
2266 |
</div>
|
@@ -2644,6 +2644,50 @@ class FMViewManage_fm {
|
|
2644 |
jQuery("#preview_form").attr("href", '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&test_theme=' + jQuery("#theme").val() + '&width=1000&height=500&TB_iframe=1');
|
2645 |
jQuery("#edit_css").attr("href", '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&id=' + jQuery("#theme").val() + '&width=800&height=500&TB_iframe=1');
|
2646 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2647 |
</script>
|
2648 |
<div style="clear: both; float: left; width: 99%;">
|
2649 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
@@ -2651,7 +2695,7 @@ class FMViewManage_fm {
|
|
2651 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-3.html">Read More in User Manual</a>
|
2652 |
</div>
|
2653 |
<div style="float: right; text-align: right;">
|
2654 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/
|
2655 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
2656 |
</a>
|
2657 |
</div>
|
@@ -2666,7 +2710,7 @@ class FMViewManage_fm {
|
|
2666 |
spider_check_email('reply_to_user') ||
|
2667 |
spider_check_email('mail_from_other') ||
|
2668 |
spider_check_email('reply_to_other') ||
|
2669 |
-
spider_check_email('paypal_email')) {return false;}; spider_set_input_value('task', 'save_options')" value="Save"/>
|
2670 |
<input class="button-secondary" type="submit" onclick="if (spider_check_email('mail') ||
|
2671 |
spider_check_email('from_mail') ||
|
2672 |
spider_check_email('reply_to') ||
|
@@ -2674,7 +2718,7 @@ class FMViewManage_fm {
|
|
2674 |
spider_check_email('reply_to_user') ||
|
2675 |
spider_check_email('mail_from_other') ||
|
2676 |
spider_check_email('reply_to_other') ||
|
2677 |
-
spider_check_email('paypal_email')) {return false;}; spider_set_input_value('task', 'apply_options')" value="Apply"/>
|
2678 |
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel_options')" value="Cancel"/>
|
2679 |
</div>
|
2680 |
<div class="submenu-box" style="width: 99%; float: left; margin: 15px 0 0 0;">
|
@@ -2695,6 +2739,9 @@ class FMViewManage_fm {
|
|
2695 |
<li>
|
2696 |
<a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript')" href="#">JavaScript</a>
|
2697 |
</li>
|
|
|
|
|
|
|
2698 |
</ul>
|
2699 |
</div>
|
2700 |
</div>
|
@@ -2807,7 +2854,31 @@ class FMViewManage_fm {
|
|
2807 |
<label for="from_name">From Name</label>
|
2808 |
</td>
|
2809 |
<td class="fm_options_value">
|
2810 |
-
<input id="from_name" name="from_name" value="<?php echo $row->from_name; ?>" style="width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2811 |
</td>
|
2812 |
</tr>
|
2813 |
<tr valign="top">
|
@@ -2837,6 +2908,72 @@ class FMViewManage_fm {
|
|
2837 |
<input 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 : ''; ?>" />
|
2838 |
</td>
|
2839 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2840 |
<tr>
|
2841 |
<td class="fm_options_label" valign="top">
|
2842 |
<label>Custom Text in Email For Administrator</label>
|
@@ -2891,7 +3028,7 @@ class FMViewManage_fm {
|
|
2891 |
for ($i = 0; $i < $fields_count - 1; $i++) {
|
2892 |
?>
|
2893 |
<div>
|
2894 |
-
<input type="checkbox" name="send_to<?php echo $i; ?>" id="send_to<?php echo $i; ?>" value="<?php echo substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')
|
2895 |
<label for="send_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
2896 |
</div>
|
2897 |
<?php
|
@@ -2913,7 +3050,31 @@ class FMViewManage_fm {
|
|
2913 |
<label for="mail_from_name_user">From Name</label>
|
2914 |
</td>
|
2915 |
<td class="fm_options_value">
|
2916 |
-
<input id="mail_from_name_user" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" style="width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2917 |
</td>
|
2918 |
</tr>
|
2919 |
<tr valign="top">
|
@@ -2924,6 +3085,72 @@ class FMViewManage_fm {
|
|
2924 |
<input id="reply_to_user" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" style="width:250px;"/>
|
2925 |
</td>
|
2926 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2927 |
<tr>
|
2928 |
<td class="fm_options_label" valign="top">
|
2929 |
<label>Custom Text in Email For User</label>
|
@@ -3145,6 +3372,266 @@ class FMViewManage_fm {
|
|
3145 |
</tr>
|
3146 |
</table>
|
3147 |
</fieldset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3148 |
<input type="hidden" name="fieldset_id" id="fieldset_id" value="<?php echo WDW_FM_Library::get('fieldset_id', 'general'); ?>" />
|
3149 |
|
3150 |
<input type="hidden" id="task" name="task" value=""/>
|
@@ -3154,6 +3641,25 @@ class FMViewManage_fm {
|
|
3154 |
jQuery(window).load(function () {
|
3155 |
form_maker_options_tabs(jQuery("#fieldset_id").val());
|
3156 |
spider_popup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3157 |
});
|
3158 |
</script>
|
3159 |
<?php
|
38 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
39 |
</div>
|
40 |
<div style="float: right; text-align: right;">
|
41 |
+
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromFormMaker.php">
|
42 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
43 |
</a>
|
44 |
</div>
|
424 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-4.html">Read More in User Manual</a>
|
425 |
</div>
|
426 |
<div style="float: right; text-align: right;">
|
427 |
+
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromFormMaker.php">
|
428 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
429 |
</a>
|
430 |
</div>
|
1375 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-4.html">Read More in User Manual</a>
|
1376 |
</div>
|
1377 |
<div style="float: right; text-align: right;">
|
1378 |
+
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromFormMaker.php">
|
1379 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
1380 |
</a>
|
1381 |
</div>
|
2260 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-3.html">Read More in User Manual</a>
|
2261 |
</div>
|
2262 |
<div style="float: right; text-align: right;">
|
2263 |
+
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromFormMaker.php">
|
2264 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
2265 |
</a>
|
2266 |
</div>
|
2644 |
jQuery("#preview_form").attr("href", '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&test_theme=' + jQuery("#theme").val() + '&width=1000&height=500&TB_iframe=1');
|
2645 |
jQuery("#edit_css").attr("href", '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&id=' + jQuery("#theme").val() + '&width=800&height=500&TB_iframe=1');
|
2646 |
}
|
2647 |
+
function set_condition() {
|
2648 |
+
field_condition ='';
|
2649 |
+
|
2650 |
+
for(i=0;i<100;i++)
|
2651 |
+
{
|
2652 |
+
conditions = '';
|
2653 |
+
if(document.getElementById("condition"+i))
|
2654 |
+
{
|
2655 |
+
field_condition+=document.getElementById("show_hide"+i).value+"*:*show_hide*:*";
|
2656 |
+
field_condition+=document.getElementById("fields"+i).value+"*:*field_label*:*";
|
2657 |
+
field_condition+=document.getElementById("all_any"+i).value+"*:*all_any*:*";
|
2658 |
+
|
2659 |
+
for(k=0;k<100;k++)
|
2660 |
+
{
|
2661 |
+
if(document.getElementById("condition_div"+i+"_"+k))
|
2662 |
+
{
|
2663 |
+
conditions+=document.getElementById("field_labels"+i+"_"+k).value+"***";
|
2664 |
+
conditions+=document.getElementById("is_select"+i+"_"+k).value+"***";
|
2665 |
+
if(document.getElementById("field_value"+i+"_"+k).tagName=="SELECT" && document.getElementById("field_value"+i+"_"+k).getAttribute('multiple'))
|
2666 |
+
{
|
2667 |
+
var sel = document.getElementById("field_value"+i+"_"+k);
|
2668 |
+
var selValues = '';
|
2669 |
+
for(m=0; m < sel.length; m++)
|
2670 |
+
{
|
2671 |
+
if(sel.options[m].selected)
|
2672 |
+
{
|
2673 |
+
selValues += sel.options[m].value+"@@@";
|
2674 |
+
}
|
2675 |
+
}
|
2676 |
+
conditions+=selValues;
|
2677 |
+
}
|
2678 |
+
else
|
2679 |
+
conditions+=document.getElementById("field_value"+i+"_"+k).value;
|
2680 |
+
conditions+="*:*next_condition*:*";
|
2681 |
+
}
|
2682 |
+
}
|
2683 |
+
|
2684 |
+
field_condition+=conditions;
|
2685 |
+
field_condition+="*:*new_condition*:*";
|
2686 |
+
|
2687 |
+
}
|
2688 |
+
}
|
2689 |
+
document.getElementById('condition').value = field_condition;
|
2690 |
+
}
|
2691 |
</script>
|
2692 |
<div style="clear: both; float: left; width: 99%;">
|
2693 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
2695 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-3.html">Read More in User Manual</a>
|
2696 |
</div>
|
2697 |
<div style="float: right; text-align: right;">
|
2698 |
+
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromFormMaker.php">
|
2699 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
2700 |
</a>
|
2701 |
</div>
|
2710 |
spider_check_email('reply_to_user') ||
|
2711 |
spider_check_email('mail_from_other') ||
|
2712 |
spider_check_email('reply_to_other') ||
|
2713 |
+
spider_check_email('paypal_email')) {return false;}; set_condition(); spider_set_input_value('task', 'save_options')" value="Save"/>
|
2714 |
<input class="button-secondary" type="submit" onclick="if (spider_check_email('mail') ||
|
2715 |
spider_check_email('from_mail') ||
|
2716 |
spider_check_email('reply_to') ||
|
2718 |
spider_check_email('reply_to_user') ||
|
2719 |
spider_check_email('mail_from_other') ||
|
2720 |
spider_check_email('reply_to_other') ||
|
2721 |
+
spider_check_email('paypal_email')) {return false;}; set_condition(); spider_set_input_value('task', 'apply_options')" value="Apply"/>
|
2722 |
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel_options')" value="Cancel"/>
|
2723 |
</div>
|
2724 |
<div class="submenu-box" style="width: 99%; float: left; margin: 15px 0 0 0;">
|
2739 |
<li>
|
2740 |
<a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript')" href="#">JavaScript</a>
|
2741 |
</li>
|
2742 |
+
<li>
|
2743 |
+
<a id="conditions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('conditions')" href="#">Conditional Fields</a>
|
2744 |
+
</li>
|
2745 |
</ul>
|
2746 |
</div>
|
2747 |
</div>
|
2854 |
<label for="from_name">From Name</label>
|
2855 |
</td>
|
2856 |
<td class="fm_options_value">
|
2857 |
+
<input id="from_name" name="from_name" value="<?php echo $row->from_name; ?>" style="width: 230px;" />
|
2858 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_from_labels').style.display='block';" style="vertical-align: middle; display:inline-block; margin:0px; float:none;">
|
2859 |
+
<?php
|
2860 |
+
$choise = "document.getElementById('from_name')";
|
2861 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_from_labels" class="email_labels" style="display:none;">';
|
2862 |
+
for($i=0; $i<count($label_label); $i++)
|
2863 |
+
{
|
2864 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_matrix")
|
2865 |
+
continue;
|
2866 |
+
|
2867 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2868 |
+
|
2869 |
+
$fld_label = $param;
|
2870 |
+
if(strlen($fld_label)>30)
|
2871 |
+
{
|
2872 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
2873 |
+
$fld_label = explode("\n", $fld_label);
|
2874 |
+
$fld_label = $fld_label[0] . ' ...';
|
2875 |
+
}
|
2876 |
+
|
2877 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_from_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
2878 |
+
|
2879 |
+
}
|
2880 |
+
echo '</div></div>';
|
2881 |
+
?>
|
2882 |
</td>
|
2883 |
</tr>
|
2884 |
<tr valign="top">
|
2908 |
<input 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 : ''; ?>" />
|
2909 |
</td>
|
2910 |
</tr>
|
2911 |
+
<tr valign="top">
|
2912 |
+
<td class="fm_options_label">
|
2913 |
+
<label> CC: </label>
|
2914 |
+
</td>
|
2915 |
+
<td class="fm_options_value">
|
2916 |
+
<input id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" style="width:250px;" />
|
2917 |
+
</td>
|
2918 |
+
</tr>
|
2919 |
+
<tr valign="top">
|
2920 |
+
<td class="fm_options_label">
|
2921 |
+
<label> BCC: </label>
|
2922 |
+
</td>
|
2923 |
+
<td class="fm_options_value">
|
2924 |
+
<input id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" style="width:250px;" />
|
2925 |
+
</td>
|
2926 |
+
</tr>
|
2927 |
+
<tr valign="top">
|
2928 |
+
<td class="fm_options_label">
|
2929 |
+
<label> Subject: </label>
|
2930 |
+
</td>
|
2931 |
+
<td class="fm_options_value">
|
2932 |
+
<input id="mail_subject" name="mail_subject" value="<?php echo $row->mail_subject ?>" style="width:230px;" />
|
2933 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_subject_labels').style.display='block';" style="vertical-align: middle; display:inline-block; margin:0px; float:none;">
|
2934 |
+
<?php
|
2935 |
+
$choise = "document.getElementById('mail_subject')";
|
2936 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_subject_labels" class="email_labels" style="display:none;">';
|
2937 |
+
for($i=0; $i<count($label_label); $i++)
|
2938 |
+
{
|
2939 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_matrix")
|
2940 |
+
continue;
|
2941 |
+
|
2942 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2943 |
+
|
2944 |
+
$fld_label = $param;
|
2945 |
+
if(strlen($fld_label)>30)
|
2946 |
+
{
|
2947 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
2948 |
+
$fld_label = explode("\n", $fld_label);
|
2949 |
+
$fld_label = $fld_label[0] . ' ...';
|
2950 |
+
}
|
2951 |
+
|
2952 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_subject_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
2953 |
+
|
2954 |
+
}
|
2955 |
+
echo '</div></div>';
|
2956 |
+
?>
|
2957 |
+
</td>
|
2958 |
+
</tr>
|
2959 |
+
<tr valign="top">
|
2960 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
2961 |
+
<label> Mode: </label>
|
2962 |
+
</td>
|
2963 |
+
<td class="fm_options_value">
|
2964 |
+
<input type="radio" name="mail_mode" id="htmlmode" value="1" <?php if($row->mail_mode==1 ) echo "checked" ?> /> <label for="htmlmode">HTML</label>
|
2965 |
+
<input type="radio" name="mail_mode" id="textmode" value="0" <?php if($row->mail_mode==0 ) echo "checked" ?> /> <label for="textmode">Text</label>
|
2966 |
+
</td>
|
2967 |
+
</tr>
|
2968 |
+
<tr valign="top">
|
2969 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
2970 |
+
<label> Attach File: </label>
|
2971 |
+
</td>
|
2972 |
+
<td class="fm_options_value">
|
2973 |
+
<input type="radio" name="mail_attachment" value="1" id="en_attach" <?php if($row->mail_attachment==1 ) echo "checked" ?> /> <label for="en_attach">Yes</label>
|
2974 |
+
<input type="radio" name="mail_attachment" id="dis_attach" value="0" <?php if($row->mail_attachment==0 ) echo "checked" ?> /> <label for="dis_attach">No</label>
|
2975 |
+
</td>
|
2976 |
+
</tr>
|
2977 |
<tr>
|
2978 |
<td class="fm_options_label" valign="top">
|
2979 |
<label>Custom Text in Email For Administrator</label>
|
3028 |
for ($i = 0; $i < $fields_count - 1; $i++) {
|
3029 |
?>
|
3030 |
<div>
|
3031 |
+
<input type="checkbox" name="send_to<?php echo $i; ?>" id="send_to<?php echo $i; ?>" value="<?php echo (strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo (is_numeric(strpos($row->send_to, '*'.(strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]).'*')) ? 'checked="checked"' : '' ); ?> style="margin: 0px 5px 0px 0px;" />
|
3032 |
<label for="send_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
3033 |
</div>
|
3034 |
<?php
|
3050 |
<label for="mail_from_name_user">From Name</label>
|
3051 |
</td>
|
3052 |
<td class="fm_options_value">
|
3053 |
+
<input id="mail_from_name_user" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" style="width: 230px;"/>
|
3054 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_from_name_user_labels').style.display='block';" style="vertical-align: middle; display:inline-block; margin:0px; float:none;">
|
3055 |
+
<?php
|
3056 |
+
$choise = "document.getElementById('mail_from_name_user')";
|
3057 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_from_name_user_labels" class="email_labels" style="display:none;">';
|
3058 |
+
for($i=0; $i<count($label_label); $i++)
|
3059 |
+
{
|
3060 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy")
|
3061 |
+
continue;
|
3062 |
+
|
3063 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3064 |
+
|
3065 |
+
$fld_label = $param;
|
3066 |
+
if(strlen($fld_label)>30)
|
3067 |
+
{
|
3068 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3069 |
+
$fld_label = explode("\n", $fld_label);
|
3070 |
+
$fld_label = $fld_label[0] . ' ...';
|
3071 |
+
}
|
3072 |
+
|
3073 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3074 |
+
|
3075 |
+
}
|
3076 |
+
echo '</div></div>';
|
3077 |
+
?>
|
3078 |
</td>
|
3079 |
</tr>
|
3080 |
<tr valign="top">
|
3085 |
<input id="reply_to_user" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" style="width:250px;"/>
|
3086 |
</td>
|
3087 |
</tr>
|
3088 |
+
<tr valign="top">
|
3089 |
+
<td class="fm_options_label">
|
3090 |
+
<label> CC: </label>
|
3091 |
+
</td>
|
3092 |
+
<td class="fm_options_value">
|
3093 |
+
<input id="mail_cc_user" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" style="width:250px;" />
|
3094 |
+
</td>
|
3095 |
+
</tr>
|
3096 |
+
<tr valign="top">
|
3097 |
+
<td class="fm_options_label">
|
3098 |
+
<label> BCC: </label>
|
3099 |
+
</td>
|
3100 |
+
<td class="fm_options_value">
|
3101 |
+
<input id="mail_bcc_user" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" style="width:250px;" />
|
3102 |
+
</td>
|
3103 |
+
</tr>
|
3104 |
+
<tr valign="top">
|
3105 |
+
<td class="fm_options_label">
|
3106 |
+
<label> Subject: </label>
|
3107 |
+
</td>
|
3108 |
+
<td class="fm_options_value">
|
3109 |
+
<input id="mail_subject_user" name="mail_subject_user" value="<?php echo $row->mail_subject_user ?>" style="width:230px;" />
|
3110 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_subject_user_labels').style.display='block';" style="vertical-align: middle; display:inline-block; margin:0px; float:none;">
|
3111 |
+
<?php
|
3112 |
+
$choise = "document.getElementById('mail_subject_user')";
|
3113 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_subject_user_labels" class="email_labels" style="display:none;">';
|
3114 |
+
for($i=0; $i<count($label_label); $i++)
|
3115 |
+
{
|
3116 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy")
|
3117 |
+
continue;
|
3118 |
+
|
3119 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3120 |
+
|
3121 |
+
$fld_label = $param;
|
3122 |
+
if(strlen($fld_label)>30)
|
3123 |
+
{
|
3124 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3125 |
+
$fld_label = explode("\n", $fld_label);
|
3126 |
+
$fld_label = $fld_label[0] . ' ...';
|
3127 |
+
}
|
3128 |
+
|
3129 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_subject_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3130 |
+
|
3131 |
+
}
|
3132 |
+
echo '</div></div>';
|
3133 |
+
?>
|
3134 |
+
</td>
|
3135 |
+
</tr>
|
3136 |
+
<tr valign="top">
|
3137 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
3138 |
+
<label> Mode: </label>
|
3139 |
+
</td>
|
3140 |
+
<td class="fm_options_value">
|
3141 |
+
<input type="radio" name="mail_mode_user" id="htmlmode_user" value="1" <?php if($row->mail_mode_user==1 ) echo "checked" ?> /> <label for="htmlmode_user">HTML</label>
|
3142 |
+
<input type="radio" name="mail_mode_user" id="textmode_user" value="0" <?php if($row->mail_mode_user==0 ) echo "checked" ?> /> <label for="textmode_user">Text</label>
|
3143 |
+
</td>
|
3144 |
+
</tr>
|
3145 |
+
<tr valign="top">
|
3146 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
3147 |
+
<label> Attach File: </label>
|
3148 |
+
</td>
|
3149 |
+
<td class="fm_options_value">
|
3150 |
+
<input type="radio" name="mail_attachment_user" value="1" id="en_attach_user" <?php if($row->mail_attachment_user==1 ) echo "checked" ?> /> <label for="en_attach_user">Yes</label>
|
3151 |
+
<input type="radio" name="mail_attachment_user" id="dis_attach_user" value="0" <?php if($row->mail_attachment_user==0 ) echo "checked" ?> /> <label for="dis_attach_user">No</label>
|
3152 |
+
</td>
|
3153 |
+
</tr>
|
3154 |
<tr>
|
3155 |
<td class="fm_options_label" valign="top">
|
3156 |
<label>Custom Text in Email For User</label>
|
3372 |
</tr>
|
3373 |
</table>
|
3374 |
</fieldset>
|
3375 |
+
<fieldset id="conditions_fieldset" class="adminform fm_fieldset_deactive">
|
3376 |
+
<legend style="color:#0B55C4;font-weight: bold;">Conditional Fields</legend>
|
3377 |
+
<?php
|
3378 |
+
$ids = array();
|
3379 |
+
$types = array();
|
3380 |
+
$labels = array();
|
3381 |
+
$paramss = array();
|
3382 |
+
$all_ids = array();
|
3383 |
+
$all_labels = array();
|
3384 |
+
|
3385 |
+
$select_and_input = array("type_text", "type_password", "type_textarea", "type_name", "type_number", "type_phone", "type_submitter_mail", "type_address", "type_checkbox", "type_radio", "type_own_select", "type_paypal_price", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping");
|
3386 |
+
$select_type_fields = array("type_address", "type_checkbox", "type_radio", "type_own_select", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping");
|
3387 |
+
|
3388 |
+
$fields=explode('*:*new_field*:*',$row->form_fields);
|
3389 |
+
$fields = array_slice($fields,0, count($fields)-1);
|
3390 |
+
foreach($fields as $field)
|
3391 |
+
{
|
3392 |
+
$temp=explode('*:*id*:*',$field);
|
3393 |
+
array_push($ids, $temp[0]);
|
3394 |
+
array_push($all_ids, $temp[0]);
|
3395 |
+
$temp=explode('*:*type*:*',$temp[1]);
|
3396 |
+
array_push($types, $temp[0]);
|
3397 |
+
$temp=explode('*:*w_field_label*:*',$temp[1]);
|
3398 |
+
array_push($labels, $temp[0]);
|
3399 |
+
array_push($all_labels, $temp[0]);
|
3400 |
+
array_push($paramss, $temp[1]);
|
3401 |
+
|
3402 |
+
}
|
3403 |
+
|
3404 |
+
foreach($types as $key=>$value)
|
3405 |
+
{
|
3406 |
+
if(!in_array($types[$key],$select_and_input))
|
3407 |
+
{
|
3408 |
+
unset($ids[$key]);
|
3409 |
+
unset($labels[$key]);
|
3410 |
+
unset($types[$key]);
|
3411 |
+
unset($paramss[$key]);
|
3412 |
+
}
|
3413 |
+
}
|
3414 |
+
|
3415 |
+
$ids = array_values($ids);
|
3416 |
+
$labels = array_values($labels);
|
3417 |
+
$types = array_values($types);
|
3418 |
+
$paramss = array_values($paramss);
|
3419 |
+
|
3420 |
+
|
3421 |
+
$chose_ids = implode('@@**@@',$ids);
|
3422 |
+
$chose_labels = implode('@@**@@',$labels);
|
3423 |
+
$chose_types = implode('@@**@@',$types);
|
3424 |
+
$chose_paramss = implode('@@**@@',$paramss);
|
3425 |
+
|
3426 |
+
$all_ids_cond = implode('@@**@@',$all_ids);
|
3427 |
+
$all_labels_cond = implode('@@**@@',$all_labels);
|
3428 |
+
|
3429 |
+
$show_hide = array();
|
3430 |
+
$field_label = array();
|
3431 |
+
$all_any = array();
|
3432 |
+
$condition_params = array();
|
3433 |
+
|
3434 |
+
$count_of_conditions=0;
|
3435 |
+
if($row->condition!="")
|
3436 |
+
{
|
3437 |
+
$conditions=explode('*:*new_condition*:*',$row->condition);
|
3438 |
+
$conditions = array_slice($conditions,0, count($conditions)-1);
|
3439 |
+
$count_of_conditions = count($conditions);
|
3440 |
+
|
3441 |
+
foreach($conditions as $condition)
|
3442 |
+
{
|
3443 |
+
$temp=explode('*:*show_hide*:*',$condition);
|
3444 |
+
array_push($show_hide, $temp[0]);
|
3445 |
+
$temp=explode('*:*field_label*:*',$temp[1]);
|
3446 |
+
array_push($field_label, $temp[0]);
|
3447 |
+
$temp=explode('*:*all_any*:*',$temp[1]);
|
3448 |
+
array_push($all_any, $temp[0]);
|
3449 |
+
array_push($condition_params, $temp[1]);
|
3450 |
+
}
|
3451 |
+
|
3452 |
+
}
|
3453 |
+
else
|
3454 |
+
{
|
3455 |
+
$show_hide[0]=1;
|
3456 |
+
$all_any[0]='and';
|
3457 |
+
$condition_params[0]='';
|
3458 |
+
if($all_ids)
|
3459 |
+
$field_label[0] = $all_ids[0];
|
3460 |
+
}
|
3461 |
+
?>
|
3462 |
+
<div>
|
3463 |
+
<span style="font-size:13px;">Add Condition<span/>
|
3464 |
+
<img src="<?php echo WD_FM_URL . '/images/add_condition.png'; ?>" title="add" onclick="add_condition('<?php echo $chose_ids; ?>', '<?php echo addslashes($chose_labels); ?>', '<?php echo $chose_types; ?>', '<?php echo $chose_paramss; ?>', '<?php echo $all_ids_cond; ?>', '<?php echo addslashes($all_labels_cond); ?>')" style="cursor: pointer; vertical-align: middle; margin-left:15px;">
|
3465 |
+
</div>
|
3466 |
+
<?php
|
3467 |
+
|
3468 |
+
for($k=0; $k<$count_of_conditions; $k++)
|
3469 |
+
{
|
3470 |
+
|
3471 |
+
if(in_array($field_label[$k],$all_ids)) : ?>
|
3472 |
+
<div id="condition<?php echo $k; ?>" >
|
3473 |
+
<div id="conditional_fileds<?php echo $k; ?>">
|
3474 |
+
<select id="show_hide<?php echo $k; ?>" name="show_hide<?php echo $k; ?>" style="width:60px; ">
|
3475 |
+
<option value="1" <?php if($show_hide[$k]==1) echo 'selected="selected"'; ?>>show</option>
|
3476 |
+
<option value="0" <?php if($show_hide[$k]==0) echo 'selected="selected"'; ?>>hide</option>
|
3477 |
+
</select>
|
3478 |
+
|
3479 |
+
<select id="fields<?php echo $k; ?>" name="fields<?php echo $k; ?>" style="width:400px; " onChange="" >
|
3480 |
+
<?php
|
3481 |
+
foreach($all_labels as $key => $value)
|
3482 |
+
{
|
3483 |
+
if($field_label[$k]==$all_ids[$key])
|
3484 |
+
$selected = 'selected="selected"';
|
3485 |
+
else
|
3486 |
+
$selected ='';
|
3487 |
+
echo '<option value="'.$all_ids[$key].'" '.$selected.'>'.$value.'</option>';
|
3488 |
+
}
|
3489 |
+
|
3490 |
+
?>
|
3491 |
+
</select>
|
3492 |
+
<span>if</span>
|
3493 |
+
|
3494 |
+
<select id="all_any<?php echo $k; ?>" name="all_any<?php echo $k; ?>" style="width:45px; ">
|
3495 |
+
<option value="and" <?php if($all_any[$k]=="and") echo 'selected="selected"'; ?>>all</option>
|
3496 |
+
<option value="or" <?php if($all_any[$k]=="or") echo 'selected="selected"'; ?>>any</option>
|
3497 |
+
</select>
|
3498 |
+
|
3499 |
+
<span>of the following match:</span>
|
3500 |
+
<img src="<?php echo WD_FM_URL . '/images/add.png'; ?>" title="add" onclick="add_condition_fields(<?php echo $k; ?>,'<?php echo $chose_ids; ?>', '<?php echo addslashes($chose_labels); ?>', '<?php echo $chose_types; ?>', '<?php echo $chose_paramss; ?>')" style="cursor: pointer; vertical-align: middle;">
|
3501 |
+
|
3502 |
+
<img src="<?php echo WD_FM_URL . '/images/page_delete.png'; ?>" onclick="delete_condition('<?php echo $k; ?>')" style="cursor: pointer; vertical-align: middle;">
|
3503 |
+
</div>
|
3504 |
+
|
3505 |
+
<?php
|
3506 |
+
|
3507 |
+
if($condition_params[$k])
|
3508 |
+
{
|
3509 |
+
$_params =explode('*:*next_condition*:*',$condition_params[$k]);
|
3510 |
+
$_params = array_slice($_params,0, count($_params)-1);
|
3511 |
+
|
3512 |
+
foreach($_params as $key=>$_param)
|
3513 |
+
{
|
3514 |
+
$key_select_or_input ='';
|
3515 |
+
$param_values = explode('***',$_param);
|
3516 |
+
$multiselect = explode('@@@',$param_values[2]);
|
3517 |
+
|
3518 |
+
?>
|
3519 |
+
<div id="condition_div<?php echo $k; ?>_<?php echo $key; ?>">
|
3520 |
+
<select id="field_labels<?php echo $k; ?>_<?php echo $key; ?>" onchange="change_choices(this.options[this.selectedIndex].id+'_<?php echo $key; ?>','<?php echo $chose_ids; ?>', '<?php echo $chose_types; ?>', '<?php echo $chose_paramss; ?>')" style="width:350px;"/>
|
3521 |
+
<?php
|
3522 |
+
foreach($labels as $key1 => $value)
|
3523 |
+
{
|
3524 |
+
if($param_values[0]==$ids[$key1])
|
3525 |
+
{
|
3526 |
+
$selected = 'selected="selected"';
|
3527 |
+
if ($types[$key1]=="type_checkbox" || $types[$key1]=="type_paypal_checkbox")
|
3528 |
+
$multiple = 'multiple="multiple" class="multiple_select"';
|
3529 |
+
else
|
3530 |
+
$multiple ='';
|
3531 |
+
|
3532 |
+
$key_select_or_input = $key1;
|
3533 |
+
}
|
3534 |
+
else
|
3535 |
+
$selected ='';
|
3536 |
+
if($field_label[$k]!=$ids[$key1])
|
3537 |
+
echo '<option id="'.$k.'_'.$key1.'" value="'.$ids[$key1].'" '.$selected.'>'.$value.'</option>';
|
3538 |
+
|
3539 |
+
}
|
3540 |
+
|
3541 |
+
?>
|
3542 |
+
</select>
|
3543 |
+
|
3544 |
+
<select id="is_select<?php echo $k; ?>_<?php echo $key; ?>" style="vertical-align: top;">
|
3545 |
+
<option value="==" <?php if($param_values[1]=="==") echo 'selected="selected"'; ?>>is</option>
|
3546 |
+
<option value="!=" <?php if($param_values[1]=="!=") echo 'selected="selected"'; ?>>is not</option>
|
3547 |
+
</select>
|
3548 |
+
|
3549 |
+
<?php if (in_array($types[$key_select_or_input],$select_type_fields)) : ?>
|
3550 |
+
<select id="field_value<?php echo $k; ?>_<?php echo $key; ?>" <?php echo $multiple; ?> style="vertical-align: top; width: 200px;">
|
3551 |
+
<?php
|
3552 |
+
switch($types[$key_select_or_input])
|
3553 |
+
{
|
3554 |
+
case "type_own_select":
|
3555 |
+
case "type_paypal_select":
|
3556 |
+
$w_size = explode('*:*w_size*:*',$paramss[$key_select_or_input]);
|
3557 |
+
break;
|
3558 |
+
|
3559 |
+
case "type_radio":
|
3560 |
+
case "type_checkbox":
|
3561 |
+
case "type_paypal_radio":
|
3562 |
+
case "type_paypal_checkbox":
|
3563 |
+
case "type_paypal_shipping":
|
3564 |
+
$w_size = explode('*:*w_flow*:*',$paramss[$key_select_or_input]);
|
3565 |
+
break;
|
3566 |
+
}
|
3567 |
+
|
3568 |
+
$w_choices = explode('*:*w_choices*:*',$w_size[1]);
|
3569 |
+
$w_choices_array = explode('***',$w_choices[0]);
|
3570 |
+
|
3571 |
+
$w_choices_price = explode('*:*w_choices_price*:*',$w_choices[1]);
|
3572 |
+
$w_choices_price_array = explode('***',$w_choices_price[0]);
|
3573 |
+
|
3574 |
+
for($m=0; $m<count($w_choices_array); $m++)
|
3575 |
+
{
|
3576 |
+
if($types[$key_select_or_input]=="type_paypal_checkbox")
|
3577 |
+
$w_choice = $w_choices_array[$m].'*:*value*:*'.$w_choices_price_array[$m];
|
3578 |
+
else
|
3579 |
+
$w_choice = $w_choices_array[$m];
|
3580 |
+
|
3581 |
+
if(in_array($w_choice,$multiselect))
|
3582 |
+
{
|
3583 |
+
$selected = 'selected="selected"';
|
3584 |
+
}
|
3585 |
+
else
|
3586 |
+
$selected ='';
|
3587 |
+
|
3588 |
+
echo '<option id="choise_'.$k.'_'.$m.'" value="'.$w_choice.'" '.$selected.'>'.$w_choices_array[$m].'</option>';
|
3589 |
+
}
|
3590 |
+
|
3591 |
+
if($types[$key_select_or_input]=="type_address")
|
3592 |
+
{
|
3593 |
+
$w_countries = array("","Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombi","Comoros","Congo (Brazzaville)","Congo","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor (Timor Timur)","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia, The","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, North","Korea, South","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepa","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe");
|
3594 |
+
$w_options = '';
|
3595 |
+
foreach($w_countries as $w_country)
|
3596 |
+
{
|
3597 |
+
if(in_array($w_country,$multiselect))
|
3598 |
+
{
|
3599 |
+
$selected = 'selected="selected"';
|
3600 |
+
}
|
3601 |
+
else
|
3602 |
+
$selected ='';
|
3603 |
+
|
3604 |
+
echo '<option value="'.$w_country.'" '.$selected.'>'.$w_country.'</option>';
|
3605 |
+
}
|
3606 |
+
}
|
3607 |
+
|
3608 |
+
?>
|
3609 |
+
</select>
|
3610 |
+
<?php else :
|
3611 |
+
if($types[$key_select_or_input]=="type_number" || $types[$key_select_or_input]=="type_phone")
|
3612 |
+
$onkeypress_function = "onkeypress='return check_isnum_space(event)'";
|
3613 |
+
else
|
3614 |
+
if($types[$key_select_or_input]=="type_paypal_price")
|
3615 |
+
$onkeypress_function = "onkeypress='return check_isnum_point(event)'";
|
3616 |
+
else
|
3617 |
+
$onkeypress_function = "";
|
3618 |
+
?>
|
3619 |
+
<input id="field_value<?php echo $k; ?>_<?php echo $key; ?>" type="text" value="<?php echo $param_values[2];?>" <?php echo $onkeypress_function; ?> style="vertical-align: top; width: 200px;"><?php endif; ?>
|
3620 |
+
|
3621 |
+
<img src="<?php echo WD_FM_URL . '/images/delete.png'; ?>" id="delete_condition<?php echo $k; ?>_<?php echo $key; ?>" onclick="delete_field_condition('<?php echo $k; ?>_<?php echo $key; ?>')" style="vertical-align: top;">
|
3622 |
+
</div>
|
3623 |
+
<?php
|
3624 |
+
}
|
3625 |
+
}
|
3626 |
+
|
3627 |
+
?>
|
3628 |
+
</div>
|
3629 |
+
<?php endif;
|
3630 |
+
}
|
3631 |
+
?>
|
3632 |
+
<input type="hidden" id="condition" name="condition" value="<?php echo $row->condition; ?>" />
|
3633 |
+
|
3634 |
+
</fieldset>
|
3635 |
<input type="hidden" name="fieldset_id" id="fieldset_id" value="<?php echo WDW_FM_Library::get('fieldset_id', 'general'); ?>" />
|
3636 |
|
3637 |
<input type="hidden" id="task" name="task" value=""/>
|
3641 |
jQuery(window).load(function () {
|
3642 |
form_maker_options_tabs(jQuery("#fieldset_id").val());
|
3643 |
spider_popup();
|
3644 |
+
function hide_email_labels(event) {
|
3645 |
+
var e = event.toElement || event.relatedTarget;
|
3646 |
+
if (e.parentNode == this || e == this) {
|
3647 |
+
return;
|
3648 |
+
}
|
3649 |
+
this.style.display="none";
|
3650 |
+
}
|
3651 |
+
if(document.getElementById('mail_from_labels')) {
|
3652 |
+
document.getElementById('mail_from_labels').addEventListener('mouseout',hide_email_labels,true);
|
3653 |
+
}
|
3654 |
+
if(document.getElementById('mail_subject_labels')) {
|
3655 |
+
document.getElementById('mail_subject_labels').addEventListener('mouseout',hide_email_labels,true);
|
3656 |
+
}
|
3657 |
+
if(document.getElementById('mail_from_name_user_labels')) {
|
3658 |
+
document.getElementById('mail_from_name_user_labels').addEventListener('mouseout',hide_email_labels,true);
|
3659 |
+
}
|
3660 |
+
if(document.getElementById('mail_subject_user_labels')) {
|
3661 |
+
document.getElementById('mail_subject_user_labels').addEventListener('mouseout',hide_email_labels,true);
|
3662 |
+
}
|
3663 |
});
|
3664 |
</script>
|
3665 |
<?php
|
admin/views/FMViewSubmissions_fm.php
CHANGED
@@ -180,7 +180,7 @@ class FMViewSubmissions_fm {
|
|
180 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-6.html">Read More in User Manual</a>
|
181 |
</div>
|
182 |
<div style="float: right; text-align: right;">
|
183 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/
|
184 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
185 |
</a>
|
186 |
</div>
|
180 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-6.html">Read More in User Manual</a>
|
181 |
</div>
|
182 |
<div style="float: right; text-align: right;">
|
183 |
+
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromFormMaker.php">
|
184 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
185 |
</a>
|
186 |
</div>
|
admin/views/FMViewThemes_fm.php
CHANGED
@@ -38,7 +38,7 @@ class FMViewThemes_fm {
|
|
38 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
39 |
</div>
|
40 |
<div style="float: right; text-align: right;">
|
41 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/
|
42 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
43 |
</a>
|
44 |
</div>
|
@@ -164,7 +164,7 @@ class FMViewThemes_fm {
|
|
164 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
165 |
</div>
|
166 |
<div style="float: right; text-align: right;">
|
167 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/
|
168 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
169 |
</a>
|
170 |
</div>
|
38 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
39 |
</div>
|
40 |
<div style="float: right; text-align: right;">
|
41 |
+
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromFormMaker.php">
|
42 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
43 |
</a>
|
44 |
</div>
|
164 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
165 |
</div>
|
166 |
<div style="float: right; text-align: right;">
|
167 |
+
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromFormMaker.php">
|
168 |
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FM_URL . '/images/wd_logo.png'; ?>" />
|
169 |
</a>
|
170 |
</div>
|
css/form_maker_frontend.css
CHANGED
@@ -21,3 +21,7 @@
|
|
21 |
div[type="type_captcha"] .wdform-element-section * {
|
22 |
vertical-align: middle;
|
23 |
}
|
|
|
|
|
|
|
|
21 |
div[type="type_captcha"] .wdform-element-section * {
|
22 |
vertical-align: middle;
|
23 |
}
|
24 |
+
|
25 |
+
.file-upload-status {
|
26 |
+
direction: inherit !important;
|
27 |
+
}
|
css/style.css
CHANGED
@@ -122,6 +122,40 @@ fieldset input, fieldset textarea, fieldset select, fieldset img, fieldset butto
|
|
122 |
float:none !important;
|
123 |
}
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
#fadingBarsG{
|
127 |
position:relative;
|
122 |
float:none !important;
|
123 |
}
|
124 |
|
125 |
+
fieldset select{
|
126 |
+
height: 20px;
|
127 |
+
border-radius: 2px;
|
128 |
+
}
|
129 |
+
.multiple_select
|
130 |
+
{
|
131 |
+
height:initial !important;
|
132 |
+
}
|
133 |
+
|
134 |
+
fieldset input{
|
135 |
+
border-radius: 2px;
|
136 |
+
}
|
137 |
+
|
138 |
+
.email_labels
|
139 |
+
{
|
140 |
+
position: absolute;
|
141 |
+
background: #fff;
|
142 |
+
border: solid 1px #c7c7c7;
|
143 |
+
top: 0;
|
144 |
+
left: 0;
|
145 |
+
z-index: 1000;
|
146 |
+
}
|
147 |
+
|
148 |
+
.email_labels a
|
149 |
+
{
|
150 |
+
padding: 5px;
|
151 |
+
cursor:pointer;
|
152 |
+
}
|
153 |
+
|
154 |
+
.email_labels a:hover
|
155 |
+
{
|
156 |
+
background: #ccc;
|
157 |
+
}
|
158 |
+
|
159 |
|
160 |
#fadingBarsG{
|
161 |
position:relative;
|
form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
-
* Version: 1.7.
|
7 |
* Author: http://web-dorado.com/
|
8 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
*/
|
@@ -199,7 +199,7 @@ if (class_exists('WP_Widget')) {
|
|
199 |
// Activate plugin.
|
200 |
function form_maker_activate() {
|
201 |
$version = get_option("wd_form_maker_version");
|
202 |
-
$new_version = '1.7.
|
203 |
if (!$version) {
|
204 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
205 |
global $wpdb;
|
@@ -216,7 +216,7 @@ function form_maker_activate() {
|
|
216 |
}
|
217 |
elseif (version_compare($version, $new_version, '<')) {
|
218 |
require_once WD_FM_DIR . "/form_maker_update.php";
|
219 |
-
form_maker_update($
|
220 |
update_option("wd_form_maker_version", $new_version);
|
221 |
}
|
222 |
// To disable contact form.
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
+
* Version: 1.7.6
|
7 |
* Author: http://web-dorado.com/
|
8 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
*/
|
199 |
// Activate plugin.
|
200 |
function form_maker_activate() {
|
201 |
$version = get_option("wd_form_maker_version");
|
202 |
+
$new_version = '1.7.6';
|
203 |
if (!$version) {
|
204 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
205 |
global $wpdb;
|
216 |
}
|
217 |
elseif (version_compare($version, $new_version, '<')) {
|
218 |
require_once WD_FM_DIR . "/form_maker_update.php";
|
219 |
+
form_maker_update($version);
|
220 |
update_option("wd_form_maker_version", $new_version);
|
221 |
}
|
222 |
// To disable contact form.
|
form_maker_insert.php
CHANGED
@@ -29,7 +29,7 @@ function from_maker_insert() {
|
|
29 |
`checkout_mode` varchar(20) NOT NULL,
|
30 |
`paypal_email` varchar(50) NOT NULL,
|
31 |
`payment_currency` varchar(20) NOT NULL,
|
32 |
-
`tax`
|
33 |
`form_fields` text NOT NULL,
|
34 |
`savedb` tinyint(4) NOT NULL DEFAULT '1',
|
35 |
`sendemail` tinyint(4) NOT NULL DEFAULT '1',
|
@@ -43,21 +43,32 @@ function from_maker_insert() {
|
|
43 |
`mail_from_user` varchar(128) NOT NULL,
|
44 |
`mail_from_name_user` varchar(128) NOT NULL,
|
45 |
`reply_to_user` varchar(128) NOT NULL,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
PRIMARY KEY (`id`)
|
47 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
48 |
$wpdb->query($formmaker);
|
49 |
$plugin_path = WD_FM_URL;
|
50 |
$form_maker_row = $wpdb->get_var("SELECT * FROM " . $wpdb->prefix . "formmaker");
|
51 |
if (!$form_maker_row) {
|
52 |
-
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(1, \'Contact\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Name:%</div><div wdid="2" class="wdform_row">%2 - E-mail:%</div><div wdid="3" class="wdform_row">%3 - Subject:%</div><div wdid="4" class="wdform_row">%4 - Message:%</div><div wdid="5" class="wdform_row">%5 - type_submit_reset_5%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 1, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 6, 1, \'1#**id**#Name:#**label**#type_name#****#2#**id**#E-mail:#**label**#type_submitter_mail#****#3#**id**#Subject:#**label**#type_text#****#4#**id**#Message:#**label**#type_textarea#****#5#**id**#type_submit_reset_5#**label**#type_submit_reset#****#\', \'1#**id**#Name:#**label**#type_name#****#2#**id**#E-mail:#**label**#type_submitter_mail#****#3#**id**#Subject:#**label**#type_text#****#4#**id**#Message:#**label**#type_textarea#****#5#**id**#type_submit_reset_5#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_name*:*type*:*Name:*:*w_field_label*:*70*:*w_field_label_size*:*left*:*w_field_label_pos*:*****:*w_first_val*:*****:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*2*:*id*:*type_submitter_mail*:*type*:*E-mail:*:*w_field_label*:*70*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:**:*w_unique*:**:*w_class*:**:*new_field*:*3*:*id*:*type_text*:*type*:*Subject:*:*w_field_label*:*70*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*new_field*:*4*:*id*:*type_textarea*:*type*:*Message:*:*w_field_label*:*70*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*5*:*id*:*type_submit_reset*:*type*:*type_submit_reset_5*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\')');
|
53 |
-
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(2, \'Fill Form To Get Admission\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Name:%</div><div wdid="2" class="wdform_row">%2 - E-mail:%</div><div wdid="4" class="wdform_row">%4 - Phone Number:%</div><div wdid="5" class="wdform_row">%5 - SELECT COLLEGE%</div><div wdid="6" class="wdform_row">%6 - OTHER SPECIFY HERE%</div><div wdid="7" class="wdform_row">%7 - Word Verification:%</div><div wdid="8" class="wdform_row">%8 - type_submit_reset_8%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 8, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 9, 1, \'1#**id**#Name:#**label**#type_name#****#2#**id**#E-mail:#**label**#type_submitter_mail#****#4#**id**#Phone Number:#**label**#type_number#****#5#**id**#SELECT COLLEGE#**label**#type_own_select#****#6#**id**#OTHER SPECIFY HERE#**label**#type_text#****#7#**id**#Word Verification:#**label**#type_captcha#****#8#**id**#type_submit_reset_8#**label**#type_submit_reset#****#\', \'1#**id**#Name:#**label**#type_name#****#2#**id**#E-mail:#**label**#type_submitter_mail#****#4#**id**#Phone Number:#**label**#type_number#****#5#**id**#SELECT COLLEGE#**label**#type_own_select#****#6#**id**#OTHER SPECIFY HERE#**label**#type_text#****#7#**id**#Word Verification:#**label**#type_captcha#****#8#**id**#type_submit_reset_8#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_name*:*type*:*Name:*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:***********:*w_first_val*:***********:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*extended*:*w_name_format*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*2*:*id*:*type_submitter_mail*:*type*:*E-mail:*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:**:*w_unique*:**:*w_class*:**:*new_field*:*4*:*id*:*type_number*:*type*:*Phone Number:*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*5*:*id*:*type_own_select*:*type*:*SELECT COLLEGE*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**** GGSCMT,KHARAR*** DOABA KHARAR *** CAMBRIDGE COLLEGE FATEHGARH *** INDOGLOBAL *** QUEST COLLEGE *** UNIVERSAL ,LALRU *** OTHER PLEASE SPECIFY BELOW *:*w_choices*:*true***false***false***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_text*:*type*:*OTHER SPECIFY HERE*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*new_field*:*7*:*id*:*type_captcha*:*type*:*Word Verification:*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*8*:*id*:*type_submit_reset*:*type*:*type_submit_reset_8*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\')');
|
54 |
-
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(3, \'Camp Registration Form\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Camper Name:%</div><div wdid="2" class="wdform_row">%2 - Camper Age Group:%</div><div wdid="3" class="wdform_row">%3 - Desire Cabin:%</div><div wdid="4" class="wdform_row">%4 - Does any one have allergies?%</div><div wdid="5" class="wdform_row">%5 - Has the camper been camping before?%</div><div wdid="6" class="wdform_row">%6 - Any questions or concern:%</div><div wdid="7" class="wdform_row">%7 - type_submit_reset_7%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 15, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 8, 1, \'1#**id**#Camper Name:#**label**#type_name#****#2#**id**#Camper Age Group:#**label**#type_own_select#****#3#**id**#Desire Cabin:#**label**#type_radio#****#4#**id**#Does any one have allergies?#**label**#type_radio#****#5#**id**#Has the camper been camping before?#**label**#type_radio#****#6#**id**#Any questions or concern:#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', \'1#**id**#Camper Name:#**label**#type_name#****#2#**id**#Camper Age Group:#**label**#type_own_select#****#3#**id**#Desire Cabin:#**label**#type_radio#****#4#**id**#Does any one have allergies?#**label**#type_radio#****#5#**id**#Has the camper been camping before?#**label**#type_radio#****#6#**id**#Any questions or concern:#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_name*:*type*:*Camper Name:*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*****:*w_first_val*:*****:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*normal*:*w_name_format*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*2*:*id*:*type_own_select*:*type*:*Camper Age Group:*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:****6-8***8-12***12-15*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*Desire Cabin:*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Cabin 1***Cabin 2***Cabin 3***Cabin 4***Cabin 5***Cabin 6***Cabin 7*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*4*:*id*:*type_radio*:*type*:*Does any one have allergies?*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Yes***No*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*Has the camper been camping before?*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Yes***No*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*6*:*id*:*type_textarea*:*type*:*Any questions or concern:*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*7*:*id*:*type_submit_reset*:*type*:*type_submit_reset_7*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\')');
|
55 |
-
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(4, \'Business Demographic Survey\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"></div></div><div wdid="1" type="type_section_break" class="wdform_tr_section_break">%1 - custom_1%</div><div class="wdform_section"><div class="wdform_column"><div wdid="2" class="wdform_row">%2 - <b>What is your employment status?</b>%</div><div wdid="3" class="wdform_row">%3 - <b>What is your level of education?</b>%</div><div wdid="4" class="wdform_row">%4 - <b>In which industry do you work?</b>%</div><div wdid="5" class="wdform_row">%5 - <b>What is the annual revenue of your company?</b>%</div><div wdid="6" class="wdform_row">%6 - Word Verification:%</div><div wdid="7" class="wdform_row">%7 - type_submit_reset_7%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 10, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 1, \'<p>%all%</p>\', \'<p>%all%</p>\', 8, 1, \'2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#5#**id**#What is the annual revenue of your company?#**label**#type_radio#****#6#**id**#Word Verification:#**label**#type_captcha#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', \'2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#5#**id**#What is the annual revenue of your company?#**label**#type_radio#****#6#**id**#Word Verification:#**label**#type_captcha#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_section_break*:*type*:*custom_1*:*w_field_label*:*<h2 id="header_1" style="font-size: 1.285714286rem; font-family: Helvetica, Arial, sans-serif; color: rgb(68, 68, 68); clear: both; line-height: 1.6; margin: 1.714285714rem 0px;">Business Demographic Survey</h2><p style="line-height: 1.714285714; margin: 0px 0px 1.714285714rem; color: rgb(68, 68, 68); font-family: Helvetica, Arial, sans-serif; font-size: 14px;"></p><div id="subHeader_1" style="color: rgb(68, 68, 68); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 14px;">Thank you for joining our business demographic survey. Please give us your feedback by filling in the information bellow.</div><p><br></p>*:*w_editor*:**:*new_field*:*2*:*id*:*type_radio*:*type*:*<b>What is your employment status?</b>*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*<b>What is your level of education?</b>*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor's degree***Graduate or Professional degree***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*4*:*id*:*type_own_select*:*type*:*<b>In which industry do you work?</b>*:*w_field_label*:*500*:*w_field_label_size*:*top*:*w_field_label_pos*:*200*:*w_size*:****option 1***option 2***option 3*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*<b>What is the annual revenue of your company?</b>*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices*:*false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*6*:*id*:*type_captcha*:*type*:*Word Verification:*:*w_field_label*:*500*:*w_field_label_size*:*top*:*w_field_label_pos*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*7*:*id*:*type_submit_reset*:*type*:*type_submit_reset_7*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\')');
|
56 |
-
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(5, \'Register Your Business\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Business Owner %</div><div wdid="2" class="wdform_row">%2 - Business Name%</div><div wdid="3" class="wdform_row">%3 - E-mail%</div><div wdid="4" class="wdform_row">%4 - Address:%</div><div wdid="10" class="wdform_row">%10 - Type of Business%</div><div wdid="11" class="wdform_row">%11 - Message%</div><div wdid="12" class="wdform_row">%12 - type_submit_reset_12%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 26, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 13, 1, \'1#**id**#Business Owner #**label**#type_name#****#2#**id**#Business Name#**label**#type_text#****#3#**id**#E-mail#**label**#type_submitter_mail#****#4#**id**#Street Address#**label**#type_address#****#5#**id**#Street Address Line 2#**label**#type_address#****#6#**id**#City#**label**#type_address#****#7#**id**#State / Province / Region#**label**#type_address#****#8#**id**#Postal / Zip Code#**label**#type_address#****#9#**id**#Country#**label**#type_address#****#10#**id**#Type of Business#**label**#type_own_select#****#11#**id**#Message#**label**#type_textarea#****#12#**id**#type_submit_reset_12#**label**#type_submit_reset#****#\', \'1#**id**#Business Owner #**label**#type_name#****#2#**id**#Business Name#**label**#type_text#****#3#**id**#E-mail#**label**#type_submitter_mail#****#4#**id**#Street Address#**label**#type_address#****#5#**id**#Street Address Line 2#**label**#type_address#****#6#**id**#City#**label**#type_address#****#7#**id**#State / Province / Region#**label**#type_address#****#8#**id**#Postal / Zip Code#**label**#type_address#****#9#**id**#Country#**label**#type_address#****#10#**id**#Type of Business#**label**#type_own_select#****#11#**id**#Message#**label**#type_textarea#****#12#**id**#type_submit_reset_12#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_name*:*type*:*Business Owner *:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*****:*w_first_val*:*****:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*2*:*id*:*type_text*:*type*:*Business Name*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*E-mail*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:**:*w_unique*:**:*w_class*:**:*new_field*:*4*:*id*:*type_address*:*type*:*Address:*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*300*:*w_size*:*Street Address***Street Address Line 2***City***State / Province / Region***Postal / Zip Code***Country*:*w_mini_labels*:*no***no***no***no***no***no*:*w_disabled_fields*:*no*:*w_required*:*wdform_address*:*w_class*:**:*new_field*:*10*:*id*:*type_own_select*:*type*:*Type of Business*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:*Select value***option 1***option 2*:*w_choices*:*true***false***false*:*w_choices_checked*:*true***false***false*:*w_choices_disabled*:*yes*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*11*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*12*:*id*:*type_submit_reset*:*type*:*type_submit_reset_12*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\')');
|
57 |
-
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(6, \'Cupcake Order Form\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Date%</div><div wdid="2" class="wdform_row">%2 - Name%</div><div wdid="3" class="wdform_row">%3 - E-mail:%</div><div wdid="4" class="wdform_row">%4 - <b>Cupcakes <br> Flavors (1 doz. minimum)</b>%</div><div wdid="5" class="wdform_row">%5 - Quantity%</div><div wdid="6" class="wdform_row">%6 - Details (if any)%</div><div wdid="7" class="wdform_row">%7 - type_submit_reset_7%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 6, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 8, 1, \'1#**id**#Date#**label**#type_date#****#2#**id**#Name#**label**#type_name#****#3#**id**#E-mail:#**label**#type_submitter_mail#****#4#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_checkbox#****#5#**id**#Quantity#**label**#type_own_select#****#6#**id**#Details (if any)#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', \'1#**id**#Date#**label**#type_date#****#2#**id**#Name#**label**#type_name#****#3#**id**#E-mail:#**label**#type_submitter_mail#****#4#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_checkbox#****#5#**id**#Quantity#**label**#type_own_select#****#6#**id**#Details (if any)#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_date*:*type*:*Date*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:**:*w_date*:*yes*:*w_required*:**:*w_class*:*%Y-%m-%d*:*w_format*:*...*:*w_but_val*:**:*new_field*:*2*:*id*:*type_name*:*type*:*Name*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*****:*w_first_val*:*****:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*E-mail:*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:**:*w_unique*:**:*w_class*:**:*new_field*:*4*:*id*:*type_checkbox*:*type*:*<b>Cupcakes <br> Flavors (1 doz. minimum)</b>*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Red Velvet ($150.00 TTD)***Vanilla ($100.00 TTD)***Chocolate ($120.00 TTD)***Guinness ($150.00 TTD)***Coconut ($120.00 TTD)***Lemon ($100.00 TTD)***Chocolate Mint ($120.00 TTD)*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*5*:*id*:*type_own_select*:*type*:*Quantity*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*50*:*w_size*:****1***2***3***4***5***6***7***8***9***10*:*w_choices*:*true***false***false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false***false***false***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_textarea*:*type*:*Details (if any)*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*7*:*id*:*type_submit_reset*:*type*:*type_submit_reset_7*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\')');
|
58 |
-
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(7, \'Seminar Evaluation Survey\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"></div></div><div wdid="1" type="type_section_break" class="wdform_tr_section_break">%1 - custom_1%</div><div class="wdform_section"><div class="wdform_column"><div wdid="2" class="wdform_row">%2 - <b>Company</b>%</div><div wdid="3" class="wdform_row">%3 - <b>Occupation</b>%</div><div wdid="4" class="wdform_row">%4 - <b>Was it worth its money?</b>%</div><div wdid="5" class="wdform_row">%5 - <b>On average how would you rate the seminar?</b>%</div><div wdid="6" class="wdform_row">%6 - type_submit_reset_6%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 16, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 7, 1, \'2#**id**#Company#**label**#type_text#****#3#**id**#Occupation#**label**#type_text#****#4#**id**#Was it worth its money?#**label**#type_radio#****#5#**id**#On average how would you rate the seminar?#**label**#type_radio#****#6#**id**#type_submit_reset_6#**label**#type_submit_reset#****#\', \'2#**id**#Company#**label**#type_text#****#3#**id**#Occupation#**label**#type_text#****#4#**id**#Was it worth its money?#**label**#type_radio#****#5#**id**#On average how would you rate the seminar?#**label**#type_radio#****#6#**id**#type_submit_reset_6#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_section_break*:*type*:*custom_1*:*w_field_label*:*<h1 id="header_1" style="font-size: 1.5rem; font-family: Helvetica, Arial, sans-serif; color: rgb(68, 68, 68); clear: both; line-height: 1.5; margin: 1.714285714rem 0px;">Seminar Evaluation Survey</h1><div id="subHeader_1" style="color: rgb(68, 68, 68); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 14px;">Please take a few minutes to complete this evaluation survey</div>*:*w_editor*:**:*new_field*:*2*:*id*:*type_text*:*type*:*<b>Company</b>*:*w_field_label*:*150*:*w_field_label_size*:*top*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*new_field*:*3*:*id*:*type_text*:*type*:*<b>Occupation</b>*:*w_field_label*:*150*:*w_field_label_size*:*top*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*new_field*:*4*:*id*:*type_radio*:*type*:*<b>Was it worth its money?</b>*:*w_field_label*:*200*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Yes***No*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*<b>On average how would you rate the seminar?</b>*:*w_field_label*:*400*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Very good***Good***Neutral***Bad***Very bad*:*w_choices*:*false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*6*:*id*:*type_submit_reset*:*type*:*type_submit_reset_6*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\')');
|
59 |
-
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(8, \'Restaurant Evaluation Survey\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"></div></div><div wdid="1" type="type_section_break" class="wdform_tr_section_break">%1 - custom_1%</div><div class="wdform_section"><div class="wdform_column"><div wdid="2" class="wdform_row">%2 - Day Visited:%</div><div wdid="3" class="wdform_row">%3 - <b>Dine In / Take Out:</b>%</div><div wdid="4" class="wdform_row">%4 - <b>Food Quality:</b>%</div><div wdid="5" class="wdform_row">%5 - <b>Speed of Service:</b>%</div><div wdid="6" class="wdform_row">%6 - <b>Any comments, questions or suggestions?</b>%</div><div wdid="7" class="wdform_row">%7 - type_submit_reset_7%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 21, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 8, 1, \'2#**id**#Day Visited:#**label**#type_date#****#3#**id**#Dine In / Take Out:#**label**#type_radio#****#4#**id**#Food Quality:#**label**#type_radio#****#5#**id**#Speed of Service:#**label**#type_radio#****#6#**id**#Any comments, questions or suggestions?#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', \'2#**id**#Day Visited:#**label**#type_date#****#3#**id**#Dine In / Take Out:#**label**#type_radio#****#4#**id**#Food Quality:#**label**#type_radio#****#5#**id**#Speed of Service:#**label**#type_radio#****#6#**id**#Any comments, questions or suggestions?#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_section_break*:*type*:*custom_1*:*w_field_label*:*<h2 id="header_21" style="font-size: 1.285714286rem; font-family: Helvetica, Arial, sans-serif; color: rgb(68, 68, 68); clear: both; line-height: 1.6; margin: 1.714285714rem 0px;">Restaurant Evaluation Survey</h2><div id="subHeader_21" style="color: rgb(68, 68, 68); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 14px;">Please let us know how was the food and service.</div><p><br></p>*:*w_editor*:**:*new_field*:*2*:*id*:*type_date*:*type*:*Day Visited:*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:**:*w_date*:*no*:*w_required*:**:*w_class*:*%Y-%m-%d*:*w_format*:*...*:*w_but_val*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*<b>Dine In / Take Out:</b>*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Dine In***Dine Out*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*4*:*id*:*type_radio*:*type*:*<b>Food Quality:</b>*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Excellent***Good***Average***Dissatisfied*:*w_choices*:*false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*<b>Speed of Service:</b>*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Excellent***Good***Average***Dissatisfied*:*w_choices*:*false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*6*:*id*:*type_textarea*:*type*:*<b>Any comments, questions or suggestions?</b>*:*w_field_label*:*300*:*w_field_label_size*:*top*:*w_field_label_pos*:*300*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*7*:*id*:*type_submit_reset*:*type*:*type_submit_reset_7*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\')');
|
60 |
-
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(9, \'Product Survey\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"></div></div><div wdid="1" type="type_section_break" class="wdform_tr_section_break">%1 - custom_1%</div><div class="wdform_section"><div class="wdform_column"><div wdid="2" class="wdform_row">%2 - 1. Please indicate if you agree or disagree with the following statements%</div><div wdid="3" class="wdform_row">%3 - 2. How likely are you to recommend [Product/Service] to a friend or co-worker?%</div><div wdid="4" class="wdform_row">%4 - 3. What is the amount you would ever pay for a product like ours%</div><div wdid="5" class="wdform_row">%5 - 4. Please rate the product %</div><div wdid="6" class="wdform_row">%6 - type_submit_reset_6%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 29, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 7, 1, \'2#**id**#1. Please indicate if you agree or disagree with the following statements#**label**#type_matrix#****#3#**id**#2. How likely are you to recommend [Product/Service] to a friend or co-worker?#**label**#type_scale_rating#****#4#**id**#3. What is the amount you would ever pay for a product like ours#**label**#type_range#****#5#**id**#4. Please rate the product #**label**#type_star_rating#****#6#**id**#type_submit_reset_6#**label**#type_submit_reset#****#\', \'2#**id**#1. Please indicate if you agree or disagree with the following statements#**label**#type_matrix#****#3#**id**#2. How likely are you to recommend [Product/Service] to a friend or co-worker?#**label**#type_scale_rating#****#4#**id**#3. What is the amount you would ever pay for a product like ours#**label**#type_range#****#5#**id**#4. Please rate the product #**label**#type_star_rating#****#6#**id**#type_submit_reset_6#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_section_break*:*type*:*custom_1*:*w_field_label*:*<h1 class="sg-title" data-mce-style="font-size: 2.2em; color: #fff; font-weight: normal; line-height: normal;" style="font-size: 2.2em; font-weight: normal; color: rgb(255, 255, 255); line-height: normal;">Product Survey</h1>*:*w_editor*:**:*new_field*:*2*:*id*:*type_matrix*:*type*:*1. Please indicate if you agree or disagree with the following statements*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*radio*:*w_field_input_type*:****Product is affordable***Product is valuable***Product is better<br> than other products on<br> the market***Product is easy to use*:*w_rows*:****Strongly Disagree***Disagree***Neutral***Agree***Strongly Agree*:*w_columns*:*no*:*w_required*:*wdform_matrix*:*w_class*:**:*new_field*:*3*:*id*:*type_scale_rating*:*type*:*2. How likely are you to recommend [Product/Service] to a friend or co-worker?*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*Will not recommend *** I will recommend*:*w_mini_labels*:*5*:*w_scale_amount*:*no*:*w_required*:*wdform_scale_rating*:*w_class*:**:*new_field*:*4*:*id*:*type_range*:*type*:*3. What is the amount you would ever pay for a product like ours*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*40*:*w_field_range_width*:*1*:*w_field_range_step*:*null*:*w_field_value1*:*null*:*w_field_value2*:*From***To*:*w_mini_labels*:*no*:*w_required*:**:*w_class*:**:*new_field*:*5*:*id*:*type_star_rating*:*type*:*4. Please rate the product *:*w_field_label*:*150*:*w_field_label_size*:*top*:*w_field_label_pos*:*yellow*:*w_field_label_col*:*10*:*w_star_amount*:*no*:*w_required*:*wdform_star_rating*:*w_class*:**:*new_field*:*6*:*id*:*type_submit_reset*:*type*:*type_submit_reset_6*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\')');
|
61 |
}
|
62 |
$formmaker_submits = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "formmaker_submits` (
|
63 |
`id` int(11) NOT NULL AUTO_INCREMENT,
|
29 |
`checkout_mode` varchar(20) NOT NULL,
|
30 |
`paypal_email` varchar(50) NOT NULL,
|
31 |
`payment_currency` varchar(20) NOT NULL,
|
32 |
+
`tax` float NOT NULL,
|
33 |
`form_fields` text NOT NULL,
|
34 |
`savedb` tinyint(4) NOT NULL DEFAULT '1',
|
35 |
`sendemail` tinyint(4) NOT NULL DEFAULT '1',
|
43 |
`mail_from_user` varchar(128) NOT NULL,
|
44 |
`mail_from_name_user` varchar(128) NOT NULL,
|
45 |
`reply_to_user` varchar(128) NOT NULL,
|
46 |
+
`condition` text NOT NULL,
|
47 |
+
`mail_cc` varchar(128) NOT NULL,
|
48 |
+
`mail_cc_user` varchar(128) NOT NULL,
|
49 |
+
`mail_bcc` varchar(128) NOT NULL,
|
50 |
+
`mail_bcc_user` varchar(128) NOT NULL,
|
51 |
+
`mail_subject` varchar(128) NOT NULL,
|
52 |
+
`mail_subject_user` varchar(128) NOT NULL,
|
53 |
+
`mail_mode` tinyint(4) NOT NULL DEFAULT '1',
|
54 |
+
`mail_mode_user` tinyint(4) NOT NULL DEFAULT '1',
|
55 |
+
`mail_attachment` tinyint(4) NOT NULL DEFAULT '1',
|
56 |
+
`mail_attachment_user` tinyint(4) NOT NULL DEFAULT '1',
|
57 |
PRIMARY KEY (`id`)
|
58 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
59 |
$wpdb->query($formmaker);
|
60 |
$plugin_path = WD_FM_URL;
|
61 |
$form_maker_row = $wpdb->get_var("SELECT * FROM " . $wpdb->prefix . "formmaker");
|
62 |
if (!$form_maker_row) {
|
63 |
+
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(1, \'Contact\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Name:%</div><div wdid="2" class="wdform_row">%2 - E-mail:%</div><div wdid="3" class="wdform_row">%3 - Subject:%</div><div wdid="4" class="wdform_row">%4 - Message:%</div><div wdid="5" class="wdform_row">%5 - type_submit_reset_5%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 1, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 6, 1, \'1#**id**#Name:#**label**#type_name#****#2#**id**#E-mail:#**label**#type_submitter_mail#****#3#**id**#Subject:#**label**#type_text#****#4#**id**#Message:#**label**#type_textarea#****#5#**id**#type_submit_reset_5#**label**#type_submit_reset#****#\', \'1#**id**#Name:#**label**#type_name#****#2#**id**#E-mail:#**label**#type_submitter_mail#****#3#**id**#Subject:#**label**#type_text#****#4#**id**#Message:#**label**#type_textarea#****#5#**id**#type_submit_reset_5#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_name*:*type*:*Name:*:*w_field_label*:*70*:*w_field_label_size*:*left*:*w_field_label_pos*:*****:*w_first_val*:*****:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*2*:*id*:*type_submitter_mail*:*type*:*E-mail:*:*w_field_label*:*70*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:**:*w_unique*:**:*w_class*:**:*new_field*:*3*:*id*:*type_text*:*type*:*Subject:*:*w_field_label*:*70*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*new_field*:*4*:*id*:*type_textarea*:*type*:*Message:*:*w_field_label*:*70*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*5*:*id*:*type_submit_reset*:*type*:*type_submit_reset_5*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 1, 1, 1, 1)');
|
64 |
+
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(2, \'Fill Form To Get Admission\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Name:%</div><div wdid="2" class="wdform_row">%2 - E-mail:%</div><div wdid="4" class="wdform_row">%4 - Phone Number:%</div><div wdid="5" class="wdform_row">%5 - SELECT COLLEGE%</div><div wdid="6" class="wdform_row">%6 - OTHER SPECIFY HERE%</div><div wdid="7" class="wdform_row">%7 - Word Verification:%</div><div wdid="8" class="wdform_row">%8 - type_submit_reset_8%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 8, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 9, 1, \'1#**id**#Name:#**label**#type_name#****#2#**id**#E-mail:#**label**#type_submitter_mail#****#4#**id**#Phone Number:#**label**#type_number#****#5#**id**#SELECT COLLEGE#**label**#type_own_select#****#6#**id**#OTHER SPECIFY HERE#**label**#type_text#****#7#**id**#Word Verification:#**label**#type_captcha#****#8#**id**#type_submit_reset_8#**label**#type_submit_reset#****#\', \'1#**id**#Name:#**label**#type_name#****#2#**id**#E-mail:#**label**#type_submitter_mail#****#4#**id**#Phone Number:#**label**#type_number#****#5#**id**#SELECT COLLEGE#**label**#type_own_select#****#6#**id**#OTHER SPECIFY HERE#**label**#type_text#****#7#**id**#Word Verification:#**label**#type_captcha#****#8#**id**#type_submit_reset_8#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_name*:*type*:*Name:*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:***********:*w_first_val*:***********:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*extended*:*w_name_format*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*2*:*id*:*type_submitter_mail*:*type*:*E-mail:*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:**:*w_unique*:**:*w_class*:**:*new_field*:*4*:*id*:*type_number*:*type*:*Phone Number:*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*5*:*id*:*type_own_select*:*type*:*SELECT COLLEGE*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**** GGSCMT,KHARAR*** DOABA KHARAR *** CAMBRIDGE COLLEGE FATEHGARH *** INDOGLOBAL *** QUEST COLLEGE *** UNIVERSAL ,LALRU *** OTHER PLEASE SPECIFY BELOW *:*w_choices*:*true***false***false***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_text*:*type*:*OTHER SPECIFY HERE*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*new_field*:*7*:*id*:*type_captcha*:*type*:*Word Verification:*:*w_field_label*:*160*:*w_field_label_size*:*left*:*w_field_label_pos*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*8*:*id*:*type_submit_reset*:*type*:*type_submit_reset_8*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 1, 1, 1, 1)');
|
65 |
+
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(3, \'Camp Registration Form\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Camper Name:%</div><div wdid="2" class="wdform_row">%2 - Camper Age Group:%</div><div wdid="3" class="wdform_row">%3 - Desire Cabin:%</div><div wdid="4" class="wdform_row">%4 - Does any one have allergies?%</div><div wdid="5" class="wdform_row">%5 - Has the camper been camping before?%</div><div wdid="6" class="wdform_row">%6 - Any questions or concern:%</div><div wdid="7" class="wdform_row">%7 - type_submit_reset_7%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 15, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 8, 1, \'1#**id**#Camper Name:#**label**#type_name#****#2#**id**#Camper Age Group:#**label**#type_own_select#****#3#**id**#Desire Cabin:#**label**#type_radio#****#4#**id**#Does any one have allergies?#**label**#type_radio#****#5#**id**#Has the camper been camping before?#**label**#type_radio#****#6#**id**#Any questions or concern:#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', \'1#**id**#Camper Name:#**label**#type_name#****#2#**id**#Camper Age Group:#**label**#type_own_select#****#3#**id**#Desire Cabin:#**label**#type_radio#****#4#**id**#Does any one have allergies?#**label**#type_radio#****#5#**id**#Has the camper been camping before?#**label**#type_radio#****#6#**id**#Any questions or concern:#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_name*:*type*:*Camper Name:*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*****:*w_first_val*:*****:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*normal*:*w_name_format*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*2*:*id*:*type_own_select*:*type*:*Camper Age Group:*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:****6-8***8-12***12-15*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*Desire Cabin:*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Cabin 1***Cabin 2***Cabin 3***Cabin 4***Cabin 5***Cabin 6***Cabin 7*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*4*:*id*:*type_radio*:*type*:*Does any one have allergies?*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Yes***No*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*Has the camper been camping before?*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Yes***No*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*6*:*id*:*type_textarea*:*type*:*Any questions or concern:*:*w_field_label*:*250*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*7*:*id*:*type_submit_reset*:*type*:*type_submit_reset_7*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 1, 1, 1, 1)');
|
66 |
+
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(4, \'Business Demographic Survey\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"></div></div><div wdid="1" type="type_section_break" class="wdform_tr_section_break">%1 - custom_1%</div><div class="wdform_section"><div class="wdform_column"><div wdid="2" class="wdform_row">%2 - <b>What is your employment status?</b>%</div><div wdid="3" class="wdform_row">%3 - <b>What is your level of education?</b>%</div><div wdid="4" class="wdform_row">%4 - <b>In which industry do you work?</b>%</div><div wdid="5" class="wdform_row">%5 - <b>What is the annual revenue of your company?</b>%</div><div wdid="6" class="wdform_row">%6 - Word Verification:%</div><div wdid="7" class="wdform_row">%7 - type_submit_reset_7%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 10, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 1, \'<p>%all%</p>\', \'<p>%all%</p>\', 8, 1, \'2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#5#**id**#What is the annual revenue of your company?#**label**#type_radio#****#6#**id**#Word Verification:#**label**#type_captcha#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', \'2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#5#**id**#What is the annual revenue of your company?#**label**#type_radio#****#6#**id**#Word Verification:#**label**#type_captcha#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_section_break*:*type*:*custom_1*:*w_field_label*:*<h2 id="header_1" style="font-size: 1.285714286rem; font-family: Helvetica, Arial, sans-serif; color: rgb(68, 68, 68); clear: both; line-height: 1.6; margin: 1.714285714rem 0px;">Business Demographic Survey</h2><p style="line-height: 1.714285714; margin: 0px 0px 1.714285714rem; color: rgb(68, 68, 68); font-family: Helvetica, Arial, sans-serif; font-size: 14px;"></p><div id="subHeader_1" style="color: rgb(68, 68, 68); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 14px;">Thank you for joining our business demographic survey. Please give us your feedback by filling in the information bellow.</div><p><br></p>*:*w_editor*:**:*new_field*:*2*:*id*:*type_radio*:*type*:*<b>What is your employment status?</b>*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*<b>What is your level of education?</b>*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor's degree***Graduate or Professional degree***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*4*:*id*:*type_own_select*:*type*:*<b>In which industry do you work?</b>*:*w_field_label*:*500*:*w_field_label_size*:*top*:*w_field_label_pos*:*200*:*w_size*:****option 1***option 2***option 3*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*<b>What is the annual revenue of your company?</b>*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices*:*false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*6*:*id*:*type_captcha*:*type*:*Word Verification:*:*w_field_label*:*500*:*w_field_label_size*:*top*:*w_field_label_pos*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*7*:*id*:*type_submit_reset*:*type*:*type_submit_reset_7*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 1, 1, 1, 1)');
|
67 |
+
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(5, \'Register Your Business\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Business Owner %</div><div wdid="2" class="wdform_row">%2 - Business Name%</div><div wdid="3" class="wdform_row">%3 - E-mail%</div><div wdid="4" class="wdform_row">%4 - Address:%</div><div wdid="10" class="wdform_row">%10 - Type of Business%</div><div wdid="11" class="wdform_row">%11 - Message%</div><div wdid="12" class="wdform_row">%12 - type_submit_reset_12%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 26, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 13, 1, \'1#**id**#Business Owner #**label**#type_name#****#2#**id**#Business Name#**label**#type_text#****#3#**id**#E-mail#**label**#type_submitter_mail#****#4#**id**#Street Address#**label**#type_address#****#5#**id**#Street Address Line 2#**label**#type_address#****#6#**id**#City#**label**#type_address#****#7#**id**#State / Province / Region#**label**#type_address#****#8#**id**#Postal / Zip Code#**label**#type_address#****#9#**id**#Country#**label**#type_address#****#10#**id**#Type of Business#**label**#type_own_select#****#11#**id**#Message#**label**#type_textarea#****#12#**id**#type_submit_reset_12#**label**#type_submit_reset#****#\', \'1#**id**#Business Owner #**label**#type_name#****#2#**id**#Business Name#**label**#type_text#****#3#**id**#E-mail#**label**#type_submitter_mail#****#4#**id**#Street Address#**label**#type_address#****#5#**id**#Street Address Line 2#**label**#type_address#****#6#**id**#City#**label**#type_address#****#7#**id**#State / Province / Region#**label**#type_address#****#8#**id**#Postal / Zip Code#**label**#type_address#****#9#**id**#Country#**label**#type_address#****#10#**id**#Type of Business#**label**#type_own_select#****#11#**id**#Message#**label**#type_textarea#****#12#**id**#type_submit_reset_12#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_name*:*type*:*Business Owner *:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*****:*w_first_val*:*****:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*2*:*id*:*type_text*:*type*:*Business Name*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*E-mail*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:**:*w_unique*:**:*w_class*:**:*new_field*:*4*:*id*:*type_address*:*type*:*Address:*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*300*:*w_size*:*Street Address***Street Address Line 2***City***State / Province / Region***Postal / Zip Code***Country*:*w_mini_labels*:*no***no***no***no***no***no*:*w_disabled_fields*:*no*:*w_required*:*wdform_address*:*w_class*:**:*new_field*:*10*:*id*:*type_own_select*:*type*:*Type of Business*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:*Select value***option 1***option 2*:*w_choices*:*true***false***false*:*w_choices_checked*:*true***false***false*:*w_choices_disabled*:*yes*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*11*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*12*:*id*:*type_submit_reset*:*type*:*type_submit_reset_12*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 1, 1, 1, 1)');
|
68 |
+
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(6, \'Cupcake Order Form\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"><div wdid="1" class="wdform_row">%1 - Date%</div><div wdid="2" class="wdform_row">%2 - Name%</div><div wdid="3" class="wdform_row">%3 - E-mail:%</div><div wdid="4" class="wdform_row">%4 - <b>Cupcakes <br> Flavors (1 doz. minimum)</b>%</div><div wdid="5" class="wdform_row">%5 - Quantity%</div><div wdid="6" class="wdform_row">%6 - Details (if any)%</div><div wdid="7" class="wdform_row">%7 - type_submit_reset_7%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 6, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 8, 1, \'1#**id**#Date#**label**#type_date#****#2#**id**#Name#**label**#type_name#****#3#**id**#E-mail:#**label**#type_submitter_mail#****#4#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_checkbox#****#5#**id**#Quantity#**label**#type_own_select#****#6#**id**#Details (if any)#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', \'1#**id**#Date#**label**#type_date#****#2#**id**#Name#**label**#type_name#****#3#**id**#E-mail:#**label**#type_submitter_mail#****#4#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_checkbox#****#5#**id**#Quantity#**label**#type_own_select#****#6#**id**#Details (if any)#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_date*:*type*:*Date*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:**:*w_date*:*yes*:*w_required*:**:*w_class*:*%Y-%m-%d*:*w_format*:*...*:*w_but_val*:**:*new_field*:*2*:*id*:*type_name*:*type*:*Name*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*****:*w_first_val*:*****:*w_title*:*Title***First***Last***Middle*:*w_mini_labels*:*100*:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*E-mail:*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:**:*w_unique*:**:*w_class*:**:*new_field*:*4*:*id*:*type_checkbox*:*type*:*<b>Cupcakes <br> Flavors (1 doz. minimum)</b>*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Red Velvet ($150.00 TTD)***Vanilla ($100.00 TTD)***Chocolate ($120.00 TTD)***Guinness ($150.00 TTD)***Coconut ($120.00 TTD)***Lemon ($100.00 TTD)***Chocolate Mint ($120.00 TTD)*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*5*:*id*:*type_own_select*:*type*:*Quantity*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*50*:*w_size*:****1***2***3***4***5***6***7***8***9***10*:*w_choices*:*true***false***false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false***false***false***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_textarea*:*type*:*Details (if any)*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*200*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*7*:*id*:*type_submit_reset*:*type*:*type_submit_reset_7*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 1, 1, 1, 1)');
|
69 |
+
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(7, \'Seminar Evaluation Survey\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"></div></div><div wdid="1" type="type_section_break" class="wdform_tr_section_break">%1 - custom_1%</div><div class="wdform_section"><div class="wdform_column"><div wdid="2" class="wdform_row">%2 - <b>Company</b>%</div><div wdid="3" class="wdform_row">%3 - <b>Occupation</b>%</div><div wdid="4" class="wdform_row">%4 - <b>Was it worth its money?</b>%</div><div wdid="5" class="wdform_row">%5 - <b>On average how would you rate the seminar?</b>%</div><div wdid="6" class="wdform_row">%6 - type_submit_reset_6%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 16, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 7, 1, \'2#**id**#Company#**label**#type_text#****#3#**id**#Occupation#**label**#type_text#****#4#**id**#Was it worth its money?#**label**#type_radio#****#5#**id**#On average how would you rate the seminar?#**label**#type_radio#****#6#**id**#type_submit_reset_6#**label**#type_submit_reset#****#\', \'2#**id**#Company#**label**#type_text#****#3#**id**#Occupation#**label**#type_text#****#4#**id**#Was it worth its money?#**label**#type_radio#****#5#**id**#On average how would you rate the seminar?#**label**#type_radio#****#6#**id**#type_submit_reset_6#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_section_break*:*type*:*custom_1*:*w_field_label*:*<h1 id="header_1" style="font-size: 1.5rem; font-family: Helvetica, Arial, sans-serif; color: rgb(68, 68, 68); clear: both; line-height: 1.5; margin: 1.714285714rem 0px;">Seminar Evaluation Survey</h1><div id="subHeader_1" style="color: rgb(68, 68, 68); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 14px;">Please take a few minutes to complete this evaluation survey</div>*:*w_editor*:**:*new_field*:*2*:*id*:*type_text*:*type*:*<b>Company</b>*:*w_field_label*:*150*:*w_field_label_size*:*top*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*new_field*:*3*:*id*:*type_text*:*type*:*<b>Occupation</b>*:*w_field_label*:*150*:*w_field_label_size*:*top*:*w_field_label_pos*:*200*:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*new_field*:*4*:*id*:*type_radio*:*type*:*<b>Was it worth its money?</b>*:*w_field_label*:*200*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Yes***No*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*<b>On average how would you rate the seminar?</b>*:*w_field_label*:*400*:*w_field_label_size*:*top*:*w_field_label_pos*:*ver*:*w_flow*:*Very good***Good***Neutral***Bad***Very bad*:*w_choices*:*false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*6*:*id*:*type_submit_reset*:*type*:*type_submit_reset_6*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 1, 1, 1, 1)');
|
70 |
+
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(8, \'Restaurant Evaluation Survey\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"></div></div><div wdid="1" type="type_section_break" class="wdform_tr_section_break">%1 - custom_1%</div><div class="wdform_section"><div class="wdform_column"><div wdid="2" class="wdform_row">%2 - Day Visited:%</div><div wdid="3" class="wdform_row">%3 - <b>Dine In / Take Out:</b>%</div><div wdid="4" class="wdform_row">%4 - <b>Food Quality:</b>%</div><div wdid="5" class="wdform_row">%5 - <b>Speed of Service:</b>%</div><div wdid="6" class="wdform_row">%6 - <b>Any comments, questions or suggestions?</b>%</div><div wdid="7" class="wdform_row">%7 - type_submit_reset_7%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 21, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 8, 1, \'2#**id**#Day Visited:#**label**#type_date#****#3#**id**#Dine In / Take Out:#**label**#type_radio#****#4#**id**#Food Quality:#**label**#type_radio#****#5#**id**#Speed of Service:#**label**#type_radio#****#6#**id**#Any comments, questions or suggestions?#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', \'2#**id**#Day Visited:#**label**#type_date#****#3#**id**#Dine In / Take Out:#**label**#type_radio#****#4#**id**#Food Quality:#**label**#type_radio#****#5#**id**#Speed of Service:#**label**#type_radio#****#6#**id**#Any comments, questions or suggestions?#**label**#type_textarea#****#7#**id**#type_submit_reset_7#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_section_break*:*type*:*custom_1*:*w_field_label*:*<h2 id="header_21" style="font-size: 1.285714286rem; font-family: Helvetica, Arial, sans-serif; color: rgb(68, 68, 68); clear: both; line-height: 1.6; margin: 1.714285714rem 0px;">Restaurant Evaluation Survey</h2><div id="subHeader_21" style="color: rgb(68, 68, 68); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 14px;">Please let us know how was the food and service.</div><p><br></p>*:*w_editor*:**:*new_field*:*2*:*id*:*type_date*:*type*:*Day Visited:*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:**:*w_date*:*no*:*w_required*:**:*w_class*:*%Y-%m-%d*:*w_format*:*...*:*w_but_val*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*<b>Dine In / Take Out:</b>*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Dine In***Dine Out*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*4*:*id*:*type_radio*:*type*:*<b>Food Quality:</b>*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Excellent***Good***Average***Dissatisfied*:*w_choices*:*false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*<b>Speed of Service:</b>*:*w_field_label*:*150*:*w_field_label_size*:*left*:*w_field_label_pos*:*ver*:*w_flow*:*Excellent***Good***Average***Dissatisfied*:*w_choices*:*false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:**:*w_class*:**:*new_field*:*6*:*id*:*type_textarea*:*type*:*<b>Any comments, questions or suggestions?</b>*:*w_field_label*:*300*:*w_field_label_size*:*top*:*w_field_label_pos*:*300*:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*7*:*id*:*type_submit_reset*:*type*:*type_submit_reset_7*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 1, 1, 1, 1)');
|
71 |
+
$wpdb->query('INSERT INTO `' . $wpdb->prefix . 'formmaker` VALUES(9, \'Product Survey\', \'\', \'<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;"><div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false"><div class="wdform_section"><div class="wdform_column"></div></div><div wdid="1" type="type_section_break" class="wdform_tr_section_break">%1 - custom_1%</div><div class="wdform_section"><div class="wdform_column"><div wdid="2" class="wdform_row">%2 - 1. Please indicate if you agree or disagree with the following statements%</div><div wdid="3" class="wdform_row">%3 - 2. How likely are you to recommend [Product/Service] to a friend or co-worker?%</div><div wdid="4" class="wdform_row">%4 - 3. What is the amount you would ever pay for a product like ours%</div><div wdid="5" class="wdform_row">%5 - 4. Please rate the product %</div><div wdid="6" class="wdform_row">%6 - type_submit_reset_6%</div></div></div><div valign="top" class="wdform_footer" style="width: 100%;"><div style="width: 100%;"><div style="width: 100%; display: table;"><div style="display: table-row-group;"><div id="form_id_temppage_nav1" style="display: table-row;"></div></div></div></div></div></div></div>\', 29, \'// Occurs before the form is loaded\r\nfunction before_load()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before submitting the form\r\nfunction before_submit()\r\n{\r\n\r\n}\r\n\r\n// Occurs just before resetting the form\r\nfunction before_reset()\r\n{\r\n\r\n}\', \'\', \'\', 0, \'%all%\', \'%all%\', 7, 1, \'2#**id**#1. Please indicate if you agree or disagree with the following statements#**label**#type_matrix#****#3#**id**#2. How likely are you to recommend [Product/Service] to a friend or co-worker?#**label**#type_scale_rating#****#4#**id**#3. What is the amount you would ever pay for a product like ours#**label**#type_range#****#5#**id**#4. Please rate the product #**label**#type_star_rating#****#6#**id**#type_submit_reset_6#**label**#type_submit_reset#****#\', \'2#**id**#1. Please indicate if you agree or disagree with the following statements#**label**#type_matrix#****#3#**id**#2. How likely are you to recommend [Product/Service] to a friend or co-worker?#**label**#type_scale_rating#****#4#**id**#3. What is the amount you would ever pay for a product like ours#**label**#type_range#****#5#**id**#4. Please rate the product #**label**#type_star_rating#****#6#**id**#type_submit_reset_6#**label**#type_submit_reset#****#\', 0, \'none\', \'false\', \'true\', \'\', \'\', \'\', 0, \'\', \'\', \'USD\', 0, \'1*:*id*:*type_section_break*:*type*:*custom_1*:*w_field_label*:*<h1 class="sg-title" data-mce-style="font-size: 2.2em; color: #fff; font-weight: normal; line-height: normal;" style="font-size: 2.2em; font-weight: normal; color: rgb(255, 255, 255); line-height: normal;">Product Survey</h1>*:*w_editor*:**:*new_field*:*2*:*id*:*type_matrix*:*type*:*1. Please indicate if you agree or disagree with the following statements*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*radio*:*w_field_input_type*:****Product is affordable***Product is valuable***Product is better<br> than other products on<br> the market***Product is easy to use*:*w_rows*:****Strongly Disagree***Disagree***Neutral***Agree***Strongly Agree*:*w_columns*:*no*:*w_required*:*wdform_matrix*:*w_class*:**:*new_field*:*3*:*id*:*type_scale_rating*:*type*:*2. How likely are you to recommend [Product/Service] to a friend or co-worker?*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*Will not recommend *** I will recommend*:*w_mini_labels*:*5*:*w_scale_amount*:*no*:*w_required*:*wdform_scale_rating*:*w_class*:**:*new_field*:*4*:*id*:*type_range*:*type*:*3. What is the amount you would ever pay for a product like ours*:*w_field_label*:*600*:*w_field_label_size*:*top*:*w_field_label_pos*:*40*:*w_field_range_width*:*1*:*w_field_range_step*:*null*:*w_field_value1*:*null*:*w_field_value2*:*From***To*:*w_mini_labels*:*no*:*w_required*:**:*w_class*:**:*new_field*:*5*:*id*:*type_star_rating*:*type*:*4. Please rate the product *:*w_field_label*:*150*:*w_field_label_size*:*top*:*w_field_label_pos*:*yellow*:*w_field_label_col*:*10*:*w_star_amount*:*no*:*w_required*:*wdform_star_rating*:*w_class*:**:*new_field*:*6*:*id*:*type_submit_reset*:*type*:*type_submit_reset_6*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*\', 1, 1, \'*\', \'\', \'\', \'\', \'\', 1, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 1, 1, 1, 1)');
|
72 |
}
|
73 |
$formmaker_submits = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "formmaker_submits` (
|
74 |
`id` int(11) NOT NULL AUTO_INCREMENT,
|
form_maker_update.php
CHANGED
@@ -61,6 +61,23 @@ function form_maker_update($version) {
|
|
61 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
|
62 |
$wpdb->query($formmaker_blocked);
|
63 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
return;
|
65 |
}
|
66 |
|
61 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
|
62 |
$wpdb->query($formmaker_blocked);
|
63 |
}
|
64 |
+
if (version_compare($version, '1.7.6') == -1) {
|
65 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `condition` text NOT NULL");
|
66 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_cc` varchar(128) NOT NULL");
|
67 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_cc_user` varchar(128) NOT NULL");
|
68 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_bcc` varchar(128) NOT NULL");
|
69 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_bcc_user` varchar(128) NOT NULL");
|
70 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_subject` varchar(128) NOT NULL");
|
71 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_subject_user` varchar(128) NOT NULL");
|
72 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_mode` tinyint(4) NOT NULL DEFAULT '1'");
|
73 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_mode_user` tinyint(4) NOT NULL DEFAULT '1'");
|
74 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_attachment` tinyint(4) NOT NULL DEFAULT '1'");
|
75 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `mail_attachment_user` tinyint(4) NOT NULL DEFAULT '1'");
|
76 |
+
|
77 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` CHANGE `tax` `tax` float NOT NULL DEFAULT '0'");
|
78 |
+
|
79 |
+
$wpdb->query('UPDATE ' . $wpdb->prefix . 'formmaker SET `mail_mode` = 1, `mail_mode_user` = 1, `mail_attachment` = 1, `mail_attachment_user` = 1');
|
80 |
+
}
|
81 |
return;
|
82 |
}
|
83 |
|
frontend/controllers/FMControllerForm_maker.php
CHANGED
@@ -23,6 +23,9 @@ class FMControllerForm_maker {
|
|
23 |
}
|
24 |
|
25 |
public function display($id) {
|
|
|
|
|
|
|
26 |
require_once WD_FM_DIR . "/frontend/models/FMModelForm_maker.php";
|
27 |
$model = new FMModelForm_maker();
|
28 |
|
23 |
}
|
24 |
|
25 |
public function display($id) {
|
26 |
+
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
27 |
+
@session_start();
|
28 |
+
}
|
29 |
require_once WD_FM_DIR . "/frontend/models/FMModelForm_maker.php";
|
30 |
$model = new FMModelForm_maker();
|
31 |
|
frontend/models/FMModelForm_maker.php
CHANGED
@@ -58,9 +58,6 @@ class FMModelForm_maker {
|
|
58 |
}
|
59 |
|
60 |
public function savedata($form, $id) {
|
61 |
-
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
62 |
-
@session_start();
|
63 |
-
}
|
64 |
$all_files = array();
|
65 |
$correct = FALSE;
|
66 |
$id_for_old = $id;
|
@@ -127,9 +124,6 @@ class FMModelForm_maker {
|
|
127 |
|
128 |
public function save_db($counter, $id) {
|
129 |
global $wpdb;
|
130 |
-
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
131 |
-
@session_start();
|
132 |
-
}
|
133 |
$chgnac = TRUE;
|
134 |
$all_files = array();
|
135 |
$paypal = array();
|
@@ -157,6 +151,10 @@ class FMModelForm_maker {
|
|
157 |
$label_id = array();
|
158 |
$label_label = array();
|
159 |
$label_type = array();
|
|
|
|
|
|
|
|
|
160 |
if($old == false || ($old == true && $form->form=='')) {
|
161 |
$label_all = explode('#****#',$form->label_order_current);
|
162 |
}
|
@@ -179,518 +177,521 @@ class FMModelForm_maker {
|
|
179 |
continue;
|
180 |
}
|
181 |
$i = $label_id[$key];
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
$value = isset($_POST['wdform_'.$i.'_wd_editor'.$id]) ? $_POST['wdform_'.$i.'_wd_editor'.$id] : "";
|
196 |
-
break;
|
197 |
-
}
|
198 |
-
case "type_mark_map": {
|
199 |
-
$value = (isset($_POST['wdform_'.$i."_long".$id]) ? $_POST['wdform_'.$i."_long".$id] : "") . '***map***' . (isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "");
|
200 |
-
break;
|
201 |
-
}
|
202 |
-
case "type_date_fields": {
|
203 |
-
$value = (isset($_POST['wdform_'.$i."_day".$id]) ? $_POST['wdform_'.$i."_day".$id] : "") . '-' . (isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : "") . '-' . (isset($_POST['wdform_'.$i."_year".$id]) ? $_POST['wdform_'.$i."_year".$id] : "");
|
204 |
-
break;
|
205 |
-
}
|
206 |
-
case "type_time": {
|
207 |
-
$ss = isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : NULL;
|
208 |
-
if(isset($ss)) {
|
209 |
-
$value = (isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : "");
|
210 |
-
}
|
211 |
-
else {
|
212 |
-
$value = (isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
213 |
-
}
|
214 |
-
$am_pm = isset($_POST['wdform_'.$i."_am_pm".$id]) ? $_POST['wdform_'.$i."_am_pm".$id] : NULL;
|
215 |
-
if(isset($am_pm)) {
|
216 |
-
$value = $value . ' ' . $am_pm;
|
217 |
}
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
$value = (isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : "") . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "");
|
222 |
-
break;
|
223 |
-
}
|
224 |
-
case "type_name": {
|
225 |
-
$element_title = isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : NULL;
|
226 |
-
if(isset($element_title)) {
|
227 |
-
$value = (isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_middle".$id]) ? $_POST['wdform_'.$i."_element_middle".$id] : "");
|
228 |
}
|
229 |
-
|
230 |
-
|
|
|
231 |
}
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
$fileNameFree = substr($fileName, 0, $to);
|
266 |
-
$invalidFileExts = explode(',', $extension);
|
267 |
-
$extOk = false;
|
268 |
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
echo "<script> alert('" . addslashes(__('Sorry, you are not allowed to upload this type of file.', 'form_maker')) . "');</script>";
|
277 |
-
return array($max+1);
|
278 |
-
}
|
279 |
-
|
280 |
-
$fileTemp = $files['tmp_name'][$file_key];
|
281 |
-
$p=1;
|
282 |
-
while(file_exists( $destination . "/" . $fileName)) {
|
283 |
-
$to = strlen($files['name'][$file_key]) - strlen($uploadedFileExtension) - 1;
|
284 |
-
$fileName = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
|
285 |
-
$p++;
|
286 |
-
}
|
287 |
-
if(!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
|
288 |
-
echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
|
289 |
-
return array($max+1);
|
290 |
-
}
|
291 |
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
array_push($all_files, $temp_file);
|
297 |
-
}
|
298 |
-
}
|
299 |
-
break;
|
300 |
-
}
|
301 |
-
|
302 |
-
case 'type_address': {
|
303 |
-
$value = '*#*#*#';
|
304 |
-
$element = isset($_POST['wdform_'.$i."_street1".$id]) ? $_POST['wdform_'.$i."_street1".$id] : NULL;
|
305 |
-
if(isset($element)) {
|
306 |
-
$value = $element;
|
307 |
-
break;
|
308 |
-
}
|
309 |
-
|
310 |
-
$element = isset($_POST['wdform_'.$i."_street2".$id]) ? $_POST['wdform_'.$i."_street2".$id] : NULL;
|
311 |
-
if(isset($element)) {
|
312 |
-
$value = $element;
|
313 |
-
break;
|
314 |
-
}
|
315 |
-
|
316 |
-
$element = isset($_POST['wdform_'.$i."_city".$id]) ? $_POST['wdform_'.$i."_city".$id] : NULL;
|
317 |
-
if(isset($element)) {
|
318 |
-
$value = $element;
|
319 |
-
break;
|
320 |
-
}
|
321 |
-
|
322 |
-
$element = isset($_POST['wdform_'.$i."_state".$id]) ? $_POST['wdform_'.$i."_state".$id] : NULL;
|
323 |
-
if(isset($element)) {
|
324 |
-
$value = $element;
|
325 |
-
break;
|
326 |
-
}
|
327 |
-
|
328 |
-
$element = isset($_POST['wdform_'.$i."_postal".$id]) ? $_POST['wdform_'.$i."_postal".$id] : NULL;
|
329 |
-
if(isset($element)) {
|
330 |
-
$value = $element;
|
331 |
-
break;
|
332 |
-
}
|
333 |
-
|
334 |
-
$element = isset($_POST['wdform_'.$i."_country".$id]) ? $_POST['wdform_'.$i."_country".$id] : NULL;
|
335 |
-
if(isset($element)) {
|
336 |
-
$value = $element;
|
337 |
-
break;
|
338 |
-
}
|
339 |
-
break;
|
340 |
-
}
|
341 |
-
|
342 |
-
case "type_hidden": {
|
343 |
-
$value = isset($_POST[$label_label[$key]]) ? $_POST[$label_label[$key]] : "";
|
344 |
-
break;
|
345 |
-
}
|
346 |
-
|
347 |
-
case "type_radio": {
|
348 |
-
$element = isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : NULL;
|
349 |
-
if(isset($element)) {
|
350 |
-
$value = $element;
|
351 |
-
break;
|
352 |
-
}
|
353 |
-
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
354 |
-
break;
|
355 |
-
}
|
356 |
-
|
357 |
-
case "type_checkbox": {
|
358 |
-
$start = -1;
|
359 |
-
$value = '';
|
360 |
-
for($j = 0; $j < 100; $j++) {
|
361 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
362 |
-
if(isset($element)) {
|
363 |
-
$start = $j;
|
364 |
-
break;
|
365 |
-
}
|
366 |
-
}
|
367 |
-
|
368 |
-
$other_element_id = -1;
|
369 |
-
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
370 |
-
if($is_other == "yes") {
|
371 |
-
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
372 |
-
}
|
373 |
-
|
374 |
-
if($start != -1) {
|
375 |
-
for($j = $start; $j < 100; $j++) {
|
376 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
377 |
-
if(isset($element)) {
|
378 |
-
if($j == $other_element_id) {
|
379 |
-
$value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '***br***';
|
380 |
}
|
381 |
-
|
382 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
}
|
384 |
-
}
|
385 |
-
}
|
386 |
-
}
|
387 |
-
break;
|
388 |
-
}
|
389 |
-
|
390 |
-
case "type_paypal_price": {
|
391 |
-
$value = isset($_POST['wdform_'.$i."_element_dollars".$id]) ? $_POST['wdform_'.$i."_element_dollars".$id] : 0;
|
392 |
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
|
|
|
|
|
|
|
|
397 |
}
|
398 |
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
$
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
}
|
418 |
-
|
419 |
-
|
|
|
|
|
420 |
}
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
if(isset($element_quantity) && $value != '') {
|
431 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
432 |
-
}
|
433 |
-
$paypal_option = array();
|
434 |
-
$paypal_option['on'] = array();
|
435 |
-
$paypal_option['os'] = array();
|
436 |
-
|
437 |
-
for($k = 0; $k < 50; $k++) {
|
438 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
439 |
-
if(isset($temp_val) && $value != '') {
|
440 |
-
array_push ($paypal_option['on'], (isset($_POST['wdform_'.$i."_element_property_label".$id]) ? $_POST['wdform_'.$i."_element_property_label".$id] : ""));
|
441 |
-
array_push ($paypal_option['os'], (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : ""));
|
442 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id]) ? $_POST['wdform_'.$i."_element_property_label".$id] : "") . ': ' . (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : "") . '***property***';
|
443 |
-
}
|
444 |
-
}
|
445 |
-
array_push ($paypal['on_os'], $paypal_option);
|
446 |
-
break;
|
447 |
-
}
|
448 |
-
|
449 |
-
case "type_paypal_radio": {
|
450 |
-
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
451 |
-
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
452 |
}
|
453 |
-
|
454 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
455 |
}
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
array_push ($paypal['quantity'], $quantity);
|
460 |
-
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0));
|
461 |
-
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] != 0) {
|
462 |
-
$is_amount=true;
|
463 |
-
}
|
464 |
-
|
465 |
-
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
466 |
-
if(isset($element_quantity) && $value != '') {
|
467 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
468 |
-
}
|
469 |
-
|
470 |
-
$paypal_option = array();
|
471 |
-
$paypal_option['on'] = array();
|
472 |
-
$paypal_option['os'] = array();
|
473 |
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
array_push ($paypal['on_os'], $paypal_option);
|
483 |
-
break;
|
484 |
-
}
|
485 |
|
486 |
-
|
487 |
-
|
488 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
}
|
490 |
-
|
491 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
}
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
497 |
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
}
|
532 |
-
|
533 |
-
|
534 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
|
|
541 |
}
|
|
|
542 |
}
|
543 |
-
array_push ($paypal['on_os'], $paypal_option);
|
544 |
}
|
545 |
}
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
|
|
|
|
|
|
|
|
|
|
565 |
}
|
566 |
-
else {
|
567 |
-
$selected_star_amount = isset($_POST['wdform_'.$i."_selected_star_amount".$id]) ? $_POST['wdform_'.$i."_selected_star_amount".$id] : 0;
|
568 |
-
}
|
569 |
-
$value = $selected_star_amount . '/' . (isset($_POST['wdform_'.$i."_star_amount".$id]) ? $_POST['wdform_'.$i."_star_amount".$id] : "");
|
570 |
-
break;
|
571 |
-
}
|
572 |
-
|
573 |
-
case "type_scale_rating": {
|
574 |
-
$value = (isset($_POST['wdform_'.$i."_scale_radio".$id]) ? $_POST['wdform_'.$i."_scale_radio".$id] : 0) . '/' . (isset($_POST['wdform_'.$i."_scale_amount".$id]) ? $_POST['wdform_'.$i."_scale_amount".$id] : "");
|
575 |
-
break;
|
576 |
-
}
|
577 |
-
|
578 |
-
case "type_spinner": {
|
579 |
-
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
580 |
-
break;
|
581 |
-
}
|
582 |
-
|
583 |
-
case "type_slider": {
|
584 |
-
$value = isset($_POST['wdform_'.$i."_slider_value".$id]) ? $_POST['wdform_'.$i."_slider_value".$id] : "";
|
585 |
-
break;
|
586 |
-
}
|
587 |
-
|
588 |
-
case "type_range": {
|
589 |
-
$value = (isset($_POST['wdform_'.$i."_element".$id.'0']) ? $_POST['wdform_'.$i."_element".$id.'0'] : "") . '-' . (isset($_POST['wdform_'.$i."_element".$id.'1']) ? $_POST['wdform_'.$i."_element".$id.'1'] : "");
|
590 |
-
break;
|
591 |
-
}
|
592 |
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
for($k = 0; $k < sizeof($items) - 1; $k++) {
|
597 |
-
$value .= (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : "") . ':';
|
598 |
}
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
}
|
621 |
}
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "") . "***";
|
629 |
}
|
630 |
}
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
}
|
639 |
}
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
647 |
|
648 |
-
|
649 |
-
|
650 |
-
|
|
|
651 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
652 |
}
|
653 |
-
|
654 |
-
{
|
655 |
-
$untilupload = $form->form_fields;
|
656 |
-
$untilupload = substr($untilupload, strpos($untilupload, $i.'*:*id*:*'.$type), -1);
|
657 |
-
$untilupload = substr($untilupload, 0, strpos($untilupload, '*:*new_field*:'));
|
658 |
-
$untilupload = explode('*:*w_required*:*', $untilupload);
|
659 |
-
$untilupload = $untilupload[1];
|
660 |
-
$untilupload = explode('*:*w_unique*:*', $untilupload);
|
661 |
-
$unique_element = $untilupload[0];
|
662 |
-
|
663 |
-
if($unique_element == 'yes') {
|
664 |
-
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes($value)));
|
665 |
-
if ($unique) {
|
666 |
-
echo "<script> alert('" . addslashes(__('This field %s requires a unique entry and this value was already submitted.', 'form_maker')) . "'.replace('%s','" . $label_label[$key] . "'));</script>";
|
667 |
-
return array($max + 1);
|
668 |
-
}
|
669 |
-
}
|
670 |
-
}
|
671 |
-
$save_or_no = TRUE;
|
672 |
-
if ($form->savedb) {
|
673 |
-
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
674 |
-
'form_id' => $id,
|
675 |
-
'element_label' => $i,
|
676 |
-
'element_value' => stripslashes($value),
|
677 |
-
'group_id' => ($max + 1),
|
678 |
-
'date' => date('Y-m-d H:i:s'),
|
679 |
-
'ip' => $_SERVER['REMOTE_ADDR'],
|
680 |
-
), array(
|
681 |
-
'%d',
|
682 |
-
'%s',
|
683 |
-
'%s',
|
684 |
-
'%d',
|
685 |
-
'%s',
|
686 |
-
'%s'
|
687 |
-
));
|
688 |
-
}
|
689 |
-
if (!$save_or_no) {
|
690 |
-
return FALSE;
|
691 |
-
}
|
692 |
-
$chgnac = FALSE;
|
693 |
-
}
|
694 |
}
|
695 |
else {
|
696 |
foreach ($label_type as $key => $type) {
|
@@ -1225,6 +1226,7 @@ class FMModelForm_maker {
|
|
1225 |
$str .= "&cmd=" . "_cart";
|
1226 |
$str .= "¬ify_url=" . admin_url('admin-ajax.php?action=checkpaypal%26form_id=' . $id . '%26group_id=' . ($max + 1));
|
1227 |
$str .= "&upload=" . "1";
|
|
|
1228 |
if (isset($paypal['shipping'])) {
|
1229 |
$str = $str . "&shipping_1=" . $paypal['shipping'];
|
1230 |
// $str=$str."&weight_cart=".$paypal['shipping'];
|
@@ -1235,7 +1237,7 @@ class FMModelForm_maker {
|
|
1235 |
foreach ($paypal['item_name'] as $pkey => $pitem_name) {
|
1236 |
if($paypal['amount'][$pkey]) {
|
1237 |
$i++;
|
1238 |
-
$str = $str."&item_name_".$i."=".
|
1239 |
$str = $str."&amount_".$i."=".$paypal['amount'][$pkey];
|
1240 |
$str = $str."&quantity_".$i."=".$paypal['quantity'][$pkey];
|
1241 |
if ($tax) {
|
@@ -1298,9 +1300,6 @@ class FMModelForm_maker {
|
|
1298 |
}
|
1299 |
|
1300 |
public function gen_mail($counter, $all_files, $id, $str) {
|
1301 |
-
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
1302 |
-
@session_start();
|
1303 |
-
}
|
1304 |
global $wpdb;
|
1305 |
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id));
|
1306 |
if (!$row->form_front) {
|
@@ -1345,7 +1344,12 @@ class FMModelForm_maker {
|
|
1345 |
array_push($label_label, $label_order_each[0]);
|
1346 |
array_push($label_type, $label_order_each[1]);
|
1347 |
}
|
1348 |
-
|
|
|
|
|
|
|
|
|
|
|
1349 |
|
1350 |
if($old == false || ($old == true && $row->form == '')) {
|
1351 |
foreach($label_order_ids as $key => $label_order_id) {
|
@@ -1354,835 +1358,540 @@ class FMModelForm_maker {
|
|
1354 |
|
1355 |
if($type != "type_map" and $type != "type_submit_reset" and $type != "type_editor" and $type != "type_captcha" and $type != "type_recaptcha" and $type != "type_button") {
|
1356 |
$element_label=$label_order_original[$i];
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
|
|
|
|
|
|
1369 |
}
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
break;
|
1376 |
-
}
|
1377 |
-
case "type_hidden": {
|
1378 |
-
$element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
|
1379 |
-
if(isset($element)) {
|
1380 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1381 |
}
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "") . '</td></tr>';
|
1388 |
-
}
|
1389 |
-
break;
|
1390 |
-
}
|
1391 |
-
case "type_submitter_mail": {
|
1392 |
-
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
1393 |
-
if(isset($element)) {
|
1394 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1395 |
-
}
|
1396 |
-
break;
|
1397 |
-
}
|
1398 |
-
case "type_time": {
|
1399 |
-
$hh = isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : NULL;
|
1400 |
-
if(isset($hh)) {
|
1401 |
-
$ss = isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : NULL;
|
1402 |
-
if(isset($ss)) {
|
1403 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "") . ':' . $ss;
|
1404 |
}
|
1405 |
-
|
1406 |
-
|
|
|
|
|
|
|
|
|
|
|
1407 |
}
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
|
|
|
|
|
|
|
|
1411 |
}
|
1412 |
-
|
1413 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1414 |
}
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
$element_first = isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : NULL;
|
1421 |
-
if(isset($element_first)) {
|
1422 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . '</td></tr>';
|
1423 |
-
}
|
1424 |
-
break;
|
1425 |
-
}
|
1426 |
-
|
1427 |
-
case "type_name": {
|
1428 |
-
$element_first = isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : NULL;
|
1429 |
-
if(isset($element_first)) {
|
1430 |
-
$element_title = isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : NULL;
|
1431 |
-
if(isset($element_title)) {
|
1432 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_title . ' ' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . ' ' . (isset($_POST['wdform_'.$i."_element_middle".$id]) ? $_POST['wdform_'.$i."_element_middle".$id] : "") . '</td></tr>';
|
1433 |
}
|
1434 |
-
|
1435 |
-
|
|
|
|
|
|
|
1436 |
}
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
}
|
1508 |
-
if($start != -1) {
|
1509 |
-
for($j = $start; $j < 100; $j++) {
|
1510 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1511 |
-
if(isset($element)) {
|
1512 |
-
if($j == $other_element_id) {
|
1513 |
-
$list = $list . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '<br>';
|
1514 |
-
}
|
1515 |
-
else {
|
1516 |
-
$list = $list . (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "") . '<br>';
|
1517 |
}
|
1518 |
}
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
}
|
1524 |
-
case "type_paypal_price": {
|
1525 |
-
$value = 0;
|
1526 |
-
if(isset($_POST['wdform_'.$i."_element_dollars".$id])) {
|
1527 |
-
$value = $_POST['wdform_'.$i."_element_dollars".$id];
|
1528 |
-
}
|
1529 |
-
if(isset($_POST['wdform_'.$i."_element_cents".$id])) {
|
1530 |
-
$value = $value . '.' . $_POST['wdform_'.$i."_element_cents".$id];
|
1531 |
}
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1539 |
}
|
1540 |
-
|
1541 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1542 |
}
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1547 |
}
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1561 |
}
|
1562 |
-
|
1563 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1564 |
}
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
$
|
|
|
|
|
|
|
|
|
1569 |
}
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
}
|
1579 |
-
|
1580 |
-
case "type_paypal_shipping": {
|
1581 |
-
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
1582 |
-
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
1583 |
}
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
|
1593 |
-
$start = -1;
|
1594 |
-
for($j = 0; $j < 100; $j++) {
|
1595 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1596 |
-
if(isset($element)) {
|
1597 |
-
$start=$j;
|
1598 |
-
break;
|
1599 |
-
}
|
1600 |
-
}
|
1601 |
-
|
1602 |
-
if($start!=-1) {
|
1603 |
-
for($j = $start; $j < 100; $j++) {
|
1604 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1605 |
-
if(isset($element)) {
|
1606 |
-
$list = $list . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . '<br>';
|
1607 |
-
}
|
1608 |
-
}
|
1609 |
-
}
|
1610 |
-
$element_quantity_label = isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
1611 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
1612 |
-
if (isset($element_quantity)) {
|
1613 |
-
$list = $list . '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
1614 |
}
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
}
|
1624 |
-
|
1625 |
-
case "type_paypal_total": {
|
1626 |
-
$element = isset($_POST['wdform_'.$i."_paypal_total".$id]) ? $_POST['wdform_'.$i."_paypal_total".$id] : "";
|
1627 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1628 |
-
break;
|
1629 |
-
}
|
1630 |
-
case "type_star_rating": {
|
1631 |
-
$element = isset($_POST['wdform_'.$i."_star_amount".$id]) ? $_POST['wdform_'.$i."_star_amount".$id] : NULL;
|
1632 |
-
$selected = isset($_POST['wdform_'.$i."_selected_star_amount".$id]) ? $_POST['wdform_'.$i."_selected_star_amount".$id] : 0;
|
1633 |
-
if(isset($element)) {
|
1634 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $selected . '/' . $element . '</pre></td></tr>';
|
1635 |
-
}
|
1636 |
-
break;
|
1637 |
-
}
|
1638 |
-
case "type_scale_rating": {
|
1639 |
-
$element = isset($_POST['wdform_'.$i."_scale_amount".$id]) ? $_POST['wdform_'.$i."_scale_amount".$id] : NULL;
|
1640 |
-
$selected = isset($_POST['wdform_'.$i."_scale_radio".$id]) ? $_POST['wdform_'.$i."_scale_radio".$id] : 0;
|
1641 |
-
if(isset($element)) {
|
1642 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $selected . '/' . $element . '</pre></td></tr>';
|
1643 |
}
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
}
|
1662 |
-
case "type_range": {
|
1663 |
-
$element0 = isset($_POST['wdform_'.$i."_element".$id.'0']) ? $_POST['wdform_'.$i."_element".$id.'0'] : NULL;
|
1664 |
-
$element1 = isset($_POST['wdform_'.$i."_element".$id.'1']) ? $_POST['wdform_'.$i."_element".$id.'1'] : NULL;
|
1665 |
-
if(isset($element0) || isset($element1)) {
|
1666 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">From:' . $element0 . '<span style="margin-left:6px">To</span>:' . $element1 . '</pre></td></tr>';
|
1667 |
-
}
|
1668 |
-
break;
|
1669 |
-
}
|
1670 |
-
|
1671 |
-
case "type_grading": {
|
1672 |
-
$element = isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "";
|
1673 |
-
$grading = explode(":", $element);
|
1674 |
-
$items_count = sizeof($grading) - 1;
|
1675 |
-
$element = "";
|
1676 |
-
$total = "";
|
1677 |
-
for($k = 0;$k < $items_count; $k++) {
|
1678 |
-
$element .= $grading[$k] . ":" . (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : "") . " ";
|
1679 |
-
$total += (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : 0);
|
1680 |
-
}
|
1681 |
-
$element .= "Total:" . $total;
|
1682 |
-
if(isset($element)) {
|
1683 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1684 |
-
}
|
1685 |
-
break;
|
1686 |
-
}
|
1687 |
-
case "type_matrix": {
|
1688 |
-
$input_type = isset($_POST['wdform_'.$i."_input_type".$id]) ? $_POST['wdform_'.$i."_input_type".$id] : "";
|
1689 |
-
$mat_rows = explode("***", isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "");
|
1690 |
-
$rows_count = sizeof($mat_rows) - 1;
|
1691 |
-
$mat_columns = explode("***", isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "");
|
1692 |
-
$columns_count = sizeof($mat_columns) - 1;
|
1693 |
-
$matrix = "<table>";
|
1694 |
-
$matrix .= '<tr><td></td>';
|
1695 |
-
for($k = 1; $k < count($mat_columns); $k++) {
|
1696 |
-
$matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[$k] . '</td>';
|
1697 |
}
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
$
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
$checked = "";
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
$checked = isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "";
|
1725 |
-
if($checked == 1) {
|
1726 |
$checked = "checked";
|
1727 |
}
|
1728 |
-
|
1729 |
$checked = "";
|
1730 |
}
|
1731 |
-
|
1732 |
-
}
|
1733 |
-
}
|
1734 |
-
else {
|
1735 |
-
if($input_type == "text") {
|
1736 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
1737 |
-
$checked = isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "";
|
1738 |
-
$matrix .= '<td style="text-align:center"><input type="text" value="' . $checked . '" disabled /></td>';
|
1739 |
-
}
|
1740 |
-
}
|
1741 |
-
else {
|
1742 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
1743 |
-
$checked = isset($_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j] : "";
|
1744 |
-
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
1745 |
-
}
|
1746 |
-
}
|
1747 |
-
}
|
1748 |
-
}
|
1749 |
-
$matrix .= '</tr>';
|
1750 |
-
}
|
1751 |
-
$matrix .= '</table>';
|
1752 |
-
if(isset($matrix)) {
|
1753 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $matrix . '</pre></td></tr>';
|
1754 |
-
}
|
1755 |
-
break;
|
1756 |
-
}
|
1757 |
-
default: break;
|
1758 |
-
}
|
1759 |
-
}
|
1760 |
-
}
|
1761 |
-
|
1762 |
-
//////
|
1763 |
-
$list = $list . '</table>';
|
1764 |
-
$list = wordwrap($list, 70, "\n", TRUE);
|
1765 |
-
// add_filter('wp_mail_content_type', create_function('', 'return "text/html";'));
|
1766 |
-
|
1767 |
-
for ($k = 0; $k < count($all_files); $k++) {
|
1768 |
-
//// $attachment[$k] = dirname(__FILE__) . '/uploads/' . $all_files[$k]['name'];
|
1769 |
-
//$attachment[$k]= $all_files[$k]['name'];
|
1770 |
-
|
1771 |
-
if (isset($all_files[$k]['tmp_name'][$k])) {
|
1772 |
-
$attachment[$k] = $all_files[$k]['tmp_name'];
|
1773 |
-
}
|
1774 |
-
}
|
1775 |
-
//////////
|
1776 |
-
|
1777 |
-
if($row->sendemail)
|
1778 |
-
if($row->send_to) {
|
1779 |
-
$recipient = '';
|
1780 |
-
$send_tos=explode('**',$row->send_to);
|
1781 |
-
if ($row->mail_from_user != '') {
|
1782 |
-
if ($row->mail_from_name_user != '') {
|
1783 |
-
$from = "From: " . $row->mail_from_name_user . " <" . $row->mail_from_user . ">" . "\r\n";
|
1784 |
-
}
|
1785 |
-
else {
|
1786 |
-
$from = "From: " . $row->mail_from_user . " <" . $row->mail_from_user . ">" . "\r\n";
|
1787 |
-
}
|
1788 |
-
}
|
1789 |
-
else {
|
1790 |
-
$from = '';
|
1791 |
-
}
|
1792 |
-
$headers = "MIME-Version: 1.0\n" . $from . " Content-Type: text/html; charset=\"" . get_option('blog_charset') . "\"\n";
|
1793 |
-
|
1794 |
-
$subject = $row->title;
|
1795 |
-
if($row->reply_to_user) {
|
1796 |
-
$replyto = $row->reply_to_user;
|
1797 |
-
}
|
1798 |
-
$headers .= "Reply-To: <" . $replyto . ">\r\n";
|
1799 |
-
$new_script = $row->script_mail_user;
|
1800 |
-
foreach($label_order_original as $key => $label_each) {
|
1801 |
-
if(strpos($row->script_mail_user, "%" . $label_each . "%") !== FALSE) {
|
1802 |
-
$type=$label_type[$key];
|
1803 |
-
if($type!="type_submit_reset" or $type!="type_map" or $type!="type_editor" or $type!="type_captcha" or $type!="type_recaptcha" or $type!="type_button") {
|
1804 |
-
$new_value ="";
|
1805 |
-
switch ($type) {
|
1806 |
-
case 'type_text':
|
1807 |
-
case 'type_password':
|
1808 |
-
case 'type_textarea':
|
1809 |
-
case "type_date":
|
1810 |
-
case "type_own_select":
|
1811 |
-
case "type_country":
|
1812 |
-
case "type_number": {
|
1813 |
-
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
1814 |
-
if(isset($element)) {
|
1815 |
-
$new_value = $element;
|
1816 |
-
}
|
1817 |
-
break;
|
1818 |
-
}
|
1819 |
-
case "type_wdeditor": {
|
1820 |
-
$element = isset($_POST['wdform_'.$key.'_wd_editor'.$id]) ? $_POST['wdform_'.$key.'_wd_editor'.$id] : NULL;
|
1821 |
-
if(isset($element)) {
|
1822 |
-
$new_value = $element;
|
1823 |
-
}
|
1824 |
-
break;
|
1825 |
-
}
|
1826 |
-
case "type_hidden": {
|
1827 |
-
$element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
|
1828 |
-
if(isset($element)) {
|
1829 |
-
$new_value = $element;
|
1830 |
-
}
|
1831 |
-
break;
|
1832 |
-
}
|
1833 |
-
case "type_mark_map": {
|
1834 |
-
$element = isset($_POST['wdform_'.$key."_long".$id]) ? $_POST['wdform_'.$key."_long".$id] : NULL;
|
1835 |
-
if(isset($element)) {
|
1836 |
-
$new_value = 'Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_'.$key."_lat".$id]) ? $_POST['wdform_'.$key."_lat".$id] : "");
|
1837 |
-
}
|
1838 |
-
break;
|
1839 |
-
}
|
1840 |
-
case "type_submitter_mail": {
|
1841 |
-
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
1842 |
-
if(isset($element)) {
|
1843 |
-
$new_value = $element;
|
1844 |
-
}
|
1845 |
-
break;
|
1846 |
-
}
|
1847 |
-
case "type_time": {
|
1848 |
-
$hh = isset($_POST['wdform_'.$key."_hh".$id]) ? $_POST['wdform_'.$key."_hh".$id] : NULL;
|
1849 |
-
if(isset($hh)) {
|
1850 |
-
$ss = isset($_POST['wdform_'.$key."_ss".$id]) ? $_POST['wdform_'.$key."_ss".$id] : NULL;
|
1851 |
-
if(isset($ss)) {
|
1852 |
-
$new_value = $hh . ':' . (isset($_POST['wdform_'.$key."_mm".$id]) ? $_POST['wdform_'.$key."_mm".$id] : "") . ':' . $ss;
|
1853 |
-
}
|
1854 |
-
else {
|
1855 |
-
$new_value = $hh . ':' . (isset($_POST['wdform_'.$key."_mm".$id]) ? $_POST['wdform_'.$key."_mm".$id] : "");
|
1856 |
-
}
|
1857 |
-
$am_pm = isset($_POST['wdform_'.$key."_am_pm".$id]) ? $_POST['wdform_'.$key."_am_pm".$id] : NULL;
|
1858 |
-
if(isset($am_pm)) {
|
1859 |
-
$new_value = $new_value . ' ' . $am_pm;
|
1860 |
-
}
|
1861 |
-
}
|
1862 |
-
break;
|
1863 |
-
}
|
1864 |
-
|
1865 |
-
case "type_phone": {
|
1866 |
-
$element_first = isset($_POST['wdform_'.$key."_element_first".$id]) ? $_POST['wdform_'.$key."_element_first".$id] : NULL;
|
1867 |
-
if(isset($element_first)) {
|
1868 |
-
$new_value = $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "");
|
1869 |
-
}
|
1870 |
-
break;
|
1871 |
-
}
|
1872 |
-
case "type_name": {
|
1873 |
-
$element_first = isset($_POST['wdform_'.$key."_element_first".$id]) ? $_POST['wdform_'.$key."_element_first".$id] : NULL;
|
1874 |
-
if(isset($element_first)) {
|
1875 |
-
$element_title = isset($_POST['wdform_'.$key."_element_title".$id]) ? $_POST['wdform_'.$key."_element_title".$id] : NULL;
|
1876 |
-
if(isset($element_title)) {
|
1877 |
-
$new_value = $element_title . ' ' . $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "") . ' ' . (isset($_POST['wdform_'.$key."_element_middle".$id]) ? $_POST['wdform_'.$key."_element_middle".$id] : "");
|
1878 |
}
|
1879 |
-
else {
|
1880 |
-
$new_value = $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "");
|
1881 |
-
}
|
1882 |
-
}
|
1883 |
-
break;
|
1884 |
-
}
|
1885 |
-
case "type_address": {
|
1886 |
-
$street1 = isset($_POST['wdform_'.$key."_street1".$id]) ? $_POST['wdform_'.$key."_street1".$id] : NULL;
|
1887 |
-
if(isset($street1)) {
|
1888 |
-
$new_value = $street1;
|
1889 |
-
break;
|
1890 |
-
}
|
1891 |
-
$street2 = isset($_POST['wdform_'.$key."_street2".$id]) ? $_POST['wdform_'.$key."_street2".$id] : NULL;
|
1892 |
-
if(isset($street2)) {
|
1893 |
-
$new_value = $street2;
|
1894 |
-
break;
|
1895 |
-
}
|
1896 |
-
$city = isset($_POST['wdform_'.$key."_city".$id]) ? $_POST['wdform_'.$key."_city".$id] : NULL;
|
1897 |
-
if(isset($city)) {
|
1898 |
-
$new_value = $city;
|
1899 |
-
break;
|
1900 |
-
}
|
1901 |
-
$state = isset($_POST['wdform_'.$key."_state".$id]) ? $_POST['wdform_'.$key."_state".$id] : NULL;
|
1902 |
-
if(isset($state)) {
|
1903 |
-
$new_value = $state;
|
1904 |
-
break;
|
1905 |
-
}
|
1906 |
-
$postal = isset($_POST['wdform_'.$key."_postal".$id]) ? $_POST['wdform_'.$key."_postal".$id] : NULL;
|
1907 |
-
if(isset($postal)) {
|
1908 |
-
$new_value = $postal;
|
1909 |
-
break;
|
1910 |
-
}
|
1911 |
-
$country = isset($_POST['wdform_'.$key."_country".$id]) ? $_POST['wdform_'.$key."_country".$id] : NULL;
|
1912 |
-
if(isset($country)) {
|
1913 |
-
$new_value = $country;
|
1914 |
-
break;
|
1915 |
-
}
|
1916 |
-
break;
|
1917 |
-
}
|
1918 |
-
case "type_date_fields": {
|
1919 |
-
$day = isset($_POST['wdform_'.$key."_day".$id]) ? $_POST['wdform_'.$key."_day".$id] : NULL;
|
1920 |
-
if(isset($day)) {
|
1921 |
-
$new_value = $day . '-' . (isset($_POST['wdform_'.$key."_month".$id]) ? $_POST['wdform_'.$key."_month".$id] : "") . '-' . (isset($_POST['wdform_'.$key."_year".$id]) ? $_POST['wdform_'.$key."_year".$id] : "");
|
1922 |
-
}
|
1923 |
-
break;
|
1924 |
-
}
|
1925 |
-
|
1926 |
-
case "type_radio": {
|
1927 |
-
$element = isset($_POST['wdform_'.$key."_other_input".$id]) ? $_POST['wdform_'.$key."_other_input".$id] : NULL;
|
1928 |
-
if(isset($element)) {
|
1929 |
-
$new_value = $element;
|
1930 |
-
break;
|
1931 |
-
}
|
1932 |
-
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
1933 |
-
if(isset($element)) {
|
1934 |
-
$new_value = $element;
|
1935 |
-
}
|
1936 |
-
break;
|
1937 |
-
}
|
1938 |
-
case "type_checkbox": {
|
1939 |
-
$start = -1;
|
1940 |
-
for($j = 0; $j < 100; $j++) {
|
1941 |
-
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
1942 |
-
if(isset($element)) {
|
1943 |
-
$start = $j;
|
1944 |
-
break;
|
1945 |
-
}
|
1946 |
-
}
|
1947 |
-
$other_element_id = -1;
|
1948 |
-
$is_other = isset($_POST['wdform_'.$key."_allow_other".$id]) ? $_POST['wdform_'.$key."_allow_other".$id] : "";
|
1949 |
-
if($is_other == "yes") {
|
1950 |
-
$other_element_id = isset($_POST['wdform_'.$key."_allow_other_num".$id]) ? $_POST['wdform_'.$key."_allow_other_num".$id] : "";
|
1951 |
-
}
|
1952 |
-
if($start != -1) {
|
1953 |
-
for($j = $start; $j < 100; $j++) {
|
1954 |
-
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
1955 |
-
if(isset($element)) {
|
1956 |
-
if($j == $other_element_id) {
|
1957 |
-
$new_value = $new_value . (isset($_POST['wdform_'.$key."_other_input".$id]) ? $_POST['wdform_'.$key."_other_input".$id] : "") . '<br>';
|
1958 |
-
}
|
1959 |
-
else {
|
1960 |
-
$new_value = $new_value . $element . '<br>';
|
1961 |
-
}
|
1962 |
-
}
|
1963 |
-
}
|
1964 |
-
}
|
1965 |
-
break;
|
1966 |
-
}
|
1967 |
-
case "type_paypal_price": {
|
1968 |
-
$new_value = 0;
|
1969 |
-
if(isset($_POST['wdform_'.$key."_element_dollars".$id])) {
|
1970 |
-
$new_value = $_POST['wdform_'.$key."_element_dollars".$id];
|
1971 |
-
}
|
1972 |
-
if(isset($_POST['wdform_'.$key."_element_cents".$id])) {
|
1973 |
-
$new_value = $new_value . '.' . $_POST['wdform_'.$key."_element_cents".$id];
|
1974 |
-
}
|
1975 |
-
$new_value = $new_value . $form_currency;
|
1976 |
-
break;
|
1977 |
-
}
|
1978 |
-
case "type_paypal_select": {
|
1979 |
-
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ':' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
1980 |
-
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
1981 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
1982 |
-
if (isset($element_quantity)) {
|
1983 |
-
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
1984 |
-
}
|
1985 |
-
for($k = 0; $k < 50; $k++) {
|
1986 |
-
$temp_val = isset($_POST['wdform_'.$key."_element_property_value".$id.$k]) ? $_POST['wdform_'.$key."_element_property_value".$id.$k] : NULL;
|
1987 |
-
if(isset($temp_val)) {
|
1988 |
-
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
1989 |
-
}
|
1990 |
-
}
|
1991 |
-
break;
|
1992 |
-
}
|
1993 |
-
case "type_paypal_radio": {
|
1994 |
-
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ' - ' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
1995 |
-
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
1996 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
1997 |
-
if (isset($element_quantity)) {
|
1998 |
-
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
1999 |
-
}
|
2000 |
-
for($k = 0; $k < 50; $k++) {
|
2001 |
-
$temp_val = isset($_POST['wdform_'.$key."_element_property_value".$id.$k]) ? $_POST['wdform_'.$key."_element_property_value".$id.$k] : NULL;
|
2002 |
-
if(isset($temp_val)) {
|
2003 |
-
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
2004 |
-
}
|
2005 |
-
}
|
2006 |
-
break;
|
2007 |
-
}
|
2008 |
-
case "type_paypal_shipping": {
|
2009 |
-
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ' : ' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
2010 |
-
break;
|
2011 |
-
}
|
2012 |
-
case "type_paypal_checkbox": {
|
2013 |
-
$start = -1;
|
2014 |
-
for($j = 0; $j < 100; $j++) {
|
2015 |
-
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
2016 |
-
if(isset($element)) {
|
2017 |
-
$start = $j;
|
2018 |
-
break;
|
2019 |
-
}
|
2020 |
-
}
|
2021 |
-
if($start != -1) {
|
2022 |
-
for($j = $start; $j < 100; $j++) {
|
2023 |
-
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
2024 |
-
if(isset($element)) {
|
2025 |
-
$new_value = $new_value . (isset($_POST['wdform_'.$key."_element".$id.$j."_label"]) ? $_POST['wdform_'.$key."_element".$id.$j."_label"] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . '<br>';
|
2026 |
-
}
|
2027 |
-
}
|
2028 |
-
}
|
2029 |
-
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
2030 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
2031 |
-
if (isset($element_quantity)) {
|
2032 |
-
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
2033 |
}
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
break;
|
2041 |
-
}
|
2042 |
-
case "type_paypal_total": {
|
2043 |
-
$element = isset($_POST['wdform_'.$key."_paypal_total".$id]) ? $_POST['wdform_'.$key."_paypal_total".$id] : "";
|
2044 |
-
$new_value = $new_value . $element;
|
2045 |
-
break;
|
2046 |
-
}
|
2047 |
-
case "type_star_rating": {
|
2048 |
-
$element = isset($_POST['wdform_'.$key."_star_amount".$id]) ? $_POST['wdform_'.$key."_star_amount".$id] : NULL;
|
2049 |
-
$selected = isset($_POST['wdform_'.$key."_selected_star_amount".$id]) ? $_POST['wdform_'.$key."_selected_star_amount".$id] : 0;
|
2050 |
-
if(isset($element)) {
|
2051 |
-
$new_value = $new_value . $selected . '/' . $element;
|
2052 |
-
}
|
2053 |
-
break;
|
2054 |
-
}
|
2055 |
-
case "type_scale_rating": {
|
2056 |
-
$element = isset($_POST['wdform_'.$key."_scale_amount".$id]) ? $_POST['wdform_'.$key."_scale_amount".$id] : NULL;
|
2057 |
-
$selected = isset($_POST['wdform_'.$key."_scale_radio".$id]) ? $_POST['wdform_'.$key."_scale_radio".$id] : 0;
|
2058 |
-
if(isset($element)) {
|
2059 |
-
$new_value = $new_value . $selected . '/' . $element;
|
2060 |
-
}
|
2061 |
-
break;
|
2062 |
-
}
|
2063 |
-
case "type_spinner": {
|
2064 |
-
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
2065 |
-
if(isset($element)) {
|
2066 |
-
$new_value = $new_value . $element;
|
2067 |
-
}
|
2068 |
-
break;
|
2069 |
-
}
|
2070 |
-
case "type_slider": {
|
2071 |
-
$element = isset($_POST['wdform_'.$key."_slider_value".$id]) ? $_POST['wdform_'.$key."_slider_value".$id] : NULL;
|
2072 |
-
if(isset($element)) {
|
2073 |
-
$new_value = $new_value . $element;
|
2074 |
-
}
|
2075 |
-
break;
|
2076 |
-
}
|
2077 |
-
case "type_range": {
|
2078 |
-
$element0 = isset($_POST['wdform_'.$key."_element".$id.'0']) ? $_POST['wdform_'.$key."_element".$id.'0'] : NULL;
|
2079 |
-
$element1 = isset($_POST['wdform_'.$key."_element".$id.'1']) ? $_POST['wdform_'.$key."_element".$id.'1'] : NULL;
|
2080 |
-
if(isset($element0) || isset($element1)) {
|
2081 |
-
$new_value = $new_value . $element0 . '-' . $element1;
|
2082 |
-
}
|
2083 |
-
break;
|
2084 |
-
}
|
2085 |
-
case "type_grading": {
|
2086 |
-
$element = isset($_POST['wdform_'.$key."_hidden_item".$id]) ? $_POST['wdform_'.$key."_hidden_item".$id] : "";
|
2087 |
-
$grading = explode(":", $element);
|
2088 |
-
$items_count = sizeof($grading) - 1;
|
2089 |
-
$element = "";
|
2090 |
-
$total = "";
|
2091 |
-
for($k = 0;$k < $items_count; $k++) {
|
2092 |
-
$element .= $grading[$k] . ":" . (isset($_POST['wdform_'.$key."_element".$id.'_'.$k]) ? $_POST['wdform_'.$key."_element".$id.'_'.$k] : "") . " ";
|
2093 |
-
$total += (isset($_POST['wdform_'.$key."_element".$id.'_'.$k]) ? $_POST['wdform_'.$key."_element".$id.'_'.$k] : 0);
|
2094 |
-
}
|
2095 |
-
$element .="Total:" . $total;
|
2096 |
-
if(isset($element)) {
|
2097 |
-
$new_value = $new_value . $element;
|
2098 |
-
}
|
2099 |
-
break;
|
2100 |
-
}
|
2101 |
-
case "type_matrix": {
|
2102 |
-
$input_type = isset($_POST['wdform_'.$key."_input_type".$id]) ? $_POST['wdform_'.$key."_input_type".$id] : "";
|
2103 |
-
$mat_rows = explode("***", isset($_POST['wdform_'.$key."_hidden_row".$id]) ? $_POST['wdform_'.$key."_hidden_row".$id] : "");
|
2104 |
-
$rows_count = sizeof($mat_rows) - 1;
|
2105 |
-
$mat_columns = explode("***", isset($_POST['wdform_'.$key."_hidden_column".$id]) ? $_POST['wdform_'.$key."_hidden_column".$id] : "");
|
2106 |
-
$columns_count = sizeof($mat_columns) - 1;
|
2107 |
-
$matrix="<table>";
|
2108 |
-
$matrix .='<tr><td></td>';
|
2109 |
-
for( $k=1;$k< count($mat_columns) ;$k++) {
|
2110 |
-
$matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[$k] . '</td>';
|
2111 |
-
}
|
2112 |
-
$matrix .= '</tr>';
|
2113 |
-
$aaa=Array();
|
2114 |
-
for($k=1; $k<=$rows_count; $k++) {
|
2115 |
-
$matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[$k] . '</td>';
|
2116 |
-
if($input_type=="radio") {
|
2117 |
-
$mat_radio = isset($_POST['wdform_'.$key."_input_element".$id.$k]) ? $_POST['wdform_'.$key."_input_element".$id.$k] : 0;
|
2118 |
-
if($mat_radio == 0) {
|
2119 |
-
$checked = "";
|
2120 |
-
$aaa[1] = "";
|
2121 |
-
}
|
2122 |
-
else {
|
2123 |
-
$aaa = explode("_", $mat_radio);
|
2124 |
-
}
|
2125 |
-
|
2126 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
2127 |
-
if($aaa[1]==$j) {
|
2128 |
-
$checked="checked";
|
2129 |
-
}
|
2130 |
-
else {
|
2131 |
-
$checked="";
|
2132 |
-
}
|
2133 |
-
$matrix .= '<td style="text-align:center"><input type="radio" ' . $checked . ' disabled /></td>';
|
2134 |
-
}
|
2135 |
-
}
|
2136 |
-
else {
|
2137 |
-
if($input_type == "checkbox") {
|
2138 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
2139 |
-
$checked = isset($_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j] : 0;
|
2140 |
-
if($checked==1) {
|
2141 |
-
$checked = "checked";
|
2142 |
-
}
|
2143 |
-
else {
|
2144 |
-
$checked = "";
|
2145 |
-
}
|
2146 |
-
$matrix .= '<td style="text-align:center"><input type="checkbox" ' . $checked . ' disabled /></td>';
|
2147 |
-
}
|
2148 |
}
|
2149 |
else {
|
2150 |
-
|
2151 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
2152 |
-
$checked = isset($_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j] : "";
|
2153 |
-
$matrix .= '<td style="text-align:center"><input type="text" value="' . $checked . '" disabled /></td>';
|
2154 |
-
}
|
2155 |
-
}
|
2156 |
-
else {
|
2157 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
2158 |
-
$checked = isset($_POST['wdform_'.$key."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_select_yes_no".$id.$k.'_'.$j] : "";
|
2159 |
-
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
2160 |
-
}
|
2161 |
-
}
|
2162 |
}
|
2163 |
-
|
2164 |
-
|
2165 |
-
}
|
2166 |
-
$matrix .= '</table>';
|
2167 |
-
if(isset($matrix)) {
|
2168 |
-
$new_value = $new_value . $matrix;
|
2169 |
}
|
2170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2171 |
}
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2176 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2177 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2178 |
if(strpos($new_script, "%ip%") > -1) {
|
2179 |
$new_script = str_replace("%ip%", $ip, $new_script);
|
2180 |
}
|
2181 |
if(strpos($new_script, "%all%") > -1) {
|
2182 |
-
$new_script = str_replace("%all%", $
|
2183 |
}
|
2184 |
$body = $new_script;
|
2185 |
-
$mode = 1;
|
2186 |
|
2187 |
$send_copy = isset($_POST["wdform_send_copy_".$id]) ? $_POST["wdform_send_copy_".$id] : NULL;
|
2188 |
|
@@ -2193,7 +1902,7 @@ class FMModelForm_maker {
|
|
2193 |
foreach($send_tos as $send_to) {
|
2194 |
$recipient = isset($_POST['wdform_'.str_replace('*', '', $send_to)."_element".$id]) ? $_POST['wdform_'.str_replace('*', '', $send_to)."_element".$id] : NULL;
|
2195 |
if($recipient) {
|
2196 |
-
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $
|
2197 |
}
|
2198 |
}
|
2199 |
}
|
@@ -2201,413 +1910,95 @@ class FMModelForm_maker {
|
|
2201 |
|
2202 |
if($row->sendemail)
|
2203 |
if ($row->mail) {
|
2204 |
-
if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2205 |
$from = isset($_POST['wdform_'.$row->from_mail."_element".$id]) ? $_POST['wdform_'.$row->from_mail."_element".$id] : NULL;
|
2206 |
if (!isset($from)) {
|
2207 |
$from = $row->from_mail;
|
2208 |
}
|
2209 |
-
if ($row->from_name) {
|
2210 |
-
$fromname = $row->from_name;
|
2211 |
-
}
|
2212 |
-
else {
|
2213 |
-
$fromname = $row->from_mail;
|
2214 |
-
}
|
2215 |
$from = "From: " . $fromname . " <" . $from . ">" . "\r\n";
|
2216 |
}
|
2217 |
else {
|
2218 |
$from = "";
|
2219 |
}
|
2220 |
-
$headers = "MIME-Version: 1.0\n" . $from . " Content-Type:
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
foreach($label_order_original as $key => $label_each) {
|
2234 |
-
if(strpos($row->script_mail, "%".$label_each."%") !== FALSE) {
|
2235 |
-
$type=$label_type[$key];
|
2236 |
-
if($type!="type_submit_reset" or $type!="type_map" or $type!="type_editor" or $type!="type_captcha" or $type!="type_recaptcha" or $type!="type_button") {
|
2237 |
-
$new_value ="";
|
2238 |
-
switch ($type) {
|
2239 |
-
case 'type_text':
|
2240 |
-
case 'type_password':
|
2241 |
-
case 'type_textarea':
|
2242 |
-
case "type_date":
|
2243 |
-
case "type_own_select":
|
2244 |
-
case "type_country":
|
2245 |
-
case "type_number": {
|
2246 |
-
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
2247 |
-
if(isset($element)) {
|
2248 |
-
$new_value = $element;
|
2249 |
-
}
|
2250 |
-
break;
|
2251 |
-
}
|
2252 |
-
case "type_wdeditor": {
|
2253 |
-
$element = isset($_POST['wdform_'.$key.'_wd_editor'.$id]) ? $_POST['wdform_'.$key.'_wd_editor'.$id] : NULL;
|
2254 |
-
if(isset($element)) {
|
2255 |
-
$new_value = $element;
|
2256 |
-
}
|
2257 |
-
break;
|
2258 |
-
}
|
2259 |
-
case "type_hidden": {
|
2260 |
-
$element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
|
2261 |
-
if(isset($element)) {
|
2262 |
-
$new_value = $element;
|
2263 |
-
}
|
2264 |
-
break;
|
2265 |
-
}
|
2266 |
-
case "type_mark_map": {
|
2267 |
-
$element = isset($_POST['wdform_'.$key."_long".$id]) ? $_POST['wdform_'.$key."_long".$id] : NULL;
|
2268 |
-
if(isset($element)) {
|
2269 |
-
$new_value = 'Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_'.$key."_lat".$id]) ? $_POST['wdform_'.$key."_lat".$id] : "");
|
2270 |
-
}
|
2271 |
-
break;
|
2272 |
-
}
|
2273 |
-
case "type_submitter_mail": {
|
2274 |
-
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
2275 |
-
if(isset($element)) {
|
2276 |
-
$new_value = $element;
|
2277 |
-
}
|
2278 |
-
break;
|
2279 |
-
}
|
2280 |
-
case "type_time": {
|
2281 |
-
$hh = isset($_POST['wdform_'.$key."_hh".$id]) ? $_POST['wdform_'.$key."_hh".$id] : NULL;
|
2282 |
-
if(isset($hh)) {
|
2283 |
-
$ss = isset($_POST['wdform_'.$key."_ss".$id]) ? $_POST['wdform_'.$key."_ss".$id] : NULL;
|
2284 |
-
if(isset($ss)) {
|
2285 |
-
$new_value = $hh . ':' . (isset($_POST['wdform_'.$key."_mm".$id]) ? $_POST['wdform_'.$key."_mm".$id] : "") . ':' . $ss;
|
2286 |
-
}
|
2287 |
-
else {
|
2288 |
-
$new_value = $hh . ':' . (isset($_POST['wdform_'.$key."_mm".$id]) ? $_POST['wdform_'.$key."_mm".$id] : "");
|
2289 |
-
}
|
2290 |
-
$am_pm = isset($_POST['wdform_'.$key."_am_pm".$id]) ? $_POST['wdform_'.$key."_am_pm".$id] : NULL;
|
2291 |
-
if(isset($am_pm)) {
|
2292 |
-
$new_value = $new_value . ' ' . $am_pm;
|
2293 |
-
}
|
2294 |
-
}
|
2295 |
-
break;
|
2296 |
-
}
|
2297 |
-
case "type_phone": {
|
2298 |
-
$element_first = isset($_POST['wdform_'.$key."_element_first".$id]) ? $_POST['wdform_'.$key."_element_first".$id] : NULL;
|
2299 |
-
if(isset($element_first)) {
|
2300 |
-
$new_value = $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : NULL);
|
2301 |
-
}
|
2302 |
-
break;
|
2303 |
-
}
|
2304 |
-
case "type_name": {
|
2305 |
-
$element_first = isset($_POST['wdform_'.$key."_element_first".$id]) ? $_POST['wdform_'.$key."_element_first".$id] : NULL;
|
2306 |
-
if(isset($element_first)) {
|
2307 |
-
$element_title = isset($_POST['wdform_'.$key."_element_title".$id]) ? $_POST['wdform_'.$key."_element_title".$id] : NULL;
|
2308 |
-
if(isset($element_title)) {
|
2309 |
-
$new_value = $element_title . ' ' . $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "") . ' ' . (isset($_POST['wdform_'.$key."_element_middle".$id]) ? $_POST['wdform_'.$key."_element_middle".$id] : NULL);
|
2310 |
-
}
|
2311 |
-
else {
|
2312 |
-
$new_value = $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "");
|
2313 |
-
}
|
2314 |
-
}
|
2315 |
-
break;
|
2316 |
-
}
|
2317 |
-
case "type_address": {
|
2318 |
-
$street1 = isset($_POST['wdform_'.$key."_street1".$id]) ? $_POST['wdform_'.$key."_street1".$id] : NULL;
|
2319 |
-
if(isset($street1)) {
|
2320 |
-
$new_value = $street1;
|
2321 |
-
break;
|
2322 |
-
}
|
2323 |
-
$street2 = isset($_POST['wdform_'.$key."_street2".$id]) ? $_POST['wdform_'.$key."_street2".$id] : NULL;
|
2324 |
-
if(isset($street2)) {
|
2325 |
-
$new_value = $street2;
|
2326 |
-
break;
|
2327 |
-
}
|
2328 |
-
$city = isset($_POST['wdform_'.$key."_city".$id]) ? $_POST['wdform_'.$key."_city".$id] : NULL;
|
2329 |
-
if(isset($city)) {
|
2330 |
-
$new_value = $city;
|
2331 |
-
break;
|
2332 |
-
}
|
2333 |
-
$state = isset($_POST['wdform_'.$key."_state".$id]) ? $_POST['wdform_'.$key."_state".$id] : NULL;
|
2334 |
-
if(isset($state)) {
|
2335 |
-
$new_value = $state;
|
2336 |
-
break;
|
2337 |
-
}
|
2338 |
-
$postal = isset($_POST['wdform_'.$key."_postal".$id]) ? $_POST['wdform_'.$key."_postal".$id] : NULL;
|
2339 |
-
if(isset($postal)) {
|
2340 |
-
$new_value = $postal;
|
2341 |
-
break;
|
2342 |
-
}
|
2343 |
-
$country = isset($_POST['wdform_'.$key."_country".$id]) ? $_POST['wdform_'.$key."_country".$id] : NULL;
|
2344 |
-
if(isset($country)) {
|
2345 |
-
$new_value = $country;
|
2346 |
-
break;
|
2347 |
-
}
|
2348 |
-
break;
|
2349 |
-
}
|
2350 |
-
case "type_date_fields": {
|
2351 |
-
$day = isset($_POST['wdform_'.$key."_day".$id]) ? $_POST['wdform_'.$key."_day".$id] : NULL;
|
2352 |
-
if(isset($day)) {
|
2353 |
-
$new_value = $day . '-' . (isset($_POST['wdform_'.$key."_month".$id]) ? $_POST['wdform_'.$key."_month".$id] : "") . '-' . (isset($_POST['wdform_'.$key."_year".$id]) ? $_POST['wdform_'.$key."_year".$id] : "");
|
2354 |
-
}
|
2355 |
-
break;
|
2356 |
-
}
|
2357 |
-
|
2358 |
-
case "type_radio": {
|
2359 |
-
$element = isset($_POST['wdform_'.$key."_other_input".$id]) ? $_POST['wdform_'.$key."_other_input".$id] : NULL;
|
2360 |
-
if(isset($element)) {
|
2361 |
-
$new_value = $element;
|
2362 |
-
break;
|
2363 |
-
}
|
2364 |
-
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
2365 |
-
if(isset($element)) {
|
2366 |
-
$new_value = $element;
|
2367 |
-
}
|
2368 |
-
break;
|
2369 |
-
}
|
2370 |
-
case "type_checkbox": {
|
2371 |
-
$start = -1;
|
2372 |
-
for($j = 0; $j < 100; $j++) {
|
2373 |
-
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
2374 |
-
if(isset($element)) {
|
2375 |
-
$start = $j;
|
2376 |
-
break;
|
2377 |
-
}
|
2378 |
-
}
|
2379 |
-
$other_element_id = -1;
|
2380 |
-
$is_other = isset($_POST['wdform_'.$key."_allow_other".$id]) ? $_POST['wdform_'.$key."_allow_other".$id] : "";
|
2381 |
-
if($is_other == "yes") {
|
2382 |
-
$other_element_id = isset($_POST['wdform_'.$key."_allow_other_num".$id]) ? $_POST['wdform_'.$key."_allow_other_num".$id] : "";
|
2383 |
-
}
|
2384 |
-
if($start != -1) {
|
2385 |
-
for($j = $start; $j < 100; $j++) {
|
2386 |
-
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
2387 |
-
if(isset($element)) {
|
2388 |
-
if($j == $other_element_id) {
|
2389 |
-
$new_value = $new_value . (isset($_POST['wdform_'.$key."_other_input".$id]) ? $_POST['wdform_'.$key."_other_input".$id] : "") . '<br>';
|
2390 |
-
}
|
2391 |
-
else {
|
2392 |
-
$new_value = $new_value . $element . '<br>';
|
2393 |
-
}
|
2394 |
-
}
|
2395 |
-
}
|
2396 |
-
}
|
2397 |
-
break;
|
2398 |
-
}
|
2399 |
-
case "type_paypal_price": {
|
2400 |
-
$new_value = 0;
|
2401 |
-
if(isset($_POST['wdform_'.$key."_element_dollars".$id])) {
|
2402 |
-
$new_value = $_POST['wdform_'.$key."_element_dollars".$id];
|
2403 |
-
}
|
2404 |
-
if(isset($_POST['wdform_'.$key."_element_cents".$id])) {
|
2405 |
-
$new_value = $new_value . '.' . $_POST['wdform_'.$key."_element_cents".$id];
|
2406 |
-
}
|
2407 |
-
$new_value = $new_value . $form_currency;
|
2408 |
-
break;
|
2409 |
-
}
|
2410 |
-
case "type_paypal_select": {
|
2411 |
-
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ':' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
2412 |
-
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
2413 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
2414 |
-
if (isset($element_quantity)) {
|
2415 |
-
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
2416 |
-
}
|
2417 |
-
for($k = 0; $k < 50; $k++) {
|
2418 |
-
$temp_val = isset($_POST['wdform_'.$key."_element_property_value".$id.$k]) ? $_POST['wdform_'.$key."_element_property_value".$id.$k] : NULL;
|
2419 |
-
if(isset($temp_val)) {
|
2420 |
-
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
2421 |
-
}
|
2422 |
-
}
|
2423 |
-
break;
|
2424 |
-
}
|
2425 |
-
case "type_paypal_radio": {
|
2426 |
-
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ' - ' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
2427 |
-
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
2428 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
2429 |
-
if (isset($element_quantity)) {
|
2430 |
-
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
2431 |
-
}
|
2432 |
-
for($k = 0; $k < 50; $k++) {
|
2433 |
-
$temp_val = isset($_POST['wdform_'.$key."_element_property_value".$id.$k]) ? $_POST['wdform_'.$key."_element_property_value".$id.$k] : NULL;
|
2434 |
-
if(isset($temp_val)) {
|
2435 |
-
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
2436 |
-
}
|
2437 |
-
}
|
2438 |
-
break;
|
2439 |
-
}
|
2440 |
-
case "type_paypal_shipping": {
|
2441 |
-
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ' : ' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
2442 |
-
break;
|
2443 |
-
}
|
2444 |
-
case "type_paypal_checkbox": {
|
2445 |
-
$start = -1;
|
2446 |
-
for ($j = 0; $j < 100; $j++) {
|
2447 |
-
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j]: NULL;
|
2448 |
-
if (isset($element)) {
|
2449 |
-
$start = $j;
|
2450 |
-
break;
|
2451 |
-
}
|
2452 |
-
}
|
2453 |
-
if($start != -1) {
|
2454 |
-
for($j = $start; $j < 100; $j++) {
|
2455 |
-
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
2456 |
-
if(isset($element)) {
|
2457 |
-
$new_value = $new_value . (isset($_POST['wdform_'.$key."_element".$id.$j."_label"]) ? $_POST['wdform_'.$key."_element".$id.$j."_label"] : NULL) . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . '<br>';
|
2458 |
-
}
|
2459 |
-
}
|
2460 |
-
}
|
2461 |
-
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
2462 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
2463 |
-
if (isset($element_quantity)) {
|
2464 |
-
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
2465 |
-
}
|
2466 |
-
for($k = 0; $k < 50; $k++) {
|
2467 |
-
$temp_val = isset($_POST['wdform_'.$key."_element_property_value".$id.$k]) ? $_POST['wdform_'.$key."_element_property_value".$id.$k] : NULL;
|
2468 |
-
if(isset($temp_val)) {
|
2469 |
-
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
2470 |
-
}
|
2471 |
-
}
|
2472 |
-
break;
|
2473 |
-
}
|
2474 |
-
case "type_paypal_total": {
|
2475 |
-
$element = isset($_POST['wdform_'.$key."_paypal_total".$id]) ? $_POST['wdform_'.$key."_paypal_total".$id] : NULL;
|
2476 |
-
$new_value = $new_value . $element;
|
2477 |
-
break;
|
2478 |
-
}
|
2479 |
-
case "type_star_rating": {
|
2480 |
-
$element = isset($_POST['wdform_'.$key."_star_amount".$id]) ? $_POST['wdform_'.$key."_star_amount".$id] : NULL;
|
2481 |
-
$selected = isset($_POST['wdform_'.$key."_selected_star_amount".$id]) ? $_POST['wdform_'.$key."_selected_star_amount".$id] : 0;
|
2482 |
-
//$star_color=JRequest::getVar($key."_star_color_id_temp");
|
2483 |
-
if(isset($element)) {
|
2484 |
-
$new_value = $new_value . $selected . '/' . $element;
|
2485 |
-
}
|
2486 |
-
break;
|
2487 |
-
}
|
2488 |
-
case "type_scale_rating": {
|
2489 |
-
$element = isset($_POST['wdform_'.$key."_scale_amount".$id]) ? $_POST['wdform_'.$key."_scale_amount".$id] : NULL;
|
2490 |
-
$selected = isset($_POST['wdform_'.$key."_scale_radio".$id]) ? $_POST['wdform_'.$key."_scale_radio".$id] : 0;
|
2491 |
-
if(isset($element)) {
|
2492 |
-
$new_value = $new_value . $selected . '/' . $element;
|
2493 |
-
}
|
2494 |
-
break;
|
2495 |
-
}
|
2496 |
-
case "type_spinner": {
|
2497 |
-
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
2498 |
-
if(isset($element)) {
|
2499 |
-
$new_value = $new_value . $element;
|
2500 |
-
}
|
2501 |
-
break;
|
2502 |
-
}
|
2503 |
-
case "type_slider": {
|
2504 |
-
$element = isset($_POST['wdform_'.$key."_slider_value".$id]) ? $_POST['wdform_'.$key."_slider_value".$id] : NULL;
|
2505 |
-
if(isset($element)) {
|
2506 |
-
$new_value = $new_value . $element;
|
2507 |
-
}
|
2508 |
-
break;
|
2509 |
-
}
|
2510 |
-
case "type_range": {
|
2511 |
-
$element0 = isset($_POST['wdform_'.$key."_element".$id.'0']) ? $_POST['wdform_'.$key."_element".$id.'0'] : NULL;
|
2512 |
-
$element1 = isset($_POST['wdform_'.$key."_element".$id.'1']) ? $_POST['wdform_'.$key."_element".$id.'1'] : NULL;
|
2513 |
-
if(isset($element0) || isset($element1)) {
|
2514 |
-
$new_value = $new_value . $element0 . '-' . $element1;
|
2515 |
-
}
|
2516 |
-
break;
|
2517 |
-
}
|
2518 |
-
case "type_grading": {
|
2519 |
-
$element = isset($_POST['wdform_'.$key."_hidden_item".$id]) ? $_POST['wdform_'.$key."_hidden_item".$id] : "";
|
2520 |
-
$grading = explode(":", $element);
|
2521 |
-
$items_count = sizeof($grading) - 1;
|
2522 |
-
$element = "";
|
2523 |
-
$total = "";
|
2524 |
-
for($k = 0;$k < $items_count; $k++) {
|
2525 |
-
$element .= $grading[$k] . ":" . (isset($_POST['wdform_'.$key."_element".$id.'_'.$k]) ? $_POST['wdform_'.$key."_element".$id.'_'.$k] : "") . " ";
|
2526 |
-
$total += (isset($_POST['wdform_'.$key."_element".$id.'_'.$k]) ? $_POST['wdform_'.$key."_element".$id.'_'.$k] : 0);
|
2527 |
-
}
|
2528 |
-
$element .= "Total:" . $total;
|
2529 |
-
if(isset($element)) {
|
2530 |
-
$new_value = $new_value . $element;
|
2531 |
-
}
|
2532 |
-
break;
|
2533 |
-
}
|
2534 |
-
|
2535 |
-
case "type_matrix": {
|
2536 |
-
$input_type = isset($_POST['wdform_'.$key."_input_type".$id]) ? $_POST['wdform_'.$key."_input_type".$id] : "";
|
2537 |
-
$mat_rows = explode("***", isset($_POST['wdform_'.$key."_hidden_row".$id]) ? $_POST['wdform_'.$key."_hidden_row".$id] : "");
|
2538 |
-
$rows_count = sizeof($mat_rows) - 1;
|
2539 |
-
$mat_columns = explode("***", isset($_POST['wdform_'.$key."_hidden_column".$id]) ? $_POST['wdform_'.$key."_hidden_column".$id] : "");
|
2540 |
-
$columns_count = sizeof($mat_columns) - 1;
|
2541 |
-
$matrix = "<table>";
|
2542 |
-
$matrix .= '<tr><td></td>';
|
2543 |
-
for( $k = 1; $k < count($mat_columns); $k++) {
|
2544 |
-
$matrix .='<td style="background-color:#BBBBBB; padding:5px; ">'.$mat_columns[$k].'</td>';
|
2545 |
-
}
|
2546 |
-
$matrix .= '</tr>';
|
2547 |
-
$aaa = Array();
|
2548 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
2549 |
-
$matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[$k] . '</td>';
|
2550 |
-
if($input_type == "radio") {
|
2551 |
-
$mat_radio = isset($_POST['wdform_'.$key."_input_element".$id.$k]) ? $_POST['wdform_'.$key."_input_element".$id.$k] : 0;
|
2552 |
-
if($mat_radio == 0) {
|
2553 |
-
$checked = "";
|
2554 |
-
$aaa[1] = "";
|
2555 |
-
}
|
2556 |
-
else {
|
2557 |
-
$aaa = explode("_", $mat_radio);
|
2558 |
-
}
|
2559 |
-
for($j=1; $j<=$columns_count; $j++) {
|
2560 |
-
if($aaa[1] == $j) {
|
2561 |
-
$checked = "checked";
|
2562 |
-
}
|
2563 |
-
else {
|
2564 |
-
$checked = "";
|
2565 |
-
}
|
2566 |
-
$matrix .= '<td style="text-align:center"><input type="radio" ' . $checked . ' disabled /></td>';
|
2567 |
-
}
|
2568 |
-
}
|
2569 |
-
else {
|
2570 |
-
if($input_type == "checkbox") {
|
2571 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
2572 |
-
$checked = isset($_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j] : 0;
|
2573 |
-
if($checked == 1) {
|
2574 |
-
$checked = "checked";
|
2575 |
-
}
|
2576 |
-
else {
|
2577 |
-
$checked = "";
|
2578 |
-
}
|
2579 |
-
$matrix .= '<td style="text-align:center"><input type="checkbox" ' . $checked . ' disabled /></td>';
|
2580 |
-
}
|
2581 |
-
}
|
2582 |
-
else {
|
2583 |
-
if($input_type == "text") {
|
2584 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
2585 |
-
$checked = isset($_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j] : "";
|
2586 |
-
$matrix .= '<td style="text-align:center"><input type="text" value="' . $checked . '" disabled /></td>';
|
2587 |
-
}
|
2588 |
-
}
|
2589 |
-
else{
|
2590 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
2591 |
-
$checked = isset($_POST['wdform_'.$key."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_select_yes_no".$id.$k.'_'.$j] : "";
|
2592 |
-
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
2593 |
-
}
|
2594 |
-
}
|
2595 |
-
}
|
2596 |
-
}
|
2597 |
-
$matrix .= '</tr>';
|
2598 |
-
}
|
2599 |
-
$matrix .= '</table>';
|
2600 |
-
if(isset($matrix)) {
|
2601 |
-
$new_value = $new_value . $matrix;
|
2602 |
-
}
|
2603 |
-
break;
|
2604 |
-
}
|
2605 |
-
default: break;
|
2606 |
-
}
|
2607 |
-
$new_script = str_replace("%" . $label_each . "%", $new_value, $new_script);
|
2608 |
-
}
|
2609 |
-
}
|
2610 |
-
}
|
2611 |
if(strpos($new_script, "%ip%") > -1)
|
2612 |
$new_script = str_replace("%ip%", $ip, $new_script);
|
2613 |
|
@@ -4388,6 +3779,389 @@ class FMModelForm_maker {
|
|
4388 |
exit;
|
4389 |
}
|
4390 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4391 |
|
4392 |
////////////////////////////////////////////////////////////////////////////////////////
|
4393 |
// Getters & Setters //
|
58 |
}
|
59 |
|
60 |
public function savedata($form, $id) {
|
|
|
|
|
|
|
61 |
$all_files = array();
|
62 |
$correct = FALSE;
|
63 |
$id_for_old = $id;
|
124 |
|
125 |
public function save_db($counter, $id) {
|
126 |
global $wpdb;
|
|
|
|
|
|
|
127 |
$chgnac = TRUE;
|
128 |
$all_files = array();
|
129 |
$paypal = array();
|
151 |
$label_id = array();
|
152 |
$label_label = array();
|
153 |
$label_type = array();
|
154 |
+
|
155 |
+
$disabled_fields = explode(',', (isset($_REQUEST["disabled_fields".$id]) ? $_REQUEST["disabled_fields".$id] : ""));
|
156 |
+
$disabled_fields = array_slice($disabled_fields,0, count($disabled_fields)-1);
|
157 |
+
|
158 |
if($old == false || ($old == true && $form->form=='')) {
|
159 |
$label_all = explode('#****#',$form->label_order_current);
|
160 |
}
|
177 |
continue;
|
178 |
}
|
179 |
$i = $label_id[$key];
|
180 |
+
if(!in_array($i,$disabled_fields))
|
181 |
+
{
|
182 |
+
switch ($type) {
|
183 |
+
case 'type_text':
|
184 |
+
case 'type_password':
|
185 |
+
case 'type_textarea':
|
186 |
+
case "type_submitter_mail":
|
187 |
+
case "type_date":
|
188 |
+
case "type_own_select":
|
189 |
+
case "type_country":
|
190 |
+
case "type_number": {
|
191 |
+
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
192 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
+
case "type_wdeditor": {
|
195 |
+
$value = isset($_POST['wdform_'.$i.'_wd_editor'.$id]) ? $_POST['wdform_'.$i.'_wd_editor'.$id] : "";
|
196 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
+
case "type_mark_map": {
|
199 |
+
$value = (isset($_POST['wdform_'.$i."_long".$id]) ? $_POST['wdform_'.$i."_long".$id] : "") . '***map***' . (isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "");
|
200 |
+
break;
|
201 |
}
|
202 |
+
case "type_date_fields": {
|
203 |
+
$value = (isset($_POST['wdform_'.$i."_day".$id]) ? $_POST['wdform_'.$i."_day".$id] : "") . '-' . (isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : "") . '-' . (isset($_POST['wdform_'.$i."_year".$id]) ? $_POST['wdform_'.$i."_year".$id] : "");
|
204 |
+
break;
|
205 |
+
}
|
206 |
+
case "type_time": {
|
207 |
+
$ss = isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : NULL;
|
208 |
+
if(isset($ss)) {
|
209 |
+
$value = (isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : "");
|
210 |
+
}
|
211 |
+
else {
|
212 |
+
$value = (isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
213 |
+
}
|
214 |
+
$am_pm = isset($_POST['wdform_'.$i."_am_pm".$id]) ? $_POST['wdform_'.$i."_am_pm".$id] : NULL;
|
215 |
+
if(isset($am_pm)) {
|
216 |
+
$value = $value . ' ' . $am_pm;
|
217 |
+
}
|
218 |
+
break;
|
219 |
+
}
|
220 |
+
case "type_phone": {
|
221 |
+
$value = (isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : "") . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "");
|
222 |
+
break;
|
223 |
+
}
|
224 |
+
case "type_name": {
|
225 |
+
$element_title = isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : NULL;
|
226 |
+
if(isset($element_title)) {
|
227 |
+
$value = (isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_middle".$id]) ? $_POST['wdform_'.$i."_element_middle".$id] : "");
|
228 |
+
}
|
229 |
+
else {
|
230 |
+
$value = (isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "");
|
231 |
+
}
|
232 |
+
break;
|
233 |
+
}
|
234 |
+
case "type_file_upload": {
|
235 |
+
$files = isset($_FILES['wdform_'.$i.'_file'.$id]) ? $_FILES['wdform_'.$i.'_file'.$id] : NULL;
|
236 |
+
foreach($files['name'] as $file_key => $file_name) {
|
237 |
+
if($file_name) {
|
238 |
+
$untilupload = $form->form_fields;
|
239 |
+
$untilupload = substr($untilupload, strpos($untilupload,$i.'*:*id*:*type_file_upload'), -1);
|
240 |
+
$untilupload = substr($untilupload, 0, strpos($untilupload,'*:*new_field*:'));
|
241 |
+
$untilupload = explode('*:*w_field_label_pos*:*',$untilupload);
|
242 |
+
$untilupload = $untilupload[1];
|
243 |
+
$untilupload = explode('*:*w_destination*:*',$untilupload);
|
244 |
+
$destination = $untilupload[0];
|
245 |
+
$destination = str_replace(site_url() . '/', '', $destination);
|
246 |
+
$untilupload = $untilupload[1];
|
247 |
+
$untilupload = explode('*:*w_extension*:*',$untilupload);
|
248 |
+
$extension = $untilupload[0];
|
249 |
+
$untilupload = $untilupload[1];
|
250 |
+
$untilupload = explode('*:*w_max_size*:*',$untilupload);
|
251 |
+
$max_size = $untilupload[0];
|
252 |
+
$untilupload = $untilupload[1];
|
253 |
+
$fileName = $files['name'][$file_key];
|
254 |
+
$fileSize = $files['size'][$file_key];
|
255 |
|
256 |
+
if($fileSize > $max_size * 1024) {
|
257 |
+
echo "<script> alert('" . addslashes(__('The file exceeds the allowed size of', 'form_maker')) . $max_size . " KB');</script>";
|
258 |
+
return array($max+1);
|
259 |
+
}
|
|
|
|
|
|
|
260 |
|
261 |
+
$uploadedFileNameParts = explode('.',$fileName);
|
262 |
+
$uploadedFileExtension = array_pop($uploadedFileNameParts);
|
263 |
+
$to = strlen($fileName) - strlen($uploadedFileExtension) - 1;
|
264 |
+
|
265 |
+
$fileNameFree = substr($fileName, 0, $to);
|
266 |
+
$invalidFileExts = explode(',', $extension);
|
267 |
+
$extOk = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
|
269 |
+
foreach($invalidFileExts as $key => $valuee) {
|
270 |
+
if(is_numeric(strpos(strtolower($valuee), strtolower($uploadedFileExtension)))) {
|
271 |
+
$extOk = true;
|
272 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
}
|
274 |
+
|
275 |
+
if ($extOk == false) {
|
276 |
+
echo "<script> alert('" . addslashes(__('Sorry, you are not allowed to upload this type of file.', 'form_maker')) . "');</script>";
|
277 |
+
return array($max+1);
|
278 |
+
}
|
279 |
+
|
280 |
+
$fileTemp = $files['tmp_name'][$file_key];
|
281 |
+
$p=1;
|
282 |
+
while(file_exists( $destination . "/" . $fileName)) {
|
283 |
+
$to = strlen($files['name'][$file_key]) - strlen($uploadedFileExtension) - 1;
|
284 |
+
$fileName = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
|
285 |
+
$p++;
|
286 |
+
}
|
287 |
+
if(!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
|
288 |
+
echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
|
289 |
+
return array($max+1);
|
290 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
|
292 |
+
$value.= site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
|
293 |
+
|
294 |
+
$files['tmp_name'][$file_key]=$destination . "/" . $fileName;
|
295 |
+
$temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
296 |
+
array_push($all_files,$temp_file);
|
297 |
+
}
|
298 |
+
}
|
299 |
+
break;
|
300 |
}
|
301 |
|
302 |
+
case 'type_address': {
|
303 |
+
$value = '*#*#*#';
|
304 |
+
$element = isset($_POST['wdform_'.$i."_street1".$id]) ? $_POST['wdform_'.$i."_street1".$id] : NULL;
|
305 |
+
if(isset($element)) {
|
306 |
+
$value = $element;
|
307 |
+
break;
|
308 |
+
}
|
309 |
+
|
310 |
+
$element = isset($_POST['wdform_'.$i."_street2".$id]) ? $_POST['wdform_'.$i."_street2".$id] : NULL;
|
311 |
+
if(isset($element)) {
|
312 |
+
$value = $element;
|
313 |
+
break;
|
314 |
+
}
|
315 |
+
|
316 |
+
$element = isset($_POST['wdform_'.$i."_city".$id]) ? $_POST['wdform_'.$i."_city".$id] : NULL;
|
317 |
+
if(isset($element)) {
|
318 |
+
$value = $element;
|
319 |
+
break;
|
320 |
+
}
|
321 |
+
|
322 |
+
$element = isset($_POST['wdform_'.$i."_state".$id]) ? $_POST['wdform_'.$i."_state".$id] : NULL;
|
323 |
+
if(isset($element)) {
|
324 |
+
$value = $element;
|
325 |
+
break;
|
326 |
+
}
|
327 |
+
|
328 |
+
$element = isset($_POST['wdform_'.$i."_postal".$id]) ? $_POST['wdform_'.$i."_postal".$id] : NULL;
|
329 |
+
if(isset($element)) {
|
330 |
+
$value = $element;
|
331 |
+
break;
|
332 |
+
}
|
333 |
+
|
334 |
+
$element = isset($_POST['wdform_'.$i."_country".$id]) ? $_POST['wdform_'.$i."_country".$id] : NULL;
|
335 |
+
if(isset($element)) {
|
336 |
+
$value = $element;
|
337 |
+
break;
|
338 |
+
}
|
339 |
+
break;
|
340 |
}
|
341 |
+
|
342 |
+
case "type_hidden": {
|
343 |
+
$value = isset($_POST[$label_label[$key]]) ? $_POST[$label_label[$key]] : "";
|
344 |
+
break;
|
345 |
}
|
346 |
+
|
347 |
+
case "type_radio": {
|
348 |
+
$element = isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : NULL;
|
349 |
+
if(isset($element)) {
|
350 |
+
$value = $element;
|
351 |
+
break;
|
352 |
+
}
|
353 |
+
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
354 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
}
|
356 |
+
|
357 |
+
case "type_checkbox": {
|
358 |
+
$start = -1;
|
359 |
+
$value = '';
|
360 |
+
for($j = 0; $j < 100; $j++) {
|
361 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
362 |
+
if(isset($element)) {
|
363 |
+
$start = $j;
|
364 |
+
break;
|
365 |
+
}
|
366 |
+
}
|
367 |
+
|
368 |
+
$other_element_id = -1;
|
369 |
+
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
370 |
+
if($is_other == "yes") {
|
371 |
+
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
372 |
+
}
|
373 |
+
|
374 |
+
if($start != -1) {
|
375 |
+
for($j = $start; $j < 100; $j++) {
|
376 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
377 |
+
if(isset($element)) {
|
378 |
+
if($j == $other_element_id) {
|
379 |
+
$value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '***br***';
|
380 |
+
}
|
381 |
+
else {
|
382 |
+
$value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "") . '***br***';
|
383 |
+
}
|
384 |
+
}
|
385 |
+
}
|
386 |
+
}
|
387 |
+
break;
|
388 |
}
|
389 |
+
|
390 |
+
case "type_paypal_price": {
|
391 |
+
$value = isset($_POST['wdform_'.$i."_element_dollars".$id]) ? $_POST['wdform_'.$i."_element_dollars".$id] : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
|
393 |
+
$value = (int) preg_replace('/\D/', '', $value);
|
394 |
+
|
395 |
+
if(isset($_POST['wdform_'.$i."_element_cents".$id])) {
|
396 |
+
$value = $value . '.' . ( preg_replace('/\D/', '', $_POST['wdform_'.$i."_element_cents".$id]));
|
397 |
+
}
|
398 |
+
|
399 |
+
$total += (float)($value);
|
400 |
+
$paypal_option = array();
|
|
|
|
|
|
|
401 |
|
402 |
+
if($value != 0) {
|
403 |
+
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
404 |
+
array_push ($paypal['item_name'], $label_label[$key]);
|
405 |
+
array_push ($paypal['quantity'], $quantity);
|
406 |
+
array_push ($paypal['amount'], $value);
|
407 |
+
$is_amount=true;
|
408 |
+
array_push ($paypal['on_os'], $paypal_option);
|
409 |
+
}
|
410 |
+
$value = $value . $form_currency;
|
411 |
+
break;
|
412 |
}
|
413 |
+
|
414 |
+
case "type_paypal_select": {
|
415 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id]) && $_POST['wdform_'.$i."_element".$id] !='') {
|
416 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
417 |
+
}
|
418 |
+
else {
|
419 |
+
$value = '';
|
420 |
+
}
|
421 |
+
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
422 |
+
$total += (float)(isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0) * $quantity;
|
423 |
+
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : ""));
|
424 |
+
array_push ($paypal['quantity'], $quantity);
|
425 |
+
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : ""));
|
426 |
+
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] != 0) {
|
427 |
+
$is_amount=true;
|
428 |
+
}
|
429 |
+
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
430 |
+
if(isset($element_quantity) && $value != '') {
|
431 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
432 |
+
}
|
433 |
+
$paypal_option = array();
|
434 |
+
$paypal_option['on'] = array();
|
435 |
+
$paypal_option['os'] = array();
|
436 |
+
|
437 |
+
for($k = 0; $k < 50; $k++) {
|
438 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
439 |
+
if(isset($temp_val) && $value != '') {
|
440 |
+
array_push ($paypal_option['on'], (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : ""));
|
441 |
+
array_push ($paypal_option['os'], (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : ""));
|
442 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : "") . '***property***';
|
443 |
+
}
|
444 |
+
}
|
445 |
+
array_push ($paypal['on_os'], $paypal_option);
|
446 |
+
break;
|
447 |
}
|
448 |
+
|
449 |
+
case "type_paypal_radio": {
|
450 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
451 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
452 |
+
}
|
453 |
+
else {
|
454 |
+
$value = '';
|
455 |
+
}
|
456 |
+
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
457 |
+
$total += (float)(isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0) * $quantity;
|
458 |
+
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : ""));
|
459 |
+
array_push ($paypal['quantity'], $quantity);
|
460 |
+
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0));
|
461 |
+
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] != 0) {
|
462 |
+
$is_amount=true;
|
463 |
+
}
|
464 |
+
|
465 |
+
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
466 |
+
if(isset($element_quantity) && $value != '') {
|
467 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
468 |
+
}
|
469 |
+
|
470 |
+
$paypal_option = array();
|
471 |
+
$paypal_option['on'] = array();
|
472 |
+
$paypal_option['os'] = array();
|
473 |
|
474 |
+
for($k = 0; $k < 50; $k++) {
|
475 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
476 |
+
if(isset($temp_val) && $value != '') {
|
477 |
+
array_push ($paypal_option['on'], (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : ""));
|
478 |
+
array_push ($paypal_option['os'], $_POST['wdform_'.$i."_property".$id.$k]);
|
479 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $_POST['wdform_'.$i."_property".$id.$k] . '***property***';
|
480 |
+
}
|
481 |
+
}
|
482 |
+
array_push ($paypal['on_os'], $paypal_option);
|
483 |
+
break;
|
484 |
+
}
|
485 |
+
|
486 |
+
case "type_paypal_shipping": {
|
487 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
488 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
489 |
+
}
|
490 |
+
else {
|
491 |
+
$value = '';
|
492 |
+
}
|
493 |
+
$value = (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : "") . ' - ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
494 |
+
$paypal['shipping'] = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
495 |
+
break;
|
496 |
+
}
|
497 |
+
|
498 |
+
case "type_paypal_checkbox": {
|
499 |
+
$start = -1;
|
500 |
+
$value = '';
|
501 |
+
for($j = 0; $j < 100; $j++) {
|
502 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
503 |
+
if(isset($element)) {
|
504 |
+
$start = $j;
|
505 |
+
break;
|
506 |
+
}
|
507 |
+
}
|
508 |
+
|
509 |
+
$other_element_id = -1;
|
510 |
+
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
511 |
+
if($is_other == "yes") {
|
512 |
+
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
513 |
+
}
|
514 |
+
|
515 |
+
if($start != -1) {
|
516 |
+
for($j = $start; $j < 100; $j++) {
|
517 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
518 |
+
if(isset($element)) {
|
519 |
+
if($j == $other_element_id) {
|
520 |
+
$value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '***br***';
|
521 |
}
|
522 |
+
else {
|
523 |
+
$value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "") . ' - ' . (isset($_POST['wdform_'.$i."_element".$id.$j]) && $_POST['wdform_'.$i."_element".$id.$j] == '' ? '0' : (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "")) . $form_currency . '***br***';
|
524 |
+
$quantity = ((isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && ($_POST['wdform_' . $i . "_element_quantity" . $id] >= 1)) ? $_POST['wdform_'.$i . "_element_quantity" . $id] : 1);
|
525 |
+
$total += (float)(isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : 0) * (float)($quantity);
|
526 |
+
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : ""));
|
527 |
+
array_push ($paypal['quantity'], $quantity);
|
528 |
+
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id.$j]) ? ($_POST['wdform_'.$i."_element".$id.$j] == '' ? '0' : $_POST['wdform_'.$i."_element".$id.$j]) : ""));
|
529 |
+
if (isset($_POST['wdform_'.$i."_element".$id.$j]) && $_POST['wdform_'.$i."_element".$id.$j] != 0) {
|
530 |
+
$is_amount = TRUE;
|
531 |
+
}
|
532 |
+
$paypal_option = array();
|
533 |
+
$paypal_option['on'] = array();
|
534 |
+
$paypal_option['os'] = array();
|
535 |
|
536 |
+
for($k = 0; $k < 50; $k++) {
|
537 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
538 |
+
if(isset($temp_val)) {
|
539 |
+
array_push ($paypal_option['on'], isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "");
|
540 |
+
array_push ($paypal_option['os'], $_POST['wdform_'.$i."_property".$id.$k]);
|
541 |
+
}
|
542 |
}
|
543 |
+
array_push ($paypal['on_os'], $paypal_option);
|
544 |
}
|
|
|
545 |
}
|
546 |
}
|
547 |
+
|
548 |
+
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
549 |
+
if(isset($element_quantity)) {
|
550 |
+
$value .= (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
551 |
+
}
|
552 |
+
for($k = 0; $k < 50; $k++) {
|
553 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
554 |
+
if(isset($temp_val)) {
|
555 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $_POST['wdform_'.$i."_property".$id.$k] . '***property***';
|
556 |
+
}
|
557 |
+
}
|
558 |
+
}
|
559 |
+
break;
|
560 |
+
}
|
561 |
+
|
562 |
+
case "type_star_rating": {
|
563 |
+
if(isset($_POST['wdform_'.$i."_selected_star_amount".$id]) && $_POST['wdform_'.$i."_selected_star_amount".$id] == "") {
|
564 |
+
$selected_star_amount = 0;
|
565 |
+
}
|
566 |
+
else {
|
567 |
+
$selected_star_amount = isset($_POST['wdform_'.$i."_selected_star_amount".$id]) ? $_POST['wdform_'.$i."_selected_star_amount".$id] : 0;
|
568 |
+
}
|
569 |
+
$value = $selected_star_amount . '/' . (isset($_POST['wdform_'.$i."_star_amount".$id]) ? $_POST['wdform_'.$i."_star_amount".$id] : "");
|
570 |
+
break;
|
571 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
|
573 |
+
case "type_scale_rating": {
|
574 |
+
$value = (isset($_POST['wdform_'.$i."_scale_radio".$id]) ? $_POST['wdform_'.$i."_scale_radio".$id] : 0) . '/' . (isset($_POST['wdform_'.$i."_scale_amount".$id]) ? $_POST['wdform_'.$i."_scale_amount".$id] : "");
|
575 |
+
break;
|
|
|
|
|
576 |
}
|
577 |
+
|
578 |
+
case "type_spinner": {
|
579 |
+
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
580 |
+
break;
|
581 |
+
}
|
582 |
+
|
583 |
+
case "type_slider": {
|
584 |
+
$value = isset($_POST['wdform_'.$i."_slider_value".$id]) ? $_POST['wdform_'.$i."_slider_value".$id] : "";
|
585 |
+
break;
|
586 |
+
}
|
587 |
+
|
588 |
+
case "type_range": {
|
589 |
+
$value = (isset($_POST['wdform_'.$i."_element".$id.'0']) ? $_POST['wdform_'.$i."_element".$id.'0'] : "") . '-' . (isset($_POST['wdform_'.$i."_element".$id.'1']) ? $_POST['wdform_'.$i."_element".$id.'1'] : "");
|
590 |
+
break;
|
591 |
+
}
|
592 |
+
|
593 |
+
case "type_grading": {
|
594 |
+
$value = "";
|
595 |
+
$items = explode(":", isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "");
|
596 |
+
for($k = 0; $k < sizeof($items) - 1; $k++) {
|
597 |
+
$value .= (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : "") . ':';
|
598 |
+
}
|
599 |
+
$value .= (isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "") . '***grading***';
|
600 |
+
break;
|
601 |
+
}
|
602 |
+
|
603 |
+
case "type_matrix": {
|
604 |
+
$rows_of_matrix = explode("***", isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "");
|
605 |
+
$rows_count = sizeof($rows_of_matrix) - 1;
|
606 |
+
$column_of_matrix = explode("***", isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "");
|
607 |
+
$columns_count = sizeof($column_of_matrix) - 1;
|
608 |
+
|
609 |
+
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "radio") {
|
610 |
+
$input_value = "";
|
611 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
612 |
+
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k]) ? $_POST['wdform_'.$i."_input_element".$id.$k] : 0) . "***";
|
613 |
}
|
614 |
}
|
615 |
+
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "checkbox") {
|
616 |
+
$input_value = "";
|
617 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
618 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
619 |
+
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : 0)."***";
|
620 |
+
}
|
|
|
621 |
}
|
622 |
}
|
623 |
+
|
624 |
+
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "text") {
|
625 |
+
$input_value = "";
|
626 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
627 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
628 |
+
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "") . "***";
|
629 |
+
}
|
630 |
}
|
631 |
}
|
632 |
+
|
633 |
+
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "select") {
|
634 |
+
$input_value = "";
|
635 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
636 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
637 |
+
$input_value .= (isset($_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j] : "") . "***";
|
638 |
+
}
|
639 |
+
}
|
640 |
+
}
|
641 |
+
|
642 |
+
$value = $rows_count . (isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "") . '***' . $columns_count . (isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "") . '***' . (isset($_POST['wdform_'.$i."_input_type".$id]) ? $_POST['wdform_'.$i."_input_type".$id] : "") . '***' . $input_value . '***matrix***';
|
643 |
+
break;
|
644 |
+
}
|
645 |
+
|
646 |
+
}
|
647 |
|
648 |
+
if($type == "type_address") {
|
649 |
+
if( $value == '*#*#*#') {
|
650 |
+
continue;
|
651 |
+
}
|
652 |
}
|
653 |
+
if($type == "type_text" or $type == "type_password" or $type == "type_textarea" or $type == "type_name" or $type == "type_submitter_mail" or $type == "type_number" or $type == "type_phone")
|
654 |
+
{
|
655 |
+
$untilupload = $form->form_fields;
|
656 |
+
$untilupload = substr($untilupload, strpos($untilupload, $i.'*:*id*:*'.$type), -1);
|
657 |
+
$untilupload = substr($untilupload, 0, strpos($untilupload, '*:*new_field*:'));
|
658 |
+
$untilupload = explode('*:*w_required*:*', $untilupload);
|
659 |
+
$untilupload = $untilupload[1];
|
660 |
+
$untilupload = explode('*:*w_unique*:*', $untilupload);
|
661 |
+
$unique_element = $untilupload[0];
|
662 |
+
|
663 |
+
if($unique_element == 'yes') {
|
664 |
+
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes($value)));
|
665 |
+
if ($unique) {
|
666 |
+
echo "<script> alert('" . addslashes(__('This field %s requires a unique entry and this value was already submitted.', 'form_maker')) . "'.replace('%s','" . $label_label[$key] . "'));</script>";
|
667 |
+
return array($max + 1);
|
668 |
+
}
|
669 |
+
}
|
670 |
+
}
|
671 |
+
$save_or_no = TRUE;
|
672 |
+
if ($form->savedb) {
|
673 |
+
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
674 |
+
'form_id' => $id,
|
675 |
+
'element_label' => $i,
|
676 |
+
'element_value' => stripslashes($value),
|
677 |
+
'group_id' => ($max + 1),
|
678 |
+
'date' => date('Y-m-d H:i:s'),
|
679 |
+
'ip' => $_SERVER['REMOTE_ADDR'],
|
680 |
+
), array(
|
681 |
+
'%d',
|
682 |
+
'%s',
|
683 |
+
'%s',
|
684 |
+
'%d',
|
685 |
+
'%s',
|
686 |
+
'%s'
|
687 |
+
));
|
688 |
+
}
|
689 |
+
if (!$save_or_no) {
|
690 |
+
return FALSE;
|
691 |
+
}
|
692 |
+
$chgnac = FALSE;
|
693 |
}
|
694 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
695 |
}
|
696 |
else {
|
697 |
foreach ($label_type as $key => $type) {
|
1226 |
$str .= "&cmd=" . "_cart";
|
1227 |
$str .= "¬ify_url=" . admin_url('admin-ajax.php?action=checkpaypal%26form_id=' . $id . '%26group_id=' . ($max + 1));
|
1228 |
$str .= "&upload=" . "1";
|
1229 |
+
$str .= "&charsety=UTF-8";
|
1230 |
if (isset($paypal['shipping'])) {
|
1231 |
$str = $str . "&shipping_1=" . $paypal['shipping'];
|
1232 |
// $str=$str."&weight_cart=".$paypal['shipping'];
|
1237 |
foreach ($paypal['item_name'] as $pkey => $pitem_name) {
|
1238 |
if($paypal['amount'][$pkey]) {
|
1239 |
$i++;
|
1240 |
+
$str = $str."&item_name_".$i."=".urlencode($pitem_name);
|
1241 |
$str = $str."&amount_".$i."=".$paypal['amount'][$pkey];
|
1242 |
$str = $str."&quantity_".$i."=".$paypal['quantity'][$pkey];
|
1243 |
if ($tax) {
|
1300 |
}
|
1301 |
|
1302 |
public function gen_mail($counter, $all_files, $id, $str) {
|
|
|
|
|
|
|
1303 |
global $wpdb;
|
1304 |
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id));
|
1305 |
if (!$row->form_front) {
|
1344 |
array_push($label_label, $label_order_each[0]);
|
1345 |
array_push($label_type, $label_order_each[1]);
|
1346 |
}
|
1347 |
+
|
1348 |
+
$disabled_fields = explode(',', isset($_REQUEST["disabled_fields".$id]) ? $_REQUEST["disabled_fields".$id] : "");
|
1349 |
+
$disabled_fields = array_slice($disabled_fields,0, count($disabled_fields)-1);
|
1350 |
+
|
1351 |
+
$list='<table border="1" cellpadding="3" cellspacing="0" style="width:600px;">';
|
1352 |
+
$list_text_mode = '';
|
1353 |
|
1354 |
if($old == false || ($old == true && $row->form == '')) {
|
1355 |
foreach($label_order_ids as $key => $label_order_id) {
|
1358 |
|
1359 |
if($type != "type_map" and $type != "type_submit_reset" and $type != "type_editor" and $type != "type_captcha" and $type != "type_recaptcha" and $type != "type_button") {
|
1360 |
$element_label=$label_order_original[$i];
|
1361 |
+
if(!in_array($i,$disabled_fields)) {
|
1362 |
+
switch ($type) {
|
1363 |
+
case 'type_text':
|
1364 |
+
case 'type_password':
|
1365 |
+
case 'type_textarea':
|
1366 |
+
case "type_date":
|
1367 |
+
case "type_own_select":
|
1368 |
+
case "type_country":
|
1369 |
+
case "type_number": {
|
1370 |
+
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
1371 |
+
if(isset($element)) {
|
1372 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1373 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
1374 |
+
}
|
1375 |
+
break;
|
1376 |
}
|
1377 |
+
case "type_wdeditor": {
|
1378 |
+
$element = isset($_POST['wdform_'.$i.'_wd_editor'.$id]) ? $_POST['wdform_'.$i.'_wd_editor'.$id] : NULL;
|
1379 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1380 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
1381 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
1382 |
}
|
1383 |
+
case "type_hidden": {
|
1384 |
+
$element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
|
1385 |
+
if(isset($element)) {
|
1386 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1387 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1388 |
}
|
1389 |
+
break;
|
1390 |
+
}
|
1391 |
+
case "type_mark_map": {
|
1392 |
+
$element = isset($_POST['wdform_'.$i."_long".$id]) ? $_POST['wdform_'.$i."_long".$id] : NULL;
|
1393 |
+
if(isset($element)) {
|
1394 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "") . '</td></tr>';
|
1395 |
+
$list_text_mode=$list_text_mode.$element_label.' - Longitude:'.$element.' Latitude:'.(isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "")."\r\n";
|
1396 |
}
|
1397 |
+
break;
|
1398 |
+
}
|
1399 |
+
case "type_submitter_mail": {
|
1400 |
+
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
1401 |
+
if(isset($element)) {
|
1402 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1403 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
1404 |
}
|
1405 |
+
break;
|
1406 |
+
}
|
1407 |
+
case "type_time": {
|
1408 |
+
$hh = isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : NULL;
|
1409 |
+
if(isset($hh)) {
|
1410 |
+
$ss = isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : NULL;
|
1411 |
+
if(isset($ss)) {
|
1412 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "") . ':' . $ss;
|
1413 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$hh.':'.(isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "").':'.$ss;
|
1414 |
+
}
|
1415 |
+
else {
|
1416 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
1417 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$hh.':'.(isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
1418 |
+
}
|
1419 |
+
$am_pm = isset($_POST['wdform_'.$i."_am_pm".$id]) ? $_POST['wdform_'.$i."_am_pm".$id] : NULL;
|
1420 |
+
if(isset($am_pm)) {
|
1421 |
+
$list = $list . ' ' . $am_pm . '</td></tr>';
|
1422 |
+
$list_text_mode=$list_text_mode.$am_pm."\r\n";
|
1423 |
+
}
|
1424 |
+
else {
|
1425 |
+
$list = $list.'</td></tr>';
|
1426 |
+
$list_text_mode=$list_text_mode."\r\n";
|
1427 |
+
}
|
1428 |
+
}
|
1429 |
+
break;
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
case "type_phone": {
|
1433 |
+
$element_first = isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : NULL;
|
1434 |
+
if(isset($element_first)) {
|
1435 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . '</td></tr>';
|
1436 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element_first.' '.(isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "")."\r\n";
|
1437 |
+
}
|
1438 |
+
break;
|
1439 |
+
}
|
1440 |
+
|
1441 |
+
case "type_name": {
|
1442 |
+
$element_first = isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : NULL;
|
1443 |
+
if(isset($element_first)) {
|
1444 |
+
$element_title = isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : NULL;
|
1445 |
+
if(isset($element_title)) {
|
1446 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_title . ' ' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . ' ' . (isset($_POST['wdform_'.$i."_element_middle".$id]) ? $_POST['wdform_'.$i."_element_middle".$id] : "") . '</td></tr>';
|
1447 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element_title.' '.$element_first.' '.(isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "").' '.(isset($_POST['wdform_'.$i."_element_middle".$id]) ? $_POST['wdform_'.$i."_element_middle".$id] : "")."\r\n";
|
1448 |
+
}
|
1449 |
+
else {
|
1450 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . '</td></tr>';
|
1451 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element_first.' '.(isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "")."\r\n";
|
1452 |
+
}
|
1453 |
+
}
|
1454 |
+
break;
|
1455 |
+
}
|
1456 |
+
|
1457 |
+
case "type_address": {
|
1458 |
+
$element = isset($_POST['wdform_'.$i."_street1".$id]) ? $_POST['wdform_'.$i."_street1".$id] : NULL;
|
1459 |
+
if(isset($element)) {
|
1460 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
1461 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
1462 |
+
break;
|
1463 |
}
|
1464 |
+
$element = isset($_POST['wdform_'.$i."_street2".$id]) ? $_POST['wdform_'.$i."_street2".$id] : NULL;
|
1465 |
+
if(isset($element)) {
|
1466 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
1467 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
1468 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1469 |
}
|
1470 |
+
$element = isset($_POST['wdform_'.$i."_city".$id]) ? $_POST['wdform_'.$i."_city".$id] : NULL;
|
1471 |
+
if(isset($element)) {
|
1472 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
1473 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
1474 |
+
break;
|
1475 |
}
|
1476 |
+
$element = isset($_POST['wdform_'.$i."_state".$id]) ? $_POST['wdform_'.$i."_state".$id] : NULL;
|
1477 |
+
if(isset($element)) {
|
1478 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
1479 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
1480 |
+
break;
|
1481 |
+
}
|
1482 |
+
$element = isset($_POST['wdform_'.$i."_postal".$id]) ? $_POST['wdform_'.$i."_postal".$id] : NULL;
|
1483 |
+
if(isset($element)) {
|
1484 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
1485 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
1486 |
+
break;
|
1487 |
+
}
|
1488 |
+
$element = isset($_POST['wdform_'.$i."_country".$id]) ? $_POST['wdform_'.$i."_country".$id] : NULL;
|
1489 |
+
if(isset($element)) {
|
1490 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
1491 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
1492 |
+
break;
|
1493 |
+
}
|
1494 |
+
break;
|
1495 |
+
}
|
1496 |
+
case "type_date_fields": {
|
1497 |
+
$day = isset($_POST['wdform_'.$i."_day".$id]) ? $_POST['wdform_'.$i."_day".$id] : NULL;
|
1498 |
+
if(isset($day)) {
|
1499 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $day . '-' . (isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : "") . '-' . (isset($_POST['wdform_'.$i."_year".$id]) ? $_POST['wdform_'.$i."_year".$id] : "") . '</td></tr>';
|
1500 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$day.'-'.(isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : "").'-'.(isset($_POST['wdform_'.$i."_year".$id]) ? $_POST['wdform_'.$i."_year".$id] : "")."\r\n";
|
1501 |
+
}
|
1502 |
+
break;
|
1503 |
+
}
|
1504 |
+
case "type_radio": {
|
1505 |
+
$element = isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : NULL;
|
1506 |
+
if(isset($element)) {
|
1507 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
1508 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
1509 |
+
break;
|
1510 |
+
}
|
1511 |
+
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
1512 |
+
if(isset($element)) {
|
1513 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1514 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
1515 |
+
}
|
1516 |
+
break;
|
1517 |
+
}
|
1518 |
+
case "type_checkbox": {
|
1519 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
|
1520 |
+
$list_text_mode=$list_text_mode.$element_label.' - ';
|
1521 |
+
$start = -1;
|
1522 |
+
for($j = 0; $j < 100; $j++) {
|
1523 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1524 |
+
if(isset($element)) {
|
1525 |
+
$start = $j;
|
1526 |
+
break;
|
1527 |
+
}
|
1528 |
+
}
|
1529 |
+
$other_element_id = -1;
|
1530 |
+
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
1531 |
+
if($is_other == "yes") {
|
1532 |
+
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
1533 |
+
}
|
1534 |
+
if($start != -1) {
|
1535 |
+
for($j = $start; $j < 100; $j++) {
|
1536 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1537 |
+
if(isset($element)) {
|
1538 |
+
if($j == $other_element_id) {
|
1539 |
+
$list = $list . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '<br>';
|
1540 |
+
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "").', ';
|
1541 |
+
}
|
1542 |
+
else {
|
1543 |
+
$list = $list . (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "") . '<br>';
|
1544 |
+
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "").', ';
|
1545 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1546 |
}
|
1547 |
}
|
1548 |
+
$list = $list . '</td></tr>';
|
1549 |
+
$list_text_mode=$list_text_mode."\r\n";
|
1550 |
+
}
|
1551 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1552 |
}
|
1553 |
+
case "type_paypal_price": {
|
1554 |
+
$value = 0;
|
1555 |
+
if(isset($_POST['wdform_'.$i."_element_dollars".$id])) {
|
1556 |
+
$value = $_POST['wdform_'.$i."_element_dollars".$id];
|
1557 |
+
}
|
1558 |
+
if(isset($_POST['wdform_'.$i."_element_cents".$id])) {
|
1559 |
+
$value = $value . '.' . $_POST['wdform_'.$i."_element_cents".$id];
|
1560 |
+
}
|
1561 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . $form_currency . '</td></tr>';
|
1562 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$value.$form_currency."\r\n";
|
1563 |
+
break;
|
1564 |
+
}
|
1565 |
+
|
1566 |
+
case "type_paypal_select": {
|
1567 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id]) && $_POST['wdform_'.$i."_element".$id] != '') {
|
1568 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
1569 |
+
}
|
1570 |
+
else {
|
1571 |
+
$value='';
|
1572 |
+
}
|
1573 |
+
$element_quantity_label = (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) && $_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
1574 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
1575 |
+
if($value != '' && isset($element_quantity)) {
|
1576 |
+
$value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
1577 |
+
}
|
1578 |
+
for($k = 0; $k < 50; $k++) {
|
1579 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
1580 |
+
if(isset($temp_val)) {
|
1581 |
+
$value .= '<br/>' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
1582 |
+
}
|
1583 |
+
}
|
1584 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $value . '</pre></td></tr>';
|
1585 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.str_replace('<br/>',', ',$value)."\r\n";
|
1586 |
+
break;
|
1587 |
}
|
1588 |
+
|
1589 |
+
case "type_paypal_radio": {
|
1590 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
1591 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
1592 |
+
}
|
1593 |
+
else {
|
1594 |
+
$value='';
|
1595 |
+
}
|
1596 |
+
$element_quantity_label = isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
1597 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
1598 |
+
if (isset($element_quantity)) {
|
1599 |
+
$value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
1600 |
+
}
|
1601 |
+
for($k = 0; $k < 50; $k++) {
|
1602 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
1603 |
+
if(isset($temp_val)) {
|
1604 |
+
$value .= '<br/>' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
1605 |
+
}
|
1606 |
+
}
|
1607 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $value . '</pre></td></tr>';
|
1608 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.str_replace('<br/>',', ',$value)."\r\n";
|
1609 |
+
break;
|
1610 |
}
|
1611 |
+
|
1612 |
+
case "type_paypal_shipping": {
|
1613 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
1614 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
1615 |
+
}
|
1616 |
+
else {
|
1617 |
+
$value='';
|
1618 |
+
}
|
1619 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $value . '</pre></td></tr>';
|
1620 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$value."\r\n";
|
1621 |
+
break;
|
1622 |
}
|
1623 |
+
|
1624 |
+
case "type_paypal_checkbox": {
|
1625 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
|
1626 |
+
$list_text_mode=$list_text_mode.$element_label.' - ';
|
1627 |
+
$start = -1;
|
1628 |
+
for($j = 0; $j < 100; $j++) {
|
1629 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1630 |
+
if(isset($element)) {
|
1631 |
+
$start=$j;
|
1632 |
+
break;
|
1633 |
+
}
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
if($start!=-1) {
|
1637 |
+
for($j = $start; $j < 100; $j++) {
|
1638 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1639 |
+
if(isset($element)) {
|
1640 |
+
$list = $list . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . '<br>';
|
1641 |
+
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "").' - '.($element == '' ? '0' . $form_currency : $element).$form_currency.', ';
|
1642 |
+
}
|
1643 |
+
}
|
1644 |
+
}
|
1645 |
+
$element_quantity_label = isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
1646 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
1647 |
+
if (isset($element_quantity)) {
|
1648 |
+
$list = $list . '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
1649 |
+
$list_text_mode=$list_text_mode.$element_quantity_label . ': ' . $element_quantity.', ';
|
1650 |
+
}
|
1651 |
+
for($k = 0; $k < 50; $k++) {
|
1652 |
+
$temp_val = isset($_POST['wdform_'.$i."_element_property_value".$id.$k]) ? $_POST['wdform_'.$i."_element_property_value".$id.$k] : NULL;
|
1653 |
+
if(isset($temp_val)) {
|
1654 |
+
$list = $list . '<br/>' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
1655 |
+
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val.', ';
|
1656 |
+
}
|
1657 |
+
}
|
1658 |
+
$list = $list . '</td></tr>';
|
1659 |
+
$list_text_mode=$list_text_mode."\r\n";
|
1660 |
+
break;
|
1661 |
+
}
|
1662 |
+
|
1663 |
+
case "type_paypal_total": {
|
1664 |
+
$element = isset($_POST['wdform_'.$i."_paypal_total".$id]) ? $_POST['wdform_'.$i."_paypal_total".$id] : "";
|
1665 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1666 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
1667 |
+
break;
|
1668 |
}
|
1669 |
+
case "type_star_rating": {
|
1670 |
+
$element = isset($_POST['wdform_'.$i."_star_amount".$id]) ? $_POST['wdform_'.$i."_star_amount".$id] : NULL;
|
1671 |
+
$selected = isset($_POST['wdform_'.$i."_selected_star_amount".$id]) ? $_POST['wdform_'.$i."_selected_star_amount".$id] : 0;
|
1672 |
+
if(isset($element)) {
|
1673 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $selected . '/' . $element . '</pre></td></tr>';
|
1674 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$selected.'/'.$element."\r\n";
|
1675 |
+
}
|
1676 |
+
break;
|
1677 |
}
|
1678 |
+
case "type_scale_rating": {
|
1679 |
+
$element = isset($_POST['wdform_'.$i."_scale_amount".$id]) ? $_POST['wdform_'.$i."_scale_amount".$id] : NULL;
|
1680 |
+
$selected = isset($_POST['wdform_'.$i."_scale_radio".$id]) ? $_POST['wdform_'.$i."_scale_radio".$id] : 0;
|
1681 |
+
if(isset($element)) {
|
1682 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $selected . '/' . $element . '</pre></td></tr>';
|
1683 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$selected.'/'.$element."\r\n";
|
1684 |
+
}
|
1685 |
+
break;
|
1686 |
}
|
1687 |
+
|
1688 |
+
case "type_spinner": {
|
1689 |
+
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
1690 |
+
if(isset($element)) {
|
1691 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1692 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
1693 |
+
}
|
1694 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
1695 |
}
|
1696 |
+
|
1697 |
+
case "type_slider": {
|
1698 |
+
$element = isset($_POST['wdform_'.$i."_slider_value".$id]) ? $_POST['wdform_'.$i."_slider_value".$id] : NULL;
|
1699 |
+
if(isset($element)) {
|
1700 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1701 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
1702 |
+
}
|
1703 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1704 |
}
|
1705 |
+
case "type_range": {
|
1706 |
+
$element0 = isset($_POST['wdform_'.$i."_element".$id.'0']) ? $_POST['wdform_'.$i."_element".$id.'0'] : NULL;
|
1707 |
+
$element1 = isset($_POST['wdform_'.$i."_element".$id.'1']) ? $_POST['wdform_'.$i."_element".$id.'1'] : NULL;
|
1708 |
+
if(isset($element0) || isset($element1)) {
|
1709 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">From:' . $element0 . '<span style="margin-left:6px">To</span>:' . $element1 . '</pre></td></tr>';
|
1710 |
+
$list_text_mode=$list_text_mode.$element_label.' - From:'.$element0.' To:'.$element1."\r\n";
|
1711 |
+
}
|
1712 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1713 |
}
|
1714 |
+
|
1715 |
+
case "type_grading": {
|
1716 |
+
$element = isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "";
|
1717 |
+
$grading = explode(":", $element);
|
1718 |
+
$items_count = sizeof($grading) - 1;
|
1719 |
+
$element = "";
|
1720 |
+
$total = "";
|
1721 |
+
for($k = 0;$k < $items_count; $k++) {
|
1722 |
+
$element .= $grading[$k] . ":" . (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : "") . " ";
|
1723 |
+
$total += (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : 0);
|
1724 |
+
}
|
1725 |
+
$element .= "Total:" . $total;
|
1726 |
+
if(isset($element)) {
|
1727 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
1728 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
1729 |
+
}
|
1730 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1731 |
}
|
1732 |
+
case "type_matrix": {
|
1733 |
+
$input_type = isset($_POST['wdform_'.$i."_input_type".$id]) ? $_POST['wdform_'.$i."_input_type".$id] : "";
|
1734 |
+
$mat_rows = explode("***", isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "");
|
1735 |
+
$rows_count = sizeof($mat_rows) - 1;
|
1736 |
+
$mat_columns = explode("***", isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "");
|
1737 |
+
$columns_count = sizeof($mat_columns) - 1;
|
1738 |
+
$matrix = "<table>";
|
1739 |
+
$matrix .= '<tr><td></td>';
|
1740 |
+
for($k = 1; $k < count($mat_columns); $k++) {
|
1741 |
+
$matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[$k] . '</td>';
|
1742 |
+
}
|
1743 |
+
$matrix .= '</tr>';
|
1744 |
+
$aaa = Array();
|
1745 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
1746 |
+
$matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[$k] . '</td>';
|
1747 |
+
if($input_type == "radio") {
|
1748 |
+
$mat_radio = isset($_POST['wdform_'.$i."_input_element".$id.$k]) ? $_POST['wdform_'.$i."_input_element".$id.$k] : 0;
|
1749 |
+
if($mat_radio == 0) {
|
1750 |
$checked = "";
|
1751 |
+
$aaa[1] = "";
|
1752 |
+
}
|
1753 |
+
else {
|
1754 |
+
$aaa = explode("_", $mat_radio);
|
1755 |
+
}
|
1756 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
1757 |
+
if($aaa[1] == $j) {
|
|
|
|
|
1758 |
$checked = "checked";
|
1759 |
}
|
1760 |
+
else {
|
1761 |
$checked = "";
|
1762 |
}
|
1763 |
+
$matrix .= '<td style="text-align:center"><input type="radio" ' . $checked . ' disabled /></td>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1764 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1765 |
}
|
1766 |
+
else {
|
1767 |
+
if($input_type == "checkbox") {
|
1768 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
1769 |
+
$checked = isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "";
|
1770 |
+
if($checked == 1) {
|
1771 |
+
$checked = "checked";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1772 |
}
|
1773 |
else {
|
1774 |
+
$checked = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1775 |
}
|
1776 |
+
$matrix .= '<td style="text-align:center"><input type="checkbox" ' . $checked . ' disabled /></td>';
|
1777 |
+
}
|
|
|
|
|
|
|
|
|
1778 |
}
|
1779 |
+
else {
|
1780 |
+
if($input_type == "text") {
|
1781 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
1782 |
+
$checked = isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "";
|
1783 |
+
$matrix .= '<td style="text-align:center"><input type="text" value="' . $checked . '" disabled /></td>';
|
1784 |
+
}
|
1785 |
+
}
|
1786 |
+
else {
|
1787 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
1788 |
+
$checked = isset($_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j] : "";
|
1789 |
+
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
1790 |
+
}
|
1791 |
+
}
|
1792 |
+
}
|
1793 |
+
}
|
1794 |
+
$matrix .= '</tr>';
|
1795 |
}
|
1796 |
+
$matrix .= '</table>';
|
1797 |
+
if(isset($matrix)) {
|
1798 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">' . $matrix . '</pre></td></tr>';
|
1799 |
+
}
|
1800 |
+
break;
|
1801 |
+
}
|
1802 |
+
default: break;
|
1803 |
+
}
|
1804 |
+
}
|
1805 |
+
}
|
1806 |
+
}
|
1807 |
+
|
1808 |
+
//////
|
1809 |
+
$list = $list . '</table>';
|
1810 |
+
if($row->sendemail)
|
1811 |
+
if($row->send_to) {
|
1812 |
+
$fromname = $row->mail_from_name_user;
|
1813 |
+
if($row->mail_subject_user)
|
1814 |
+
$subject = $row->mail_subject_user;
|
1815 |
+
else
|
1816 |
+
$subject = $row->title;
|
1817 |
+
if($row->reply_to_user) {
|
1818 |
+
$replyto = $row->reply_to_user;
|
1819 |
+
}
|
1820 |
+
$attachment_user = array();
|
1821 |
+
if($row->mail_attachment_user) {
|
1822 |
+
for($k=0; $k<count($all_files); $k++) {
|
1823 |
+
if(isset($all_files[$k]['tmp_name'][$k])) {
|
1824 |
+
$attachment_user[k]=$all_files[$k]['tmp_name'];
|
1825 |
+
}
|
1826 |
}
|
1827 |
+
}
|
1828 |
+
if($row->mail_mode_user) {
|
1829 |
+
$content_type = "text/html";
|
1830 |
+
$mode = 1;
|
1831 |
+
$list_user = wordwrap($list, 70, "\n", true);
|
1832 |
+
$new_script = $row->script_mail_user;
|
1833 |
+
}
|
1834 |
+
else {
|
1835 |
+
$content_type = "text/plain";
|
1836 |
+
$mode = 0;
|
1837 |
+
$list_user = wordwrap($list_text_mode, 1000, "\n", true);
|
1838 |
+
$new_script = str_replace(array('<p>','</p>'),'',$row->script_mail_user);
|
1839 |
+
}
|
1840 |
+
foreach($label_order_original as $key => $label_each) {
|
1841 |
+
$type=$label_type[$key];
|
1842 |
+
if(strpos($row->script_mail_user, "%".$label_each."%")>-1) {
|
1843 |
+
$new_value = $this->custom_fields_mail($type, $key, $id);
|
1844 |
+
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
1845 |
+
}
|
1846 |
+
if(strpos($fromname, "%".$label_each."%")>-1) {
|
1847 |
+
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id));
|
1848 |
+
if(substr($new_value, -2)==', ') {
|
1849 |
+
$new_value = substr($new_value, 0, -2);
|
1850 |
+
}
|
1851 |
+
$fromname = str_replace("%".$label_each."%", $new_value, $fromname);
|
1852 |
+
}
|
1853 |
+
if(strpos($subject, "%".$label_each."%")>-1) {
|
1854 |
+
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id));
|
1855 |
+
if(substr($new_value, -2)==', ') {
|
1856 |
+
$new_value = substr($new_value, 0, -2);
|
1857 |
+
}
|
1858 |
+
$subject = str_replace("%".$label_each."%", $new_value, $subject);
|
1859 |
+
}
|
1860 |
}
|
1861 |
+
|
1862 |
+
$recipient = '';
|
1863 |
+
$cca = $row->mail_cc_user;
|
1864 |
+
$bcc = $row->mail_bcc_user;
|
1865 |
+
$send_tos=explode('**',$row->send_to);
|
1866 |
+
if ($row->mail_from_user != '') {
|
1867 |
+
if ($fromname != '') {
|
1868 |
+
$from = "From: " . $fromname . " <" . $row->mail_from_user . ">" . "\r\n";
|
1869 |
+
}
|
1870 |
+
else {
|
1871 |
+
$from = "From: " . $row->mail_from_user . " <" . $row->mail_from_user . ">" . "\r\n";
|
1872 |
+
}
|
1873 |
+
}
|
1874 |
+
else {
|
1875 |
+
$from = '';
|
1876 |
+
}
|
1877 |
+
$headers = "MIME-Version: 1.0\n" . $from . " Content-Type: " . $content_type . "; charset=\"" . get_option('blog_charset') . "\"\n";
|
1878 |
+
if ($replyto) {
|
1879 |
+
$headers .= "Reply-To: <" . $replyto . ">\r\n";
|
1880 |
+
}
|
1881 |
+
if ($cca) {
|
1882 |
+
$headers .= "Cc: <" . $cca . ">\r\n";
|
1883 |
+
}
|
1884 |
+
if ($bcc) {
|
1885 |
+
$headers .= "Bcc: <" . $bcc . ">\r\n";
|
1886 |
+
}
|
1887 |
+
|
1888 |
if(strpos($new_script, "%ip%") > -1) {
|
1889 |
$new_script = str_replace("%ip%", $ip, $new_script);
|
1890 |
}
|
1891 |
if(strpos($new_script, "%all%") > -1) {
|
1892 |
+
$new_script = str_replace("%all%", $list_user, $new_script);
|
1893 |
}
|
1894 |
$body = $new_script;
|
|
|
1895 |
|
1896 |
$send_copy = isset($_POST["wdform_send_copy_".$id]) ? $_POST["wdform_send_copy_".$id] : NULL;
|
1897 |
|
1902 |
foreach($send_tos as $send_to) {
|
1903 |
$recipient = isset($_POST['wdform_'.str_replace('*', '', $send_to)."_element".$id]) ? $_POST['wdform_'.str_replace('*', '', $send_to)."_element".$id] : NULL;
|
1904 |
if($recipient) {
|
1905 |
+
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment_user);
|
1906 |
}
|
1907 |
}
|
1908 |
}
|
1910 |
|
1911 |
if($row->sendemail)
|
1912 |
if ($row->mail) {
|
1913 |
+
if($row->reply_to) {
|
1914 |
+
$replyto = isset($_POST['wdform_'.$row->reply_to."_element".$id]) ? $_POST['wdform_'.$row->reply_to."_element".$id] : NULL;
|
1915 |
+
if(!isset($replyto)) {
|
1916 |
+
$replyto = $row->reply_to;
|
1917 |
+
}
|
1918 |
+
}
|
1919 |
+
$recipient = $row->mail;
|
1920 |
+
if($row->mail_subject) {
|
1921 |
+
$subject = $row->mail_subject;
|
1922 |
+
}
|
1923 |
+
else {
|
1924 |
+
$subject = $row->title;
|
1925 |
+
}
|
1926 |
+
|
1927 |
+
if ($row->from_name) {
|
1928 |
+
$fromname = $row->from_name;
|
1929 |
+
}
|
1930 |
+
else {
|
1931 |
+
$fromname = $row->from_mail;
|
1932 |
+
}
|
1933 |
+
$attachment = array();
|
1934 |
+
if($row->mail_attachment) {
|
1935 |
+
for($k=0;$k<count($all_files);$k++) {
|
1936 |
+
if(isset($all_files[$k]['tmp_name'][$k]))
|
1937 |
+
$attachment[k]=$all_files[$k]['tmp_name'];
|
1938 |
+
}
|
1939 |
+
}
|
1940 |
+
|
1941 |
+
if($row->mail_mode) {
|
1942 |
+
$content_type = "text/html";
|
1943 |
+
$mode = 1;
|
1944 |
+
$list = wordwrap($list, 70, "\n", true);
|
1945 |
+
$new_script = $row->script_mail;
|
1946 |
+
}
|
1947 |
+
else {
|
1948 |
+
$content_type = "text/plain";
|
1949 |
+
$mode = 0;
|
1950 |
+
$list = $list_text_mode;
|
1951 |
+
$list = wordwrap($list, 1000, "\n", true);
|
1952 |
+
$new_script = str_replace(array('<p>','</p>'),'',$row->script_mail);
|
1953 |
+
}
|
1954 |
+
|
1955 |
+
foreach($label_order_original as $key => $label_each) {
|
1956 |
+
$type=$label_type[$key];
|
1957 |
+
if(strpos($row->script_mail, "%".$label_each."%")>-1) {
|
1958 |
+
$new_value = $this->custom_fields_mail($type, $key, $id);
|
1959 |
+
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
1960 |
+
}
|
1961 |
+
|
1962 |
+
if(strpos($fromname, "%".$label_each."%")>-1) {
|
1963 |
+
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id));
|
1964 |
+
if(substr($new_value, -2)==', ') {
|
1965 |
+
$new_value = substr($new_value, 0, -2);
|
1966 |
+
}
|
1967 |
+
$fromname = str_replace("%".$label_each."%", $new_value, $fromname);
|
1968 |
+
}
|
1969 |
+
|
1970 |
+
if(strpos($subject, "%".$label_each."%")>-1) {
|
1971 |
+
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id));
|
1972 |
+
if(substr($new_value, -2)==', ') {
|
1973 |
+
$new_value = substr($new_value, 0, -2);
|
1974 |
+
}
|
1975 |
+
$subject = str_replace("%".$label_each."%", $new_value, $subject);
|
1976 |
+
}
|
1977 |
+
}
|
1978 |
+
|
1979 |
+
if ($row->from_mail) {
|
1980 |
$from = isset($_POST['wdform_'.$row->from_mail."_element".$id]) ? $_POST['wdform_'.$row->from_mail."_element".$id] : NULL;
|
1981 |
if (!isset($from)) {
|
1982 |
$from = $row->from_mail;
|
1983 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1984 |
$from = "From: " . $fromname . " <" . $from . ">" . "\r\n";
|
1985 |
}
|
1986 |
else {
|
1987 |
$from = "";
|
1988 |
}
|
1989 |
+
$headers = "MIME-Version: 1.0\n" . $from . " Content-Type: " . $content_type . "; charset=\"" . get_option('blog_charset') . "\"\n";
|
1990 |
+
if ($replyto) {
|
1991 |
+
$headers .= "Reply-To: <" . $replyto . ">\r\n";
|
1992 |
+
}
|
1993 |
+
$cca = $row->mail_cc;
|
1994 |
+
$bcc = $row->mail_bcc;
|
1995 |
+
if ($cca) {
|
1996 |
+
$headers .= "Cc: <" . $cca . ">\r\n";
|
1997 |
+
}
|
1998 |
+
if ($bcc) {
|
1999 |
+
$headers .= "Bcc: <" . $bcc . ">\r\n";
|
2000 |
+
}
|
2001 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2002 |
if(strpos($new_script, "%ip%") > -1)
|
2003 |
$new_script = str_replace("%ip%", $ip, $new_script);
|
2004 |
|
3779 |
exit;
|
3780 |
}
|
3781 |
}
|
3782 |
+
|
3783 |
+
function custom_fields_mail($type, $key, $id)
|
3784 |
+
{
|
3785 |
+
$new_value ="";
|
3786 |
+
|
3787 |
+
$disabled_fields = explode(',', isset($_REQUEST["disabled_fields".$id]) ? $_REQUEST["disabled_fields".$id] : "");
|
3788 |
+
$disabled_fields = array_slice($disabled_fields,0, count($disabled_fields)-1);
|
3789 |
+
|
3790 |
+
if($type!="type_submit_reset" or $type!="type_map" or $type!="type_editor" or $type!="type_captcha" or $type!="type_recaptcha" or $type!="type_button") {
|
3791 |
+
switch ($type) {
|
3792 |
+
case 'type_text':
|
3793 |
+
case 'type_password':
|
3794 |
+
case 'type_textarea':
|
3795 |
+
case "type_date":
|
3796 |
+
case "type_own_select":
|
3797 |
+
case "type_country":
|
3798 |
+
case "type_number": {
|
3799 |
+
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
3800 |
+
if(isset($element)) {
|
3801 |
+
$new_value = $element;
|
3802 |
+
}
|
3803 |
+
break;
|
3804 |
+
}
|
3805 |
+
case "type_wdeditor": {
|
3806 |
+
$element = isset($_POST['wdform_'.$key.'_wd_editor'.$id]) ? $_POST['wdform_'.$key.'_wd_editor'.$id] : NULL;
|
3807 |
+
if(isset($element)) {
|
3808 |
+
$new_value = $element;
|
3809 |
+
}
|
3810 |
+
break;
|
3811 |
+
}
|
3812 |
+
case "type_hidden": {
|
3813 |
+
$element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
|
3814 |
+
if(isset($element)) {
|
3815 |
+
$new_value = $element;
|
3816 |
+
}
|
3817 |
+
break;
|
3818 |
+
}
|
3819 |
+
case "type_mark_map": {
|
3820 |
+
$element = isset($_POST['wdform_'.$key."_long".$id]) ? $_POST['wdform_'.$key."_long".$id] : NULL;
|
3821 |
+
if(isset($element)) {
|
3822 |
+
$new_value = 'Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_'.$key."_lat".$id]) ? $_POST['wdform_'.$key."_lat".$id] : "");
|
3823 |
+
}
|
3824 |
+
break;
|
3825 |
+
}
|
3826 |
+
case "type_submitter_mail": {
|
3827 |
+
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
3828 |
+
if(isset($element)) {
|
3829 |
+
$new_value = $element;
|
3830 |
+
}
|
3831 |
+
break;
|
3832 |
+
}
|
3833 |
+
case "type_time": {
|
3834 |
+
$hh = isset($_POST['wdform_'.$key."_hh".$id]) ? $_POST['wdform_'.$key."_hh".$id] : NULL;
|
3835 |
+
if(isset($hh)) {
|
3836 |
+
$ss = isset($_POST['wdform_'.$key."_ss".$id]) ? $_POST['wdform_'.$key."_ss".$id] : NULL;
|
3837 |
+
if(isset($ss)) {
|
3838 |
+
$new_value = $hh . ':' . (isset($_POST['wdform_'.$key."_mm".$id]) ? $_POST['wdform_'.$key."_mm".$id] : "") . ':' . $ss;
|
3839 |
+
}
|
3840 |
+
else {
|
3841 |
+
$new_value = $hh . ':' . (isset($_POST['wdform_'.$key."_mm".$id]) ? $_POST['wdform_'.$key."_mm".$id] : "");
|
3842 |
+
}
|
3843 |
+
$am_pm = isset($_POST['wdform_'.$key."_am_pm".$id]) ? $_POST['wdform_'.$key."_am_pm".$id] : NULL;
|
3844 |
+
if(isset($am_pm)) {
|
3845 |
+
$new_value = $new_value . ' ' . $am_pm;
|
3846 |
+
}
|
3847 |
+
}
|
3848 |
+
break;
|
3849 |
+
}
|
3850 |
+
|
3851 |
+
case "type_phone": {
|
3852 |
+
$element_first = isset($_POST['wdform_'.$key."_element_first".$id]) ? $_POST['wdform_'.$key."_element_first".$id] : NULL;
|
3853 |
+
if(isset($element_first)) {
|
3854 |
+
$new_value = $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "");
|
3855 |
+
}
|
3856 |
+
break;
|
3857 |
+
}
|
3858 |
+
case "type_name": {
|
3859 |
+
$element_first = isset($_POST['wdform_'.$key."_element_first".$id]) ? $_POST['wdform_'.$key."_element_first".$id] : NULL;
|
3860 |
+
if(isset($element_first)) {
|
3861 |
+
$element_title = isset($_POST['wdform_'.$key."_element_title".$id]) ? $_POST['wdform_'.$key."_element_title".$id] : NULL;
|
3862 |
+
if(isset($element_title)) {
|
3863 |
+
$new_value = $element_title . ' ' . $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "") . ' ' . (isset($_POST['wdform_'.$key."_element_middle".$id]) ? $_POST['wdform_'.$key."_element_middle".$id] : "");
|
3864 |
+
}
|
3865 |
+
else {
|
3866 |
+
$new_value = $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "");
|
3867 |
+
}
|
3868 |
+
}
|
3869 |
+
break;
|
3870 |
+
}
|
3871 |
+
case "type_address": {
|
3872 |
+
$street1 = isset($_POST['wdform_'.$key."_street1".$id]) ? $_POST['wdform_'.$key."_street1".$id] : NULL;
|
3873 |
+
if(isset($street1)) {
|
3874 |
+
$new_value = $street1;
|
3875 |
+
break;
|
3876 |
+
}
|
3877 |
+
$street2 = isset($_POST['wdform_'.$key."_street2".$id]) ? $_POST['wdform_'.$key."_street2".$id] : NULL;
|
3878 |
+
if(isset($street2)) {
|
3879 |
+
$new_value = $street2;
|
3880 |
+
break;
|
3881 |
+
}
|
3882 |
+
$city = isset($_POST['wdform_'.$key."_city".$id]) ? $_POST['wdform_'.$key."_city".$id] : NULL;
|
3883 |
+
if(isset($city)) {
|
3884 |
+
$new_value = $city;
|
3885 |
+
break;
|
3886 |
+
}
|
3887 |
+
$state = isset($_POST['wdform_'.$key."_state".$id]) ? $_POST['wdform_'.$key."_state".$id] : NULL;
|
3888 |
+
if(isset($state)) {
|
3889 |
+
$new_value = $state;
|
3890 |
+
break;
|
3891 |
+
}
|
3892 |
+
$postal = isset($_POST['wdform_'.$key."_postal".$id]) ? $_POST['wdform_'.$key."_postal".$id] : NULL;
|
3893 |
+
if(isset($postal)) {
|
3894 |
+
$new_value = $postal;
|
3895 |
+
break;
|
3896 |
+
}
|
3897 |
+
$country = isset($_POST['wdform_'.$key."_country".$id]) ? $_POST['wdform_'.$key."_country".$id] : NULL;
|
3898 |
+
if(isset($country)) {
|
3899 |
+
$new_value = $country;
|
3900 |
+
break;
|
3901 |
+
}
|
3902 |
+
break;
|
3903 |
+
}
|
3904 |
+
case "type_date_fields": {
|
3905 |
+
$day = isset($_POST['wdform_'.$key."_day".$id]) ? $_POST['wdform_'.$key."_day".$id] : NULL;
|
3906 |
+
if(isset($day)) {
|
3907 |
+
$new_value = $day . '-' . (isset($_POST['wdform_'.$key."_month".$id]) ? $_POST['wdform_'.$key."_month".$id] : "") . '-' . (isset($_POST['wdform_'.$key."_year".$id]) ? $_POST['wdform_'.$key."_year".$id] : "");
|
3908 |
+
}
|
3909 |
+
break;
|
3910 |
+
}
|
3911 |
+
|
3912 |
+
case "type_radio": {
|
3913 |
+
$element = isset($_POST['wdform_'.$key."_other_input".$id]) ? $_POST['wdform_'.$key."_other_input".$id] : NULL;
|
3914 |
+
if(isset($element)) {
|
3915 |
+
$new_value = $element;
|
3916 |
+
break;
|
3917 |
+
}
|
3918 |
+
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
3919 |
+
if(isset($element)) {
|
3920 |
+
$new_value = $element;
|
3921 |
+
}
|
3922 |
+
break;
|
3923 |
+
}
|
3924 |
+
case "type_checkbox": {
|
3925 |
+
$start = -1;
|
3926 |
+
for($j = 0; $j < 100; $j++) {
|
3927 |
+
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
3928 |
+
if(isset($element)) {
|
3929 |
+
$start = $j;
|
3930 |
+
break;
|
3931 |
+
}
|
3932 |
+
}
|
3933 |
+
$other_element_id = -1;
|
3934 |
+
$is_other = isset($_POST['wdform_'.$key."_allow_other".$id]) ? $_POST['wdform_'.$key."_allow_other".$id] : "";
|
3935 |
+
if($is_other == "yes") {
|
3936 |
+
$other_element_id = isset($_POST['wdform_'.$key."_allow_other_num".$id]) ? $_POST['wdform_'.$key."_allow_other_num".$id] : "";
|
3937 |
+
}
|
3938 |
+
if($start != -1) {
|
3939 |
+
for($j = $start; $j < 100; $j++) {
|
3940 |
+
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
3941 |
+
if(isset($element)) {
|
3942 |
+
if($j == $other_element_id) {
|
3943 |
+
$new_value = $new_value . (isset($_POST['wdform_'.$key."_other_input".$id]) ? $_POST['wdform_'.$key."_other_input".$id] : "") . '<br>';
|
3944 |
+
}
|
3945 |
+
else {
|
3946 |
+
$new_value = $new_value . $element . '<br>';
|
3947 |
+
}
|
3948 |
+
}
|
3949 |
+
}
|
3950 |
+
}
|
3951 |
+
break;
|
3952 |
+
}
|
3953 |
+
case "type_paypal_price": {
|
3954 |
+
$new_value = 0;
|
3955 |
+
if(isset($_POST['wdform_'.$key."_element_dollars".$id])) {
|
3956 |
+
$new_value = $_POST['wdform_'.$key."_element_dollars".$id];
|
3957 |
+
}
|
3958 |
+
if(isset($_POST['wdform_'.$key."_element_cents".$id])) {
|
3959 |
+
$new_value = $new_value . '.' . $_POST['wdform_'.$key."_element_cents".$id];
|
3960 |
+
}
|
3961 |
+
$new_value = $new_value . $form_currency;
|
3962 |
+
break;
|
3963 |
+
}
|
3964 |
+
case "type_paypal_select": {
|
3965 |
+
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ':' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
3966 |
+
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
3967 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
3968 |
+
if (isset($element_quantity)) {
|
3969 |
+
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
3970 |
+
}
|
3971 |
+
for($k = 0; $k < 50; $k++) {
|
3972 |
+
$temp_val = isset($_POST['wdform_'.$key."_property".$id.$k]) ? $_POST['wdform_'.$key."_property".$id.$k] : NULL;
|
3973 |
+
if(isset($temp_val)) {
|
3974 |
+
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
3975 |
+
}
|
3976 |
+
}
|
3977 |
+
break;
|
3978 |
+
}
|
3979 |
+
case "type_paypal_radio": {
|
3980 |
+
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ' - ' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
3981 |
+
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
3982 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
3983 |
+
if (isset($element_quantity)) {
|
3984 |
+
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
3985 |
+
}
|
3986 |
+
for($k = 0; $k < 50; $k++) {
|
3987 |
+
$temp_val = isset($_POST['wdform_'.$key."_property".$id.$k]) ? $_POST['wdform_'.$key."_property".$id.$k] : NULL;
|
3988 |
+
if(isset($temp_val)) {
|
3989 |
+
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
3990 |
+
}
|
3991 |
+
}
|
3992 |
+
break;
|
3993 |
+
}
|
3994 |
+
case "type_paypal_shipping": {
|
3995 |
+
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ' : ' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
3996 |
+
break;
|
3997 |
+
}
|
3998 |
+
case "type_paypal_checkbox": {
|
3999 |
+
$start = -1;
|
4000 |
+
for($j = 0; $j < 100; $j++) {
|
4001 |
+
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
4002 |
+
if(isset($element)) {
|
4003 |
+
$start = $j;
|
4004 |
+
break;
|
4005 |
+
}
|
4006 |
+
}
|
4007 |
+
if($start != -1) {
|
4008 |
+
for($j = $start; $j < 100; $j++) {
|
4009 |
+
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
4010 |
+
if(isset($element)) {
|
4011 |
+
$new_value = $new_value . (isset($_POST['wdform_'.$key."_element".$id.$j."_label"]) ? $_POST['wdform_'.$key."_element".$id.$j."_label"] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . '<br>';
|
4012 |
+
}
|
4013 |
+
}
|
4014 |
+
}
|
4015 |
+
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
4016 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
4017 |
+
if (isset($element_quantity)) {
|
4018 |
+
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
4019 |
+
}
|
4020 |
+
for($k = 0; $k < 50; $k++) {
|
4021 |
+
$temp_val = isset($_POST['wdform_'.$key."_property".$id.$k]) ? $_POST['wdform_'.$key."_property".$id.$k] : NULL;
|
4022 |
+
if(isset($temp_val)) {
|
4023 |
+
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
4024 |
+
}
|
4025 |
+
}
|
4026 |
+
break;
|
4027 |
+
}
|
4028 |
+
case "type_paypal_total": {
|
4029 |
+
$element = isset($_POST['wdform_'.$key."_paypal_total".$id]) ? $_POST['wdform_'.$key."_paypal_total".$id] : "";
|
4030 |
+
$new_value = $new_value . $element;
|
4031 |
+
break;
|
4032 |
+
}
|
4033 |
+
case "type_star_rating": {
|
4034 |
+
$element = isset($_POST['wdform_'.$key."_star_amount".$id]) ? $_POST['wdform_'.$key."_star_amount".$id] : NULL;
|
4035 |
+
$selected = isset($_POST['wdform_'.$key."_selected_star_amount".$id]) ? $_POST['wdform_'.$key."_selected_star_amount".$id] : 0;
|
4036 |
+
if(isset($element)) {
|
4037 |
+
$new_value = $new_value . $selected . '/' . $element;
|
4038 |
+
}
|
4039 |
+
break;
|
4040 |
+
}
|
4041 |
+
case "type_scale_rating": {
|
4042 |
+
$element = isset($_POST['wdform_'.$key."_scale_amount".$id]) ? $_POST['wdform_'.$key."_scale_amount".$id] : NULL;
|
4043 |
+
$selected = isset($_POST['wdform_'.$key."_scale_radio".$id]) ? $_POST['wdform_'.$key."_scale_radio".$id] : 0;
|
4044 |
+
if(isset($element)) {
|
4045 |
+
$new_value = $new_value . $selected . '/' . $element;
|
4046 |
+
}
|
4047 |
+
break;
|
4048 |
+
}
|
4049 |
+
case "type_spinner": {
|
4050 |
+
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
4051 |
+
if(isset($element)) {
|
4052 |
+
$new_value = $new_value . $element;
|
4053 |
+
}
|
4054 |
+
break;
|
4055 |
+
}
|
4056 |
+
case "type_slider": {
|
4057 |
+
$element = isset($_POST['wdform_'.$key."_slider_value".$id]) ? $_POST['wdform_'.$key."_slider_value".$id] : NULL;
|
4058 |
+
if(isset($element)) {
|
4059 |
+
$new_value = $new_value . $element;
|
4060 |
+
}
|
4061 |
+
break;
|
4062 |
+
}
|
4063 |
+
case "type_range": {
|
4064 |
+
$element0 = isset($_POST['wdform_'.$key."_element".$id.'0']) ? $_POST['wdform_'.$key."_element".$id.'0'] : NULL;
|
4065 |
+
$element1 = isset($_POST['wdform_'.$key."_element".$id.'1']) ? $_POST['wdform_'.$key."_element".$id.'1'] : NULL;
|
4066 |
+
if(isset($element0) || isset($element1)) {
|
4067 |
+
$new_value = $new_value . $element0 . '-' . $element1;
|
4068 |
+
}
|
4069 |
+
break;
|
4070 |
+
}
|
4071 |
+
case "type_grading": {
|
4072 |
+
$element = isset($_POST['wdform_'.$key."_hidden_item".$id]) ? $_POST['wdform_'.$key."_hidden_item".$id] : "";
|
4073 |
+
$grading = explode(":", $element);
|
4074 |
+
$items_count = sizeof($grading) - 1;
|
4075 |
+
$element = "";
|
4076 |
+
$total = "";
|
4077 |
+
for($k = 0;$k < $items_count; $k++) {
|
4078 |
+
$element .= $grading[$k] . ":" . (isset($_POST['wdform_'.$key."_element".$id.'_'.$k]) ? $_POST['wdform_'.$key."_element".$id.'_'.$k] : "") . " ";
|
4079 |
+
$total += (isset($_POST['wdform_'.$key."_element".$id.'_'.$k]) ? $_POST['wdform_'.$key."_element".$id.'_'.$k] : 0);
|
4080 |
+
}
|
4081 |
+
$element .="Total:" . $total;
|
4082 |
+
if(isset($element)) {
|
4083 |
+
$new_value = $new_value . $element;
|
4084 |
+
}
|
4085 |
+
break;
|
4086 |
+
}
|
4087 |
+
case "type_matrix": {
|
4088 |
+
$input_type = isset($_POST['wdform_'.$key."_input_type".$id]) ? $_POST['wdform_'.$key."_input_type".$id] : "";
|
4089 |
+
$mat_rows = explode("***", isset($_POST['wdform_'.$key."_hidden_row".$id]) ? $_POST['wdform_'.$key."_hidden_row".$id] : "");
|
4090 |
+
$rows_count = sizeof($mat_rows) - 1;
|
4091 |
+
$mat_columns = explode("***", isset($_POST['wdform_'.$key."_hidden_column".$id]) ? $_POST['wdform_'.$key."_hidden_column".$id] : "");
|
4092 |
+
$columns_count = sizeof($mat_columns) - 1;
|
4093 |
+
$matrix="<table>";
|
4094 |
+
$matrix .='<tr><td></td>';
|
4095 |
+
for( $k=1;$k< count($mat_columns) ;$k++) {
|
4096 |
+
$matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[$k] . '</td>';
|
4097 |
+
}
|
4098 |
+
$matrix .= '</tr>';
|
4099 |
+
$aaa=Array();
|
4100 |
+
for($k=1; $k<=$rows_count; $k++) {
|
4101 |
+
$matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[$k] . '</td>';
|
4102 |
+
if($input_type=="radio") {
|
4103 |
+
$mat_radio = isset($_POST['wdform_'.$key."_input_element".$id.$k]) ? $_POST['wdform_'.$key."_input_element".$id.$k] : 0;
|
4104 |
+
if($mat_radio == 0) {
|
4105 |
+
$checked = "";
|
4106 |
+
$aaa[1] = "";
|
4107 |
+
}
|
4108 |
+
else {
|
4109 |
+
$aaa = explode("_", $mat_radio);
|
4110 |
+
}
|
4111 |
+
|
4112 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
4113 |
+
if($aaa[1]==$j) {
|
4114 |
+
$checked="checked";
|
4115 |
+
}
|
4116 |
+
else {
|
4117 |
+
$checked="";
|
4118 |
+
}
|
4119 |
+
$matrix .= '<td style="text-align:center"><input type="radio" ' . $checked . ' disabled /></td>';
|
4120 |
+
}
|
4121 |
+
}
|
4122 |
+
else {
|
4123 |
+
if($input_type == "checkbox") {
|
4124 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
4125 |
+
$checked = isset($_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j] : 0;
|
4126 |
+
if($checked==1) {
|
4127 |
+
$checked = "checked";
|
4128 |
+
}
|
4129 |
+
else {
|
4130 |
+
$checked = "";
|
4131 |
+
}
|
4132 |
+
$matrix .= '<td style="text-align:center"><input type="checkbox" ' . $checked . ' disabled /></td>';
|
4133 |
+
}
|
4134 |
+
}
|
4135 |
+
else {
|
4136 |
+
if($input_type == "text") {
|
4137 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
4138 |
+
$checked = isset($_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j] : "";
|
4139 |
+
$matrix .= '<td style="text-align:center"><input type="text" value="' . $checked . '" disabled /></td>';
|
4140 |
+
}
|
4141 |
+
}
|
4142 |
+
else {
|
4143 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
4144 |
+
$checked = isset($_POST['wdform_'.$key."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_select_yes_no".$id.$k.'_'.$j] : "";
|
4145 |
+
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
4146 |
+
}
|
4147 |
+
}
|
4148 |
+
}
|
4149 |
+
}
|
4150 |
+
$matrix .= '</tr>';
|
4151 |
+
}
|
4152 |
+
$matrix .= '</table>';
|
4153 |
+
if(isset($matrix)) {
|
4154 |
+
$new_value = $new_value . $matrix;
|
4155 |
+
}
|
4156 |
+
break;
|
4157 |
+
}
|
4158 |
+
default: break;
|
4159 |
+
}
|
4160 |
+
// $new_script = str_replace("%" . $label_each . "%", $new_value, $new_script);
|
4161 |
+
}
|
4162 |
+
|
4163 |
+
return $new_value;
|
4164 |
+
}
|
4165 |
|
4166 |
////////////////////////////////////////////////////////////////////////////////////////
|
4167 |
// Getters & Setters //
|
frontend/views/FMViewForm_maker.php
CHANGED
@@ -23,9 +23,6 @@ class FMViewForm_maker {
|
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display($id) {
|
26 |
-
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
27 |
-
@session_start();
|
28 |
-
}
|
29 |
$form_maker_front_end = "";
|
30 |
$result = $this->model->showform($id);
|
31 |
if (!$result) {
|
@@ -147,6 +144,412 @@ class FMViewForm_maker {
|
|
147 |
array_push($paramss, $temp[1]);
|
148 |
}
|
149 |
$form_id = $id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
if ($row->autogen_layout == 0) {
|
151 |
$form=$row->custom_front;
|
152 |
}
|
@@ -227,7 +630,7 @@ class FMViewForm_maker {
|
|
227 |
jQuery("<input type=\"hidden\" name=\"wdform_send_copy_'.$form_id.'\" value = \"1\" />").appendTo("#form'.$form_id.'");';
|
228 |
if($required) {
|
229 |
$check_js.='
|
230 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
231 |
{
|
232 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
233 |
{
|
@@ -274,7 +677,7 @@ class FMViewForm_maker {
|
|
274 |
|
275 |
if($required) {
|
276 |
$check_js.='
|
277 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
278 |
{
|
279 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="'.$param['w_title'].'" || jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
280 |
{
|
@@ -324,7 +727,7 @@ class FMViewForm_maker {
|
|
324 |
|
325 |
if($required) {
|
326 |
$check_js.='
|
327 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
328 |
{
|
329 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="'.$param['w_title'].'" || jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
330 |
{
|
@@ -371,7 +774,7 @@ class FMViewForm_maker {
|
|
371 |
|
372 |
if($required) {
|
373 |
$check_js.='
|
374 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
375 |
{
|
376 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
377 |
{
|
@@ -420,7 +823,7 @@ class FMViewForm_maker {
|
|
420 |
|
421 |
if($required) {
|
422 |
$check_js.='
|
423 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
424 |
{
|
425 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="'.$param['w_title'].'" || jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
426 |
{
|
@@ -475,7 +878,7 @@ class FMViewForm_maker {
|
|
475 |
$rep.= $wd_editor.'</div></div>';
|
476 |
if($required) {
|
477 |
$check_js.='
|
478 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
479 |
{
|
480 |
if(tinyMCE.get("wdform_'.$id1.'_wd_editor'.$form_id.'").getContent()=="")
|
481 |
{
|
@@ -547,7 +950,7 @@ class FMViewForm_maker {
|
|
547 |
|
548 |
if($required) {
|
549 |
$check_js.='
|
550 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
551 |
{
|
552 |
if(jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="'.$w_title[1].'" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="")
|
553 |
{
|
@@ -652,7 +1055,7 @@ class FMViewForm_maker {
|
|
652 |
if($required) {
|
653 |
if($param['w_name_format']=='normal') {
|
654 |
$check_js.='
|
655 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
656 |
{
|
657 |
if(jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="'.$w_title[1].'" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="")
|
658 |
{
|
@@ -667,7 +1070,7 @@ class FMViewForm_maker {
|
|
667 |
}
|
668 |
else {
|
669 |
$check_js.='
|
670 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
671 |
{
|
672 |
if(jQuery("#wdform_'.$id1.'_element_title'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_title'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="'.$w_title[1].'" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="'.$w_title[2].'" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_middle'.$form_id.'").val()=="'.$w_title[3].'" || jQuery("#wdform_'.$id1.'_element_middle'.$form_id.'").val()=="")
|
673 |
{
|
@@ -769,7 +1172,7 @@ class FMViewForm_maker {
|
|
769 |
|
770 |
if ($required) {
|
771 |
$check_js.='
|
772 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
773 |
{
|
774 |
if(jQuery("#wdform_'.$id1.'_street1'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_street2'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_city'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_state'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_postal'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_country'.$form_id.'").val()=="")
|
775 |
{
|
@@ -796,7 +1199,7 @@ class FMViewForm_maker {
|
|
796 |
}
|
797 |
else
|
798 |
{
|
799 |
-
if(jQuery("#wdform_'.$id1.'_state'.$form_id.'").
|
800 |
{
|
801 |
|
802 |
jQuery("#wdform_'.$id1.'_state'.$form_id.'").parent().append("<input type=\"text\" id=\"wdform_'.$id1.'_state'.$form_id.'\" name=\"wdform_'.($id1+3).'_state'.$form_id.'\" value=\"'.(isset($_POST['wdform_'.($id1+3).'_state'.$form_id]) ? $_POST['wdform_'.($id1+3).'_state'.$form_id] : "").'\" style=\"width: 100%;\" '.$param['attributes'].'><label class=\"mini_label\">'.$w_mini_labels[3].'</label>");
|
@@ -841,7 +1244,7 @@ class FMViewForm_maker {
|
|
841 |
|
842 |
if($required) {
|
843 |
$check_js.='
|
844 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
845 |
{
|
846 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="'.$param['w_title'].'" || jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
847 |
{
|
@@ -857,7 +1260,7 @@ class FMViewForm_maker {
|
|
857 |
';
|
858 |
}
|
859 |
$check_js.='
|
860 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
861 |
{
|
862 |
|
863 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()!="" && jQuery("#wdform_'.$id1.'_element'.$form_id.'").val().search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1 )
|
@@ -930,7 +1333,7 @@ class FMViewForm_maker {
|
|
930 |
$param['w_choices_checked'][$key]=($param['w_choices_checked'][$key]=='true' ? 'checked="checked"' : '');
|
931 |
}
|
932 |
else {
|
933 |
-
$post_valuetemp = isset($_POST['wdform_'.$id1."_element".$form_id.$key]) ? $_POST['wdform_'.$id1."_element".$form_id.$key] :
|
934 |
$param['w_choices_checked'][$key]=(isset($post_valuetemp) ? 'checked="checked"' : '');
|
935 |
}
|
936 |
|
@@ -942,7 +1345,7 @@ class FMViewForm_maker {
|
|
942 |
|
943 |
if($required) {
|
944 |
$check_js.='
|
945 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
946 |
{
|
947 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0 || jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val() == "")
|
948 |
{
|
@@ -1030,7 +1433,7 @@ class FMViewForm_maker {
|
|
1030 |
|
1031 |
if($required) {
|
1032 |
$check_js.='
|
1033 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1034 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0 || jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val() == "") {
|
1035 |
alert("' .$label. ' ' . addslashes(__('field is required.', 'form_maker')) . '");
|
1036 |
old_bg=x.find(jQuery("div[wdid='.$id1.']")).css("background-color");
|
@@ -1101,7 +1504,7 @@ class FMViewForm_maker {
|
|
1101 |
|
1102 |
if($required) {
|
1103 |
$check_js.='
|
1104 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1105 |
{
|
1106 |
if( jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
1107 |
{
|
@@ -1160,9 +1563,9 @@ class FMViewForm_maker {
|
|
1160 |
|
1161 |
if($required) {
|
1162 |
$check_js.='
|
1163 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1164 |
{
|
1165 |
-
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="
|
1166 |
{
|
1167 |
alert("' .$label. ' ' . addslashes(__('field is required.', 'form_maker')) . '");
|
1168 |
jQuery("#wdform_'.$id1.'_element'.$form_id.'").addClass( "form-error" );
|
@@ -1236,7 +1639,7 @@ class FMViewForm_maker {
|
|
1236 |
|
1237 |
if($required) {
|
1238 |
$check_js.='
|
1239 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1240 |
{
|
1241 |
if(jQuery("#wdform_'.$id1.'_mm'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_hh'.$form_id.'").val()=="" || (jQuery("#wdform_'.$id1.'_ss'.$form_id.'").length != 0 ? jQuery("#wdform_'.$id1.'_ss'.$form_id.'").val()=="" : false))
|
1242 |
{
|
@@ -1283,7 +1686,7 @@ class FMViewForm_maker {
|
|
1283 |
|
1284 |
if($required) {
|
1285 |
$check_js.='
|
1286 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1287 |
{
|
1288 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
1289 |
{
|
@@ -1391,7 +1794,7 @@ class FMViewForm_maker {
|
|
1391 |
|
1392 |
if($required) {
|
1393 |
$check_js.='
|
1394 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1395 |
{
|
1396 |
if(jQuery("#wdform_'.$id1.'_day'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_month'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_year'.$form_id.'").val()=="")
|
1397 |
{
|
@@ -1439,7 +1842,7 @@ class FMViewForm_maker {
|
|
1439 |
|
1440 |
if($required) {
|
1441 |
$check_js.='
|
1442 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1443 |
{
|
1444 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
1445 |
{
|
@@ -1453,7 +1856,7 @@ class FMViewForm_maker {
|
|
1453 |
';
|
1454 |
}
|
1455 |
$check_js.='
|
1456 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1457 |
{
|
1458 |
ext_available=getfileextension(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val(),"'.$param['w_extension'].'");
|
1459 |
if(!ext_available)
|
@@ -1494,7 +1897,7 @@ class FMViewForm_maker {
|
|
1494 |
$onload_js .='jQuery("#_element_refresh'.$form_id.'").click(function() {captcha_refresh("wd_captcha","'.$form_id.'")});';
|
1495 |
|
1496 |
$check_js.='
|
1497 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1498 |
{
|
1499 |
if(jQuery("#wd_captcha_input'.$form_id.'").val()=="")
|
1500 |
{
|
@@ -1662,7 +2065,7 @@ class FMViewForm_maker {
|
|
1662 |
|
1663 |
if($required) {
|
1664 |
$check_js.='
|
1665 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1666 |
{
|
1667 |
if(jQuery("#wdform_'.$id1.'_element_dollars'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_dollars'.$form_id.'").val()=="")
|
1668 |
{
|
@@ -1676,7 +2079,7 @@ class FMViewForm_maker {
|
|
1676 |
';
|
1677 |
}
|
1678 |
$check_js.='
|
1679 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1680 |
{
|
1681 |
dollars=0;
|
1682 |
cents=0;
|
@@ -1808,9 +2211,9 @@ class FMViewForm_maker {
|
|
1808 |
|
1809 |
if($required) {
|
1810 |
$check_js.='
|
1811 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1812 |
{
|
1813 |
-
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="
|
1814 |
{
|
1815 |
alert("' .$label. ' ' . addslashes(__('field is required.', 'form_maker')) . '");
|
1816 |
jQuery("#wdform_'.$id1.'_element'.$form_id.'").addClass( "form-error" );
|
@@ -1829,9 +2232,13 @@ class FMViewForm_maker {
|
|
1829 |
$onsubmit_js.='
|
1830 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("'.(__("Quantity", 'form_maker')).'").appendTo("#form'.$form_id.'");
|
1831 |
';
|
1832 |
-
$
|
1833 |
-
|
1834 |
-
'
|
|
|
|
|
|
|
|
|
1835 |
break;
|
1836 |
}
|
1837 |
|
@@ -1871,7 +2278,7 @@ class FMViewForm_maker {
|
|
1871 |
$post_value = isset($_POST["counter".$form_id]) ? $_POST["counter".$form_id] : NULL;
|
1872 |
if(isset($post_value)) {
|
1873 |
$param['w_choices_checked'][$key]="";
|
1874 |
-
$post_value = isset($_POST['wdform_'.$id1."_element".$form_id.$key]) ? $_POST['wdform_'.$id1."_element".$form_id.$key] :
|
1875 |
if(isset($post_value)) {
|
1876 |
$param['w_choices_checked'][$key]='checked="checked"';
|
1877 |
}
|
@@ -1901,7 +2308,7 @@ class FMViewForm_maker {
|
|
1901 |
$rep.='</div></div></div>';
|
1902 |
if($required) {
|
1903 |
$check_js.='
|
1904 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1905 |
{
|
1906 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
1907 |
{
|
@@ -1915,14 +2322,17 @@ class FMViewForm_maker {
|
|
1915 |
';
|
1916 |
}
|
1917 |
$onsubmit_js.='
|
1918 |
-
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val((x.find(jQuery("div[wdid='.$id1.'] input:checked")).length != 0) ? jQuery("#"+x.find(jQuery("div[wdid='.$id1.'] input:checked")).
|
1919 |
';
|
1920 |
$onsubmit_js.='
|
1921 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("'.(__("Quantity", 'form_maker')).'").appendTo("#form'.$form_id.'");
|
1922 |
';
|
1923 |
-
$
|
1924 |
-
|
1925 |
-
'
|
|
|
|
|
|
|
1926 |
break;
|
1927 |
}
|
1928 |
|
@@ -1993,7 +2403,7 @@ class FMViewForm_maker {
|
|
1993 |
|
1994 |
if($required) {
|
1995 |
$check_js.='
|
1996 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
1997 |
{
|
1998 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
1999 |
{
|
@@ -2008,16 +2418,19 @@ class FMViewForm_maker {
|
|
2008 |
}
|
2009 |
$onsubmit_js.='
|
2010 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(
|
2011 |
-
jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$id1.'_element'.$form_id.'\']:checked").
|
2012 |
).appendTo("#form'.$form_id.'");
|
2013 |
|
2014 |
';
|
2015 |
$onsubmit_js.='
|
2016 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("'.(__("Quantity", 'form_maker')).'").appendTo("#form'.$form_id.'");
|
2017 |
';
|
2018 |
-
$
|
2019 |
-
|
2020 |
-
'
|
|
|
|
|
|
|
2021 |
break;
|
2022 |
}
|
2023 |
|
@@ -2065,7 +2478,7 @@ class FMViewForm_maker {
|
|
2065 |
$rep.='</div></div>';
|
2066 |
if($required) {
|
2067 |
$check_js.='
|
2068 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2069 |
{
|
2070 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
2071 |
{
|
@@ -2080,7 +2493,7 @@ class FMViewForm_maker {
|
|
2080 |
}
|
2081 |
$onsubmit_js.='
|
2082 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(
|
2083 |
-
jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$id1.'_element'.$form_id.'\']:checked").
|
2084 |
).appendTo("#form'.$form_id.'");
|
2085 |
';
|
2086 |
break;
|
@@ -2166,7 +2579,7 @@ class FMViewForm_maker {
|
|
2166 |
|
2167 |
if($required) {
|
2168 |
$check_js.='
|
2169 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2170 |
{
|
2171 |
if(jQuery("#wdform_'.$id1.'_selected_star_amount'.$form_id.'").val()=="")
|
2172 |
{
|
@@ -2225,7 +2638,7 @@ class FMViewForm_maker {
|
|
2225 |
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" style="float: left;" '.$param['attributes'].'><label class="mini_label">'.$w_mini_labels[0].'</label><div style="display: inline-table; vertical-align: middle;border-spacing: 7px;"><div style="display: table-row;">'.$numbers.'</div><div style="display: table-row;">'.$radio_buttons.'</div></div><label class="mini_label" >'.$w_mini_labels[1].'</label></div></div></div>';
|
2226 |
if($required) {
|
2227 |
$check_js.='
|
2228 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2229 |
{
|
2230 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
2231 |
{
|
@@ -2270,17 +2683,17 @@ class FMViewForm_maker {
|
|
2270 |
}
|
2271 |
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].'"><input type="text" value="'.($param['w_field_value']!= 'null' ? $param['w_field_value'] : '').'" name="wdform_'.$id1.'_element'.$form_id.'" id="wdform_'.$id1.'_element'.$form_id.'" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].'></div></div>';
|
2272 |
$onload_js .='
|
2273 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'")[0].spin = null;
|
2274 |
-
spinner = jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner();
|
2275 |
spinner.spinner( "value", "'.($param['w_field_value']!= 'null' ? $param['w_field_value'] : '').'");
|
2276 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ min: "'.$param['w_field_min_value'].'"});
|
2277 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ max: "'.$param['w_field_max_value'].'"});
|
2278 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ step: "'.$param['w_field_step'].'"});
|
2279 |
';
|
2280 |
|
2281 |
if($required) {
|
2282 |
$check_js.='
|
2283 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2284 |
{
|
2285 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
2286 |
{
|
@@ -2340,7 +2753,7 @@ class FMViewForm_maker {
|
|
2340 |
';
|
2341 |
if($required) {
|
2342 |
$check_js.='
|
2343 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2344 |
{
|
2345 |
if(jQuery("#wdform_'.$id1.'_slider_value'.$form_id.'").val()=='.$param['w_field_min_value'].')
|
2346 |
{
|
@@ -2383,21 +2796,21 @@ class FMViewForm_maker {
|
|
2383 |
}
|
2384 |
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].'"><div style="display: table;"><div style="display: table-row;"><div valign="middle" align="left" style="display: table-cell;"><input type="text" value="'.($param['w_field_value1']!= 'null' ? $param['w_field_value1'] : '').'" name="wdform_'.$id1.'_element'.$form_id.'0" id="wdform_'.$id1.'_element'.$form_id.'0" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].'></div><div valign="middle" align="left" style="display: table-cell; padding-left: 4px;"><input type="text" value="'.($param['w_field_value2']!= 'null' ? $param['w_field_value2'] : '').'" name="wdform_'.$id1.'_element'.$form_id.'1" id="wdform_'.$id1.'_element'.$form_id.'1" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].'></div></div><div style="display: table-row;"><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="wdform_'.$id1.'_mini_label_from">'.$w_mini_labels[0].'</label></div><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="wdform_'.$id1.'_mini_label_to">'.$w_mini_labels[1].'</label></div></div></div></div></div>';
|
2385 |
$onload_js .='
|
2386 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'0")[0].spin = null;
|
2387 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'1")[0].spin = null;
|
2388 |
|
2389 |
-
spinner0 = jQuery("#wdform_'.$id1.'_element'.$form_id.'0").spinner();
|
2390 |
spinner0.spinner( "value", "'.($param['w_field_value1']!= 'null' ? $param['w_field_value1'] : '').'");
|
2391 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ step: '.$param['w_field_range_step'].'});
|
2392 |
|
2393 |
-
spinner1 = jQuery("#wdform_'.$id1.'_element'.$form_id.'1").spinner();
|
2394 |
spinner1.spinner( "value", "'.($param['w_field_value2']!= 'null' ? $param['w_field_value2'] : '').'");
|
2395 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ step: '.$param['w_field_range_step'].'});
|
2396 |
';
|
2397 |
|
2398 |
if($required) {
|
2399 |
$check_js.='
|
2400 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2401 |
{
|
2402 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'0").val()=="" || jQuery("#wdform_'.$id1.'_element'.$form_id.'1").val()=="")
|
2403 |
{
|
@@ -2457,7 +2870,7 @@ class FMViewForm_maker {
|
|
2457 |
sum_grading_values("wdform_'.$id1.'",'.$form_id.');';
|
2458 |
if($required) {
|
2459 |
$check_js.='
|
2460 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2461 |
{
|
2462 |
if('.$required_check.')
|
2463 |
{
|
@@ -2471,7 +2884,7 @@ class FMViewForm_maker {
|
|
2471 |
';
|
2472 |
}
|
2473 |
$check_js.='
|
2474 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2475 |
{
|
2476 |
if(parseInt(jQuery("#wdform_'.$id1.'_sum_element'.$form_id.'").html()) > '.$param['w_total'].')
|
2477 |
{
|
@@ -2561,7 +2974,7 @@ class FMViewForm_maker {
|
|
2561 |
if($required) {
|
2562 |
if($param['w_field_input_type']=='radio') {
|
2563 |
$check_js.='
|
2564 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2565 |
{
|
2566 |
var radio_checked=true;
|
2567 |
for(var k=1; k<'.count($w_rows).';k++)
|
@@ -2585,7 +2998,7 @@ class FMViewForm_maker {
|
|
2585 |
}
|
2586 |
if($param['w_field_input_type']=='checkbox') {
|
2587 |
$check_js.='
|
2588 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2589 |
{
|
2590 |
if(x.find(jQuery("div[wdid='.$id1.']")).find(jQuery("input[type=\'checkbox\']:checked")).length == 0)
|
2591 |
{
|
@@ -2600,7 +3013,7 @@ class FMViewForm_maker {
|
|
2600 |
}
|
2601 |
if($param['w_field_input_type']=='text') {
|
2602 |
$check_js.='
|
2603 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2604 |
{
|
2605 |
if(x.find(jQuery("div[wdid='.$id1.']")).find(jQuery("input[type=\'text\']")).filter(function() {return this.value.length !== 0;}).length == 0)
|
2606 |
{
|
@@ -2615,7 +3028,7 @@ class FMViewForm_maker {
|
|
2615 |
|
2616 |
if($param['w_field_input_type']=='select') {
|
2617 |
$check_js.='
|
2618 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0)
|
2619 |
{
|
2620 |
if(x.find(jQuery("div[wdid='.$id1.']")).find(jQuery("select")).filter(function() {return this.value.length !== 0;}).length == 0)
|
2621 |
{
|
@@ -2658,6 +3071,21 @@ class FMViewForm_maker {
|
|
2658 |
$form=str_replace('%'.$id1.' - '.$labels[$id1s_key].'%', $rep, $form);
|
2659 |
}
|
2660 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2661 |
$rep1=array('form_id_temp');
|
2662 |
$rep2=array($id);
|
2663 |
|
@@ -2695,6 +3123,17 @@ class FMViewForm_maker {
|
|
2695 |
jQuery("div[type='type_time'] input").blur(function() {add_0(this)});
|
2696 |
|
2697 |
jQuery('.wdform-element-section').each(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2698 |
if (!jQuery(this).parent()[0].style.width && parseInt(jQuery(this).width()) != 0) {
|
2699 |
if (jQuery(this).css('display') == "table-cell") {
|
2700 |
if (jQuery(this).parent().attr('type') != "type_captcha") {
|
@@ -2718,6 +3157,7 @@ class FMViewForm_maker {
|
|
2718 |
});
|
2719 |
|
2720 |
<?php echo $onload_js; ?>
|
|
|
2721 |
|
2722 |
if(window.before_load)
|
2723 |
{
|
@@ -2961,7 +3401,7 @@ class FMViewForm_maker {
|
|
2961 |
if (document.getElementById(\'' . $label_id[$key] . '_step' . $id . '\'))
|
2962 |
var spinner_step = document.getElementById(\'' . $label_id[$key] . '_step' . $id . '\').value;
|
2963 |
jQuery( \'' . $label_id[$key] . '_element' . $id . '\' ).removeClass( \'ui-spinner-input\')
|
2964 |
-
.
|
2965 |
.removeAttr( \'autocomplete\' )
|
2966 |
.removeAttr( \'role\' )
|
2967 |
.removeAttr( \'aria-valuemin\' )
|
@@ -3018,7 +3458,7 @@ class FMViewForm_maker {
|
|
3018 |
if (document.getElementById(\'' . $label_id[$key] . '_range_step' . $id . '\'))
|
3019 |
var spinner_step = document.getElementById(\'' . $label_id[$key] . '_range_step' . $id . '\').value;
|
3020 |
jQuery( \'#' . $label_id[$key] . '_element' . $id . '0\' ).removeClass( \'ui-spinner-input\' )
|
3021 |
-
.
|
3022 |
.removeAttr( \'autocomplete\' )
|
3023 |
.removeAttr( \'role\' )
|
3024 |
.removeAttr( \'aria-valuenow\' );
|
@@ -3032,7 +3472,7 @@ class FMViewForm_maker {
|
|
3032 |
spinner0.spinner( \'value\', spinner_value0 );
|
3033 |
jQuery( \'#' . $label_id[$key] . '_element' . $id . '0\' ).spinner({ step: spinner_step});
|
3034 |
jQuery( \'#' . $label_id[$key] . '_element' . $id . '1\' ).removeClass( \'ui-spinner-input\' )
|
3035 |
-
.
|
3036 |
.removeAttr( \'autocomplete\' )
|
3037 |
.removeAttr( \'role\' )
|
3038 |
.removeAttr( \'aria-valuenow\' );
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display($id) {
|
|
|
|
|
|
|
26 |
$form_maker_front_end = "";
|
27 |
$result = $this->model->showform($id);
|
28 |
if (!$result) {
|
144 |
array_push($paramss, $temp[1]);
|
145 |
}
|
146 |
$form_id = $id;
|
147 |
+
|
148 |
+
$show_hide = array();
|
149 |
+
$field_label = array();
|
150 |
+
$all_any = array();
|
151 |
+
$condition_params = array();
|
152 |
+
$type_and_id = array();
|
153 |
+
|
154 |
+
$condition_js='';
|
155 |
+
if($row->condition!="")
|
156 |
+
{
|
157 |
+
$conditions=explode('*:*new_condition*:*',$row->condition);
|
158 |
+
$conditions = array_slice($conditions,0, count($conditions)-1);
|
159 |
+
$count_of_conditions = count($conditions);
|
160 |
+
|
161 |
+
foreach($conditions as $condition)
|
162 |
+
{
|
163 |
+
$temp=explode('*:*show_hide*:*',$condition);
|
164 |
+
array_push($show_hide, $temp[0]);
|
165 |
+
$temp=explode('*:*field_label*:*',$temp[1]);
|
166 |
+
array_push($field_label, $temp[0]);
|
167 |
+
$temp=explode('*:*all_any*:*',$temp[1]);
|
168 |
+
array_push($all_any, $temp[0]);
|
169 |
+
array_push($condition_params, $temp[1]);
|
170 |
+
}
|
171 |
+
|
172 |
+
foreach($id1s as $id1s_key => $id1)
|
173 |
+
{
|
174 |
+
$type_and_id[$id1]=$types[$id1s_key];
|
175 |
+
}
|
176 |
+
|
177 |
+
|
178 |
+
for($k=0; $k<$count_of_conditions; $k++)
|
179 |
+
{
|
180 |
+
|
181 |
+
if($show_hide[$k])
|
182 |
+
{
|
183 |
+
$display = 'removeAttr("style")';
|
184 |
+
$display_none = 'css("display", "none")';
|
185 |
+
}
|
186 |
+
else
|
187 |
+
{
|
188 |
+
$display = 'css("display", "none")';
|
189 |
+
$display_none = 'removeAttr("style")';
|
190 |
+
}
|
191 |
+
|
192 |
+
if($all_any[$k]=="and")
|
193 |
+
$or_and = '&&';
|
194 |
+
else
|
195 |
+
$or_and = '||';
|
196 |
+
|
197 |
+
|
198 |
+
if($condition_params[$k])
|
199 |
+
{
|
200 |
+
$cond_params =explode('*:*next_condition*:*',$condition_params[$k]);
|
201 |
+
$cond_params = array_slice($cond_params,0, count($cond_params)-1);
|
202 |
+
|
203 |
+
$if = '';
|
204 |
+
$keyup = '';
|
205 |
+
$change = '';
|
206 |
+
$click = '';
|
207 |
+
|
208 |
+
foreach($cond_params as $key=>$param)
|
209 |
+
{
|
210 |
+
$params_value = explode('***',html_entity_decode($param));
|
211 |
+
|
212 |
+
switch($type_and_id[$params_value[0]])
|
213 |
+
{
|
214 |
+
case "type_text":
|
215 |
+
case "type_password":
|
216 |
+
case "type_textarea":
|
217 |
+
case "type_number":
|
218 |
+
case "type_submitter_mail":
|
219 |
+
$if .= ' jQuery("#wdform_'.$params_value[0].'_element'.$form_id.'").val()'.$params_value[1].'"'.$params_value[2].'" ';
|
220 |
+
$keyup .= '#wdform_'.$params_value[0].'_element'.$form_id.', ';
|
221 |
+
break;
|
222 |
+
|
223 |
+
case "type_name":
|
224 |
+
|
225 |
+
$extended0 = '';
|
226 |
+
$extended1 = '';
|
227 |
+
$extended2 = '';
|
228 |
+
$extended3 = '';
|
229 |
+
$normal0 = '';
|
230 |
+
$normal1 = '';
|
231 |
+
$normal2 = '';
|
232 |
+
$normal3 = '';
|
233 |
+
|
234 |
+
$name_fields = explode(' ',$params_value[2]);
|
235 |
+
if($name_fields[0]!='')
|
236 |
+
{
|
237 |
+
$extended0 = 'jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").val()'.$params_value[1].'"'.$name_fields[0].'"';
|
238 |
+
$normal0 = 'jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val()'.$params_value[1].'"'.$name_fields[0].'"';
|
239 |
+
}
|
240 |
+
|
241 |
+
if(isset($name_fields[1]) && $name_fields[1]!='')
|
242 |
+
{
|
243 |
+
$extended1 = 'jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val()'.$params_value[1].'"'.$name_fields[1].'"';
|
244 |
+
$normal1 = 'jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val()'.$params_value[1].'"'.$name_fields[1].'"';
|
245 |
+
}
|
246 |
+
|
247 |
+
if(isset($name_fields[2]) && $name_fields[2]!='')
|
248 |
+
{
|
249 |
+
$extended2 = 'jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val()'.$params_value[1].'"'.$name_fields[2].'"';
|
250 |
+
$normal2 = '';
|
251 |
+
}
|
252 |
+
|
253 |
+
if(isset($name_fields[3]) && $name_fields[3]!='')
|
254 |
+
{
|
255 |
+
$extended3 = 'jQuery("#wdform_'.$params_value[0].'_element_middle'.$form_id.'").val()'.$params_value[1].'"'.$name_fields[3].'"';
|
256 |
+
$normal3 = '';
|
257 |
+
}
|
258 |
+
|
259 |
+
|
260 |
+
if(isset($name_fields[3]))
|
261 |
+
{
|
262 |
+
$extended ='';
|
263 |
+
$normal ='';
|
264 |
+
if($extended0)
|
265 |
+
{
|
266 |
+
$extended = $extended0;
|
267 |
+
if($extended1)
|
268 |
+
{
|
269 |
+
$extended .= ' && '.$extended1;
|
270 |
+
if($extended2)
|
271 |
+
$extended .=' && '.$extended2;
|
272 |
+
|
273 |
+
if($extended3)
|
274 |
+
$extended .=' && '.$extended3;
|
275 |
+
}
|
276 |
+
else
|
277 |
+
{
|
278 |
+
if($extended2)
|
279 |
+
$extended .= ' && '.$extended2;
|
280 |
+
if($extended3)
|
281 |
+
$extended .= ' && '.$extended3;
|
282 |
+
}
|
283 |
+
}
|
284 |
+
else
|
285 |
+
{
|
286 |
+
if($extended1)
|
287 |
+
{
|
288 |
+
$extended = $extended1;
|
289 |
+
if($extended2)
|
290 |
+
$extended .=' && '.$extended2;
|
291 |
+
|
292 |
+
if($extended3)
|
293 |
+
$extended .=' && '.$extended3;
|
294 |
+
}
|
295 |
+
else
|
296 |
+
{
|
297 |
+
if($extended2)
|
298 |
+
{
|
299 |
+
$extended = $extended2;
|
300 |
+
if($extended3)
|
301 |
+
$extended .= ' && '.$extended3;
|
302 |
+
}
|
303 |
+
else
|
304 |
+
if($extended3)
|
305 |
+
$extended = $extended3;
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
if($normal0)
|
310 |
+
{
|
311 |
+
$normal = $normal0;
|
312 |
+
if($normal1)
|
313 |
+
$normal .= ' && '.$normal1;
|
314 |
+
}
|
315 |
+
else
|
316 |
+
{
|
317 |
+
if($normal1)
|
318 |
+
$normal = $normal1;
|
319 |
+
}
|
320 |
+
}
|
321 |
+
else
|
322 |
+
{
|
323 |
+
if(isset($name_fields[2]))
|
324 |
+
{
|
325 |
+
$extended ="";
|
326 |
+
$normal ="";
|
327 |
+
if($extended0)
|
328 |
+
{
|
329 |
+
$extended = $extended0;
|
330 |
+
if($extended1)
|
331 |
+
$extended .= ' && '.$extended1;
|
332 |
+
|
333 |
+
if($extended2)
|
334 |
+
$extended .=' && '.$extended2;
|
335 |
+
|
336 |
+
}
|
337 |
+
else
|
338 |
+
{
|
339 |
+
if($extended1)
|
340 |
+
{
|
341 |
+
$extended = $extended1;
|
342 |
+
if($extended2)
|
343 |
+
$extended .= ' && '.$extended2;
|
344 |
+
}
|
345 |
+
else
|
346 |
+
if($extended2)
|
347 |
+
$extended = $extended2;
|
348 |
+
}
|
349 |
+
|
350 |
+
|
351 |
+
if($normal0)
|
352 |
+
{
|
353 |
+
$normal = $normal0;
|
354 |
+
if($normal1)
|
355 |
+
$normal .= ' && '.$normal1;
|
356 |
+
}
|
357 |
+
else
|
358 |
+
{
|
359 |
+
if($normal1)
|
360 |
+
$normal = $normal1;
|
361 |
+
}
|
362 |
+
|
363 |
+
}
|
364 |
+
else
|
365 |
+
{
|
366 |
+
if(isset($name_fields[1]))
|
367 |
+
{
|
368 |
+
$extended ='';
|
369 |
+
$normal ='';
|
370 |
+
if($extended0)
|
371 |
+
{
|
372 |
+
if($extended1)
|
373 |
+
$extended = $extended0.' && '.$extended1;
|
374 |
+
else
|
375 |
+
$extended = $extended0;
|
376 |
+
}
|
377 |
+
else
|
378 |
+
{
|
379 |
+
if($extended1)
|
380 |
+
$extended = $extended1;
|
381 |
+
}
|
382 |
+
|
383 |
+
|
384 |
+
if($normal0)
|
385 |
+
{
|
386 |
+
if($normal1)
|
387 |
+
$normal = $normal0.' && '.$normal1;
|
388 |
+
else
|
389 |
+
$normal = $normal0;
|
390 |
+
}
|
391 |
+
else
|
392 |
+
{
|
393 |
+
if($normal1)
|
394 |
+
$normal = $normal1;
|
395 |
+
}
|
396 |
+
}
|
397 |
+
else
|
398 |
+
{
|
399 |
+
$extended = $extended0;
|
400 |
+
$normal = $normal0;
|
401 |
+
}
|
402 |
+
}
|
403 |
+
}
|
404 |
+
|
405 |
+
if($extended!="" && $normal!="")
|
406 |
+
$if .= ' ((jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").length != 0) ? '.$extended.' : '.$normal.') ';
|
407 |
+
else
|
408 |
+
$if .= ' true';
|
409 |
+
|
410 |
+
$keyup .= '#wdform_'.$params_value[0].'_element_title'.$form_id.', #wdform_'.$params_value[0].'_element_first'.$form_id.', #wdform_'.$params_value[0].'_element_last'.$form_id.', #wdform_'.$params_value[0].'_element_middle'.$form_id.', ';
|
411 |
+
break;
|
412 |
+
|
413 |
+
case "type_phone":
|
414 |
+
$phone_fields = explode(' ',$params_value[2]);
|
415 |
+
if(isset($phone_fields[1]))
|
416 |
+
{
|
417 |
+
if($phone_fields[0]!='' && $phone_fields[1]!='')
|
418 |
+
$if .= ' (jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val()'.$params_value[1].'"'.$phone_fields[0].'" && jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val()'.$params_value[1].'"'.$phone_fields[1].'") ';
|
419 |
+
else
|
420 |
+
{
|
421 |
+
if($phone_fields[0]=='')
|
422 |
+
$if .= ' (jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val()'.$params_value[1].'"'.$phone_fields[1].'") ';
|
423 |
+
else
|
424 |
+
if($phone_fields[1]=='')
|
425 |
+
$if .= ' (jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val()'.$params_value[1].'"'.$phone_fields[1].'") ';
|
426 |
+
}
|
427 |
+
}
|
428 |
+
else
|
429 |
+
$if .= ' jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val()'.$params_value[1].'"'.$params_value[2].'" ';
|
430 |
+
|
431 |
+
$keyup .= '#wdform_'.$params_value[0].'_element_first'.$form_id.', #wdform_'.$params_value[0].'_element_last'.$form_id.', ';
|
432 |
+
break;
|
433 |
+
|
434 |
+
case "type_paypal_price":
|
435 |
+
$if .= '
|
436 |
+
(jQuery("#wdform_'.$params_value[0].'_td_name_cents").attr("style")=="display: none;") ? jQuery("#wdform_'.$params_value[0].'_element_dollars'.$form_id.'").val()'.$params_value[1].'"'.$params_value[2].'" : parseFloat(jQuery("#wdform_'.$params_value[0].'_element_dollars'.$form_id.'").val()+"."+jQuery("#wdform_'.$params_value[0].'_element_cents'.$form_id.'").val())'.$params_value[1].'parseFloat("'.str_replace('.0', '.', $params_value[2]).'")';
|
437 |
+
|
438 |
+
$keyup .= '#wdform_'.$params_value[0].'_element_dollars'.$form_id.', #wdform_'.$params_value[0].'_element_cents'.$form_id.', ';
|
439 |
+
break;
|
440 |
+
|
441 |
+
case "type_own_select":
|
442 |
+
case "type_paypal_select":
|
443 |
+
|
444 |
+
$if .= ' jQuery("#wdform_'.$params_value[0].'_element'.$form_id.' option:selected").text()'.$params_value[1].'"'.$params_value[2].'" ';
|
445 |
+
$change .= '#wdform_'.$params_value[0].'_element'.$form_id.', ';
|
446 |
+
break;
|
447 |
+
|
448 |
+
case "type_address":
|
449 |
+
$if .= ' jQuery("#wdform_'.$params_value[0].'_country'.$form_id.'").val()'.$params_value[1].'"'.$params_value[2].'" ';
|
450 |
+
$change .= '#wdform_'.$params_value[0].'_country'.$form_id.', ';
|
451 |
+
break;
|
452 |
+
|
453 |
+
case "type_radio":
|
454 |
+
case "type_paypal_radio":
|
455 |
+
case "type_paypal_shipping":
|
456 |
+
|
457 |
+
$if .= ' jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$params_value[0].'_element'.$form_id.'\']:checked").attr("id")+"\']").eq(0).text()'.$params_value[1].'"'.$params_value[2].'" ';
|
458 |
+
$click .= 'div[wdid='.$params_value[0].'] input[type=\'radio\'], ';
|
459 |
+
break;
|
460 |
+
|
461 |
+
case "type_checkbox":
|
462 |
+
case "type_paypal_checkbox":
|
463 |
+
|
464 |
+
if($params_value[2])
|
465 |
+
{
|
466 |
+
$choises = explode('@@@',$params_value[2]);
|
467 |
+
$choises = array_slice($choises,0, count($choises)-1);
|
468 |
+
|
469 |
+
if($params_value[1]=="!=")
|
470 |
+
$is = "!";
|
471 |
+
else
|
472 |
+
$is = "";
|
473 |
+
|
474 |
+
foreach($choises as $key1=>$choise)
|
475 |
+
{
|
476 |
+
if($type_and_id[$params_value[0]]=="type_paypal_checkbox")
|
477 |
+
{
|
478 |
+
$choise_and_value = explode("*:*value*:*",$choise);
|
479 |
+
$if .= ' '.$is.'(jQuery("div[wdid='.$params_value[0].'] input[value=\"'.$choise_and_value[1].'\"]").is(":checked") && jQuery("div[wdid='.$params_value[0].'] input[title=\"'.$choise_and_value[0].'\"]"))';
|
480 |
+
|
481 |
+
}
|
482 |
+
else
|
483 |
+
$if .= ' '.$is.'jQuery("div[wdid='.$params_value[0].'] input[value=\"'.$choise.'\"]").is(":checked") ';
|
484 |
+
|
485 |
+
if($key1!=count($choises)-1)
|
486 |
+
$if .= '&&';
|
487 |
+
}
|
488 |
+
|
489 |
+
$click .= 'div[wdid='.$params_value[0].'] input[type=\'checkbox\'], ';
|
490 |
+
}
|
491 |
+
else
|
492 |
+
{
|
493 |
+
if($or_and=='&&')
|
494 |
+
$if .= ' true';
|
495 |
+
else
|
496 |
+
$if .= ' false';
|
497 |
+
}
|
498 |
+
break;
|
499 |
+
default :
|
500 |
+
if($or_and=='&&')
|
501 |
+
$if .= ' true';
|
502 |
+
else
|
503 |
+
$if .= ' false';
|
504 |
+
break;
|
505 |
+
}
|
506 |
+
|
507 |
+
if($key!=count($cond_params)-1)
|
508 |
+
$if .= $or_and;
|
509 |
+
}
|
510 |
+
|
511 |
+
if($if)
|
512 |
+
{
|
513 |
+
$condition_js .= '
|
514 |
+
|
515 |
+
if('.$if.')
|
516 |
+
jQuery("div[wdid='.$field_label[$k].']").'.$display .';
|
517 |
+
else
|
518 |
+
jQuery("div[wdid='.$field_label[$k].']").'.$display_none .';';
|
519 |
+
}
|
520 |
+
|
521 |
+
if($keyup)
|
522 |
+
$condition_js .= '
|
523 |
+
jQuery("'.substr($keyup,0,-2).'").keyup(function() {
|
524 |
+
|
525 |
+
if('.$if.')
|
526 |
+
jQuery("div[wdid='.$field_label[$k].']").'.$display .';
|
527 |
+
else
|
528 |
+
jQuery("div[wdid='.$field_label[$k].']").'.$display_none .'; });';
|
529 |
+
|
530 |
+
if($change)
|
531 |
+
$condition_js .= '
|
532 |
+
jQuery("'.substr($change,0,-2).'").change(function() {
|
533 |
+
if('.$if.')
|
534 |
+
jQuery("div[wdid='.$field_label[$k].']").'.$display .';
|
535 |
+
else
|
536 |
+
jQuery("div[wdid='.$field_label[$k].']").'.$display_none .'; });';
|
537 |
+
|
538 |
+
if($click)
|
539 |
+
$condition_js .= '
|
540 |
+
jQuery("'.substr($click,0,-2).'").click(function() {
|
541 |
+
if('.$if.')
|
542 |
+
jQuery("div[wdid='.$field_label[$k].']").'.$display .';
|
543 |
+
else
|
544 |
+
jQuery("div[wdid='.$field_label[$k].']").'.$display_none .'; });';
|
545 |
+
|
546 |
+
}
|
547 |
+
|
548 |
+
|
549 |
+
}
|
550 |
+
|
551 |
+
}
|
552 |
+
|
553 |
if ($row->autogen_layout == 0) {
|
554 |
$form=$row->custom_front;
|
555 |
}
|
630 |
jQuery("<input type=\"hidden\" name=\"wdform_send_copy_'.$form_id.'\" value = \"1\" />").appendTo("#form'.$form_id.'");';
|
631 |
if($required) {
|
632 |
$check_js.='
|
633 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
634 |
{
|
635 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
636 |
{
|
677 |
|
678 |
if($required) {
|
679 |
$check_js.='
|
680 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
681 |
{
|
682 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="'.$param['w_title'].'" || jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
683 |
{
|
727 |
|
728 |
if($required) {
|
729 |
$check_js.='
|
730 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
731 |
{
|
732 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="'.$param['w_title'].'" || jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
733 |
{
|
774 |
|
775 |
if($required) {
|
776 |
$check_js.='
|
777 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
778 |
{
|
779 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
780 |
{
|
823 |
|
824 |
if($required) {
|
825 |
$check_js.='
|
826 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
827 |
{
|
828 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="'.$param['w_title'].'" || jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
829 |
{
|
878 |
$rep.= $wd_editor.'</div></div>';
|
879 |
if($required) {
|
880 |
$check_js.='
|
881 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
882 |
{
|
883 |
if(tinyMCE.get("wdform_'.$id1.'_wd_editor'.$form_id.'").getContent()=="")
|
884 |
{
|
950 |
|
951 |
if($required) {
|
952 |
$check_js.='
|
953 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
954 |
{
|
955 |
if(jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="'.$w_title[1].'" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="")
|
956 |
{
|
1055 |
if($required) {
|
1056 |
if($param['w_name_format']=='normal') {
|
1057 |
$check_js.='
|
1058 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1059 |
{
|
1060 |
if(jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="'.$w_title[1].'" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="")
|
1061 |
{
|
1070 |
}
|
1071 |
else {
|
1072 |
$check_js.='
|
1073 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1074 |
{
|
1075 |
if(jQuery("#wdform_'.$id1.'_element_title'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_title'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="'.$w_title[1].'" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="'.$w_title[2].'" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_middle'.$form_id.'").val()=="'.$w_title[3].'" || jQuery("#wdform_'.$id1.'_element_middle'.$form_id.'").val()=="")
|
1076 |
{
|
1172 |
|
1173 |
if ($required) {
|
1174 |
$check_js.='
|
1175 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1176 |
{
|
1177 |
if(jQuery("#wdform_'.$id1.'_street1'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_street2'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_city'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_state'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_postal'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_country'.$form_id.'").val()=="")
|
1178 |
{
|
1199 |
}
|
1200 |
else
|
1201 |
{
|
1202 |
+
if(jQuery("#wdform_'.$id1.'_state'.$form_id.'").attr("tagName")=="SELECT")
|
1203 |
{
|
1204 |
|
1205 |
jQuery("#wdform_'.$id1.'_state'.$form_id.'").parent().append("<input type=\"text\" id=\"wdform_'.$id1.'_state'.$form_id.'\" name=\"wdform_'.($id1+3).'_state'.$form_id.'\" value=\"'.(isset($_POST['wdform_'.($id1+3).'_state'.$form_id]) ? $_POST['wdform_'.($id1+3).'_state'.$form_id] : "").'\" style=\"width: 100%;\" '.$param['attributes'].'><label class=\"mini_label\">'.$w_mini_labels[3].'</label>");
|
1244 |
|
1245 |
if($required) {
|
1246 |
$check_js.='
|
1247 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1248 |
{
|
1249 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="'.$param['w_title'].'" || jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
1250 |
{
|
1260 |
';
|
1261 |
}
|
1262 |
$check_js.='
|
1263 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1264 |
{
|
1265 |
|
1266 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()!="" && jQuery("#wdform_'.$id1.'_element'.$form_id.'").val().search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1 )
|
1333 |
$param['w_choices_checked'][$key]=($param['w_choices_checked'][$key]=='true' ? 'checked="checked"' : '');
|
1334 |
}
|
1335 |
else {
|
1336 |
+
$post_valuetemp = isset($_POST['wdform_'.$id1."_element".$form_id.$key]) ? $_POST['wdform_'.$id1."_element".$form_id.$key] : NULL;
|
1337 |
$param['w_choices_checked'][$key]=(isset($post_valuetemp) ? 'checked="checked"' : '');
|
1338 |
}
|
1339 |
|
1345 |
|
1346 |
if($required) {
|
1347 |
$check_js.='
|
1348 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1349 |
{
|
1350 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0 || jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val() == "")
|
1351 |
{
|
1433 |
|
1434 |
if($required) {
|
1435 |
$check_js.='
|
1436 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1437 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0 || jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val() == "") {
|
1438 |
alert("' .$label. ' ' . addslashes(__('field is required.', 'form_maker')) . '");
|
1439 |
old_bg=x.find(jQuery("div[wdid='.$id1.']")).css("background-color");
|
1504 |
|
1505 |
if($required) {
|
1506 |
$check_js.='
|
1507 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1508 |
{
|
1509 |
if( jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
1510 |
{
|
1563 |
|
1564 |
if($required) {
|
1565 |
$check_js.='
|
1566 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1567 |
{
|
1568 |
+
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
1569 |
{
|
1570 |
alert("' .$label. ' ' . addslashes(__('field is required.', 'form_maker')) . '");
|
1571 |
jQuery("#wdform_'.$id1.'_element'.$form_id.'").addClass( "form-error" );
|
1639 |
|
1640 |
if($required) {
|
1641 |
$check_js.='
|
1642 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1643 |
{
|
1644 |
if(jQuery("#wdform_'.$id1.'_mm'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_hh'.$form_id.'").val()=="" || (jQuery("#wdform_'.$id1.'_ss'.$form_id.'").length != 0 ? jQuery("#wdform_'.$id1.'_ss'.$form_id.'").val()=="" : false))
|
1645 |
{
|
1686 |
|
1687 |
if($required) {
|
1688 |
$check_js.='
|
1689 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1690 |
{
|
1691 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
1692 |
{
|
1794 |
|
1795 |
if($required) {
|
1796 |
$check_js.='
|
1797 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1798 |
{
|
1799 |
if(jQuery("#wdform_'.$id1.'_day'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_month'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_year'.$form_id.'").val()=="")
|
1800 |
{
|
1842 |
|
1843 |
if($required) {
|
1844 |
$check_js.='
|
1845 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1846 |
{
|
1847 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
1848 |
{
|
1856 |
';
|
1857 |
}
|
1858 |
$check_js.='
|
1859 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1860 |
{
|
1861 |
ext_available=getfileextension(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val(),"'.$param['w_extension'].'");
|
1862 |
if(!ext_available)
|
1897 |
$onload_js .='jQuery("#_element_refresh'.$form_id.'").click(function() {captcha_refresh("wd_captcha","'.$form_id.'")});';
|
1898 |
|
1899 |
$check_js.='
|
1900 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1901 |
{
|
1902 |
if(jQuery("#wd_captcha_input'.$form_id.'").val()=="")
|
1903 |
{
|
2065 |
|
2066 |
if($required) {
|
2067 |
$check_js.='
|
2068 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2069 |
{
|
2070 |
if(jQuery("#wdform_'.$id1.'_element_dollars'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_dollars'.$form_id.'").val()=="")
|
2071 |
{
|
2079 |
';
|
2080 |
}
|
2081 |
$check_js.='
|
2082 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2083 |
{
|
2084 |
dollars=0;
|
2085 |
cents=0;
|
2211 |
|
2212 |
if($required) {
|
2213 |
$check_js.='
|
2214 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2215 |
{
|
2216 |
+
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
2217 |
{
|
2218 |
alert("' .$label. ' ' . addslashes(__('field is required.', 'form_maker')) . '");
|
2219 |
jQuery("#wdform_'.$id1.'_element'.$form_id.'").addClass( "form-error" );
|
2232 |
$onsubmit_js.='
|
2233 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("'.(__("Quantity", 'form_maker')).'").appendTo("#form'.$form_id.'");
|
2234 |
';
|
2235 |
+
foreach($param['w_property'] as $key => $property)
|
2236 |
+
{
|
2237 |
+
$onsubmit_js.='
|
2238 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.$key.'\" />").val("'.$property.'").appendTo("#form'.$form_id.'");
|
2239 |
+
';
|
2240 |
+
|
2241 |
+
}
|
2242 |
break;
|
2243 |
}
|
2244 |
|
2278 |
$post_value = isset($_POST["counter".$form_id]) ? $_POST["counter".$form_id] : NULL;
|
2279 |
if(isset($post_value)) {
|
2280 |
$param['w_choices_checked'][$key]="";
|
2281 |
+
$post_value = isset($_POST['wdform_'.$id1."_element".$form_id.$key]) ? $_POST['wdform_'.$id1."_element".$form_id.$key] : NULL;
|
2282 |
if(isset($post_value)) {
|
2283 |
$param['w_choices_checked'][$key]='checked="checked"';
|
2284 |
}
|
2308 |
$rep.='</div></div></div>';
|
2309 |
if($required) {
|
2310 |
$check_js.='
|
2311 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2312 |
{
|
2313 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
2314 |
{
|
2322 |
';
|
2323 |
}
|
2324 |
$onsubmit_js.='
|
2325 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val((x.find(jQuery("div[wdid='.$id1.'] input:checked")).length != 0) ? jQuery("#"+x.find(jQuery("div[wdid='.$id1.'] input:checked")).attr("id").replace("element", "elementlabel_")) : "").appendTo("#form'.$form_id.'");
|
2326 |
';
|
2327 |
$onsubmit_js.='
|
2328 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("'.(__("Quantity", 'form_maker')).'").appendTo("#form'.$form_id.'");
|
2329 |
';
|
2330 |
+
foreach($param['w_property'] as $key => $property)
|
2331 |
+
{
|
2332 |
+
$onsubmit_js.='
|
2333 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.$key.'\" />").val("'.$property.'").appendTo("#form'.$form_id.'");
|
2334 |
+
';
|
2335 |
+
}
|
2336 |
break;
|
2337 |
}
|
2338 |
|
2403 |
|
2404 |
if($required) {
|
2405 |
$check_js.='
|
2406 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2407 |
{
|
2408 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
2409 |
{
|
2418 |
}
|
2419 |
$onsubmit_js.='
|
2420 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(
|
2421 |
+
jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$id1.'_element'.$form_id.'\']:checked").attr("id")+"\']").eq(0).text()
|
2422 |
).appendTo("#form'.$form_id.'");
|
2423 |
|
2424 |
';
|
2425 |
$onsubmit_js.='
|
2426 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("'.(__("Quantity", 'form_maker')).'").appendTo("#form'.$form_id.'");
|
2427 |
';
|
2428 |
+
foreach($param['w_property'] as $key => $property)
|
2429 |
+
{
|
2430 |
+
$onsubmit_js.='
|
2431 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.$key.'\" />").val("'.$property.'").appendTo("#form'.$form_id.'");
|
2432 |
+
';
|
2433 |
+
}
|
2434 |
break;
|
2435 |
}
|
2436 |
|
2478 |
$rep.='</div></div>';
|
2479 |
if($required) {
|
2480 |
$check_js.='
|
2481 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2482 |
{
|
2483 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
2484 |
{
|
2493 |
}
|
2494 |
$onsubmit_js.='
|
2495 |
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(
|
2496 |
+
jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$id1.'_element'.$form_id.'\']:checked").attr("id")+"\']").eq(0).text()
|
2497 |
).appendTo("#form'.$form_id.'");
|
2498 |
';
|
2499 |
break;
|
2579 |
|
2580 |
if($required) {
|
2581 |
$check_js.='
|
2582 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2583 |
{
|
2584 |
if(jQuery("#wdform_'.$id1.'_selected_star_amount'.$form_id.'").val()=="")
|
2585 |
{
|
2638 |
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" style="float: left;" '.$param['attributes'].'><label class="mini_label">'.$w_mini_labels[0].'</label><div style="display: inline-table; vertical-align: middle;border-spacing: 7px;"><div style="display: table-row;">'.$numbers.'</div><div style="display: table-row;">'.$radio_buttons.'</div></div><label class="mini_label" >'.$w_mini_labels[1].'</label></div></div></div>';
|
2639 |
if($required) {
|
2640 |
$check_js.='
|
2641 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2642 |
{
|
2643 |
if(x.find(jQuery("div[wdid='.$id1.'] input:checked")).length == 0)
|
2644 |
{
|
2683 |
}
|
2684 |
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].'"><input type="text" value="'.($param['w_field_value']!= 'null' ? $param['w_field_value'] : '').'" name="wdform_'.$id1.'_element'.$form_id.'" id="wdform_'.$id1.'_element'.$form_id.'" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].'></div></div>';
|
2685 |
$onload_js .='
|
2686 |
+
jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'")[0].spin = null;
|
2687 |
+
spinner = jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'").spinner();
|
2688 |
spinner.spinner( "value", "'.($param['w_field_value']!= 'null' ? $param['w_field_value'] : '').'");
|
2689 |
+
jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'").spinner({ min: "'.$param['w_field_min_value'].'"});
|
2690 |
+
jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'").spinner({ max: "'.$param['w_field_max_value'].'"});
|
2691 |
+
jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'").spinner({ step: "'.$param['w_field_step'].'"});
|
2692 |
';
|
2693 |
|
2694 |
if($required) {
|
2695 |
$check_js.='
|
2696 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2697 |
{
|
2698 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'").val()=="")
|
2699 |
{
|
2753 |
';
|
2754 |
if($required) {
|
2755 |
$check_js.='
|
2756 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2757 |
{
|
2758 |
if(jQuery("#wdform_'.$id1.'_slider_value'.$form_id.'").val()=='.$param['w_field_min_value'].')
|
2759 |
{
|
2796 |
}
|
2797 |
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].'"><div style="display: table;"><div style="display: table-row;"><div valign="middle" align="left" style="display: table-cell;"><input type="text" value="'.($param['w_field_value1']!= 'null' ? $param['w_field_value1'] : '').'" name="wdform_'.$id1.'_element'.$form_id.'0" id="wdform_'.$id1.'_element'.$form_id.'0" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].'></div><div valign="middle" align="left" style="display: table-cell; padding-left: 4px;"><input type="text" value="'.($param['w_field_value2']!= 'null' ? $param['w_field_value2'] : '').'" name="wdform_'.$id1.'_element'.$form_id.'1" id="wdform_'.$id1.'_element'.$form_id.'1" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].'></div></div><div style="display: table-row;"><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="wdform_'.$id1.'_mini_label_from">'.$w_mini_labels[0].'</label></div><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="wdform_'.$id1.'_mini_label_to">'.$w_mini_labels[1].'</label></div></div></div></div></div>';
|
2798 |
$onload_js .='
|
2799 |
+
jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'0")[0].spin = null;
|
2800 |
+
jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'1")[0].spin = null;
|
2801 |
|
2802 |
+
spinner0 = jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'0").spinner();
|
2803 |
spinner0.spinner( "value", "'.($param['w_field_value1']!= 'null' ? $param['w_field_value1'] : '').'");
|
2804 |
+
jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'").spinner({ step: '.$param['w_field_range_step'].'});
|
2805 |
|
2806 |
+
spinner1 = jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'1").spinner();
|
2807 |
spinner1.spinner( "value", "'.($param['w_field_value2']!= 'null' ? $param['w_field_value2'] : '').'");
|
2808 |
+
jQuery("#form'.$form_id.' #wdform_'.$id1.'_element'.$form_id.'").spinner({ step: '.$param['w_field_range_step'].'});
|
2809 |
';
|
2810 |
|
2811 |
if($required) {
|
2812 |
$check_js.='
|
2813 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2814 |
{
|
2815 |
if(jQuery("#wdform_'.$id1.'_element'.$form_id.'0").val()=="" || jQuery("#wdform_'.$id1.'_element'.$form_id.'1").val()=="")
|
2816 |
{
|
2870 |
sum_grading_values("wdform_'.$id1.'",'.$form_id.');';
|
2871 |
if($required) {
|
2872 |
$check_js.='
|
2873 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2874 |
{
|
2875 |
if('.$required_check.')
|
2876 |
{
|
2884 |
';
|
2885 |
}
|
2886 |
$check_js.='
|
2887 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2888 |
{
|
2889 |
if(parseInt(jQuery("#wdform_'.$id1.'_sum_element'.$form_id.'").html()) > '.$param['w_total'].')
|
2890 |
{
|
2974 |
if($required) {
|
2975 |
if($param['w_field_input_type']=='radio') {
|
2976 |
$check_js.='
|
2977 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2978 |
{
|
2979 |
var radio_checked=true;
|
2980 |
for(var k=1; k<'.count($w_rows).';k++)
|
2998 |
}
|
2999 |
if($param['w_field_input_type']=='checkbox') {
|
3000 |
$check_js.='
|
3001 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
3002 |
{
|
3003 |
if(x.find(jQuery("div[wdid='.$id1.']")).find(jQuery("input[type=\'checkbox\']:checked")).length == 0)
|
3004 |
{
|
3013 |
}
|
3014 |
if($param['w_field_input_type']=='text') {
|
3015 |
$check_js.='
|
3016 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
3017 |
{
|
3018 |
if(x.find(jQuery("div[wdid='.$id1.']")).find(jQuery("input[type=\'text\']")).filter(function() {return this.value.length !== 0;}).length == 0)
|
3019 |
{
|
3028 |
|
3029 |
if($param['w_field_input_type']=='select') {
|
3030 |
$check_js.='
|
3031 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
3032 |
{
|
3033 |
if(x.find(jQuery("div[wdid='.$id1.']")).find(jQuery("select")).filter(function() {return this.value.length !== 0;}).length == 0)
|
3034 |
{
|
3071 |
$form=str_replace('%'.$id1.' - '.$labels[$id1s_key].'%', $rep, $form);
|
3072 |
}
|
3073 |
}
|
3074 |
+
|
3075 |
+
$onsubmit_js.='
|
3076 |
+
var disabled_fields ="";
|
3077 |
+
jQuery("div[wdid]").each(function() {
|
3078 |
+
if(jQuery(this).css("display")=="none")
|
3079 |
+
{
|
3080 |
+
disabled_fields += jQuery(this).attr("wdid");
|
3081 |
+
disabled_fields += ",";
|
3082 |
+
}
|
3083 |
+
|
3084 |
+
if(disabled_fields)
|
3085 |
+
jQuery("<input type=\"hidden\" name=\"disabled_fields'.$form_id.'\" value =\""+disabled_fields+"\" />").appendTo("#form'.$form_id.'");
|
3086 |
+
|
3087 |
+
})';
|
3088 |
+
|
3089 |
$rep1=array('form_id_temp');
|
3090 |
$rep2=array($id);
|
3091 |
|
3123 |
jQuery("div[type='type_time'] input").blur(function() {add_0(this)});
|
3124 |
|
3125 |
jQuery('.wdform-element-section').each(function() {
|
3126 |
+
if(!jQuery(this).parent()[0].style.width && parseInt(jQuery(this).width())!=0)
|
3127 |
+
{
|
3128 |
+
|
3129 |
+
if(jQuery(this).css('display')=="table-cell")
|
3130 |
+
{
|
3131 |
+
if(jQuery(this).parent().attr('type')!="type_captcha")
|
3132 |
+
jQuery(this).parent().css('width', parseInt(jQuery(this).width()) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15);
|
3133 |
+
else
|
3134 |
+
jQuery(this).parent().css('width', (parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)*2+50) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15);
|
3135 |
+
}
|
3136 |
+
}
|
3137 |
if (!jQuery(this).parent()[0].style.width && parseInt(jQuery(this).width()) != 0) {
|
3138 |
if (jQuery(this).css('display') == "table-cell") {
|
3139 |
if (jQuery(this).parent().attr('type') != "type_captcha") {
|
3157 |
});
|
3158 |
|
3159 |
<?php echo $onload_js; ?>
|
3160 |
+
<?php echo $condition_js; ?>
|
3161 |
|
3162 |
if(window.before_load)
|
3163 |
{
|
3401 |
if (document.getElementById(\'' . $label_id[$key] . '_step' . $id . '\'))
|
3402 |
var spinner_step = document.getElementById(\'' . $label_id[$key] . '_step' . $id . '\').value;
|
3403 |
jQuery( \'' . $label_id[$key] . '_element' . $id . '\' ).removeClass( \'ui-spinner-input\')
|
3404 |
+
.attr( \'disabled\', false )
|
3405 |
.removeAttr( \'autocomplete\' )
|
3406 |
.removeAttr( \'role\' )
|
3407 |
.removeAttr( \'aria-valuemin\' )
|
3458 |
if (document.getElementById(\'' . $label_id[$key] . '_range_step' . $id . '\'))
|
3459 |
var spinner_step = document.getElementById(\'' . $label_id[$key] . '_range_step' . $id . '\').value;
|
3460 |
jQuery( \'#' . $label_id[$key] . '_element' . $id . '0\' ).removeClass( \'ui-spinner-input\' )
|
3461 |
+
.attr( \'disabled\', false )
|
3462 |
.removeAttr( \'autocomplete\' )
|
3463 |
.removeAttr( \'role\' )
|
3464 |
.removeAttr( \'aria-valuenow\' );
|
3472 |
spinner0.spinner( \'value\', spinner_value0 );
|
3473 |
jQuery( \'#' . $label_id[$key] . '_element' . $id . '0\' ).spinner({ step: spinner_step});
|
3474 |
jQuery( \'#' . $label_id[$key] . '_element' . $id . '1\' ).removeClass( \'ui-spinner-input\' )
|
3475 |
+
.attr( \'disabled\', false )
|
3476 |
.removeAttr( \'autocomplete\' )
|
3477 |
.removeAttr( \'role\' )
|
3478 |
.removeAttr( \'aria-valuenow\' );
|
images/add_condition.png
ADDED
Binary file
|
js/form_maker_editor_button.js
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
ed.addButton('Form_Maker_mce', {
|
15 |
title : 'Insert Form Maker',
|
16 |
cmd : 'mceForm_Maker_mce',
|
17 |
-
image:
|
18 |
});
|
19 |
}
|
20 |
});
|
14 |
ed.addButton('Form_Maker_mce', {
|
15 |
title : 'Insert Form Maker',
|
16 |
cmd : 'mceForm_Maker_mce',
|
17 |
+
image: url + '/images/form_maker_edit_but.png'
|
18 |
});
|
19 |
}
|
20 |
});
|
js/form_maker_manage.js
CHANGED
@@ -477,3 +477,453 @@ function wdhide(id) {
|
|
477 |
function wdshow(id) {
|
478 |
document.getElementById(id).style.display = "block";
|
479 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
477 |
function wdshow(id) {
|
478 |
document.getElementById(id).style.display = "block";
|
479 |
}
|
480 |
+
|
481 |
+
function delete_field_condition(id)
|
482 |
+
{
|
483 |
+
var cond_id = id.split("_");
|
484 |
+
document.getElementById("condition"+cond_id[0]).removeChild(document.getElementById("condition_div"+id));
|
485 |
+
}
|
486 |
+
|
487 |
+
function change_choices(value, ids, types, params)
|
488 |
+
{
|
489 |
+
|
490 |
+
value = value.split("_");
|
491 |
+
global_index = value[0];
|
492 |
+
id = value[1];
|
493 |
+
index = value[2];
|
494 |
+
|
495 |
+
|
496 |
+
ids_array = ids.split("@@**@@");
|
497 |
+
types_array = types.split("@@**@@");
|
498 |
+
params_array = params.split("@@**@@");
|
499 |
+
|
500 |
+
switch(types_array[id])
|
501 |
+
{
|
502 |
+
case "type_text":
|
503 |
+
case "type_password":
|
504 |
+
case "type_textarea":
|
505 |
+
case "type_name":
|
506 |
+
case "type_submitter_mail":
|
507 |
+
case "type_number":
|
508 |
+
case "type_phone":
|
509 |
+
case "type_paypal_price":
|
510 |
+
|
511 |
+
if(types_array[id]=="type_number" || types_array[id]=="type_phone")
|
512 |
+
var keypress_function = "return check_isnum_space(event)";
|
513 |
+
else
|
514 |
+
if(types_array[id]=="type_paypal_price")
|
515 |
+
var keypress_function = "return check_isnum_point(event)";
|
516 |
+
else
|
517 |
+
var keypress_function = "";
|
518 |
+
|
519 |
+
if(document.getElementById("field_value"+global_index+"_"+index).tagName=="SELECT")
|
520 |
+
{
|
521 |
+
|
522 |
+
document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index));
|
523 |
+
|
524 |
+
var label_input = document.createElement('input');
|
525 |
+
label_input.setAttribute("id", "field_value"+global_index+'_'+index);
|
526 |
+
label_input.setAttribute("type", "text");
|
527 |
+
label_input.setAttribute("value", "");
|
528 |
+
label_input.style.cssText = "vertical-align: top; width:200px;";
|
529 |
+
label_input.setAttribute("onKeyPress", keypress_function);
|
530 |
+
|
531 |
+
document.getElementById("condition_div"+global_index+"_"+index).insertBefore(label_input,document.getElementById("delete_condition"+global_index+"_"+index));
|
532 |
+
document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(' '),document.getElementById("delete_condition"+global_index+"_"+index));
|
533 |
+
}
|
534 |
+
else
|
535 |
+
{
|
536 |
+
document.getElementById("field_value"+global_index+'_'+index).value="";
|
537 |
+
document.getElementById("field_value"+global_index+'_'+index).setAttribute("onKeyPress", keypress_function);
|
538 |
+
}
|
539 |
+
|
540 |
+
|
541 |
+
break;
|
542 |
+
|
543 |
+
case "type_own_select":
|
544 |
+
case "type_paypal_select":
|
545 |
+
case "type_radio":
|
546 |
+
case "type_checkbox":
|
547 |
+
case "type_paypal_radio":
|
548 |
+
case "type_paypal_checkbox":
|
549 |
+
case "type_paypal_shipping":
|
550 |
+
|
551 |
+
if(types_array[id]=="type_own_select" || types_array[id]=="type_paypal_select")
|
552 |
+
w_size = params_array[id].split('*:*w_size*:*');
|
553 |
+
else
|
554 |
+
w_size = params_array[id].split('*:*w_flow*:*');
|
555 |
+
|
556 |
+
|
557 |
+
w_choices = w_size[1].split('*:*w_choices*:*');
|
558 |
+
w_choices_array = w_choices[0].split('***');
|
559 |
+
|
560 |
+
if(types_array[id]== "type_paypal_checkbox")
|
561 |
+
{
|
562 |
+
w_choices_price = w_choices[1].split('*:*w_choices_price*:*');
|
563 |
+
w_choices_price_array = w_choices_price[0].split('***');
|
564 |
+
}
|
565 |
+
|
566 |
+
var choise_select = document.createElement('select');
|
567 |
+
choise_select.setAttribute("id", "field_value"+global_index+'_'+index);
|
568 |
+
choise_select.style.cssText = "vertical-align: top; width:200px;";
|
569 |
+
if(types_array[id]== "type_checkbox" || types_array[id]== "type_paypal_checkbox")
|
570 |
+
{
|
571 |
+
choise_select.setAttribute('multiple', 'multiple');
|
572 |
+
choise_select.setAttribute('class', 'multiple_select');
|
573 |
+
}
|
574 |
+
|
575 |
+
for(k=0; k<w_choices_array.length; k++)
|
576 |
+
{
|
577 |
+
var choise_option = document.createElement('option');
|
578 |
+
choise_option.setAttribute("id", "choise_"+global_index+'_'+k);
|
579 |
+
if(types_array[id]== "type_paypal_checkbox")
|
580 |
+
choise_option.setAttribute("value", w_choices_array[k]+'*:*value*:*'+w_choices_price_array[k]);
|
581 |
+
else
|
582 |
+
choise_option.setAttribute("value", w_choices_array[k]);
|
583 |
+
choise_option.innerHTML = w_choices_array[k];
|
584 |
+
|
585 |
+
choise_select.appendChild(choise_option);
|
586 |
+
}
|
587 |
+
|
588 |
+
document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index));
|
589 |
+
document.getElementById("condition_div"+global_index+"_"+index).insertBefore(choise_select,document.getElementById("delete_condition"+global_index+"_"+index));
|
590 |
+
document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(' '),document.getElementById("delete_condition"+global_index+"_"+index));
|
591 |
+
|
592 |
+
break;
|
593 |
+
|
594 |
+
case "type_address":
|
595 |
+
|
596 |
+
coutries=["Afghanistan","Albania", "Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombi","Comoros","Congo (Brazzaville)","Congo","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor (Timor Timur)","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia, The","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, North","Korea, South","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepa","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe"];
|
597 |
+
|
598 |
+
var choise_select = document.createElement('select');
|
599 |
+
choise_select.setAttribute("id", "field_value"+global_index+'_'+m);
|
600 |
+
choise_select.style.cssText = "vertical-align: top; width:200px;";
|
601 |
+
|
602 |
+
for(k=0; k<coutries.length; k++)
|
603 |
+
{
|
604 |
+
var choise_option = document.createElement('option');
|
605 |
+
choise_select.setAttribute("id", "field_value"+global_index+'_'+index);
|
606 |
+
choise_select.style.cssText = "vertical-align: top; width:200px;";
|
607 |
+
choise_option.setAttribute("value", coutries[k]);
|
608 |
+
choise_option.innerHTML = coutries[k];
|
609 |
+
|
610 |
+
choise_select.appendChild(choise_option);
|
611 |
+
}
|
612 |
+
|
613 |
+
document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index));
|
614 |
+
document.getElementById("condition_div"+global_index+"_"+index).insertBefore(choise_select,document.getElementById("delete_condition"+global_index+"_"+index));
|
615 |
+
document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(' '),document.getElementById("delete_condition"+global_index+"_"+index));
|
616 |
+
|
617 |
+
break;
|
618 |
+
}
|
619 |
+
|
620 |
+
}
|
621 |
+
|
622 |
+
|
623 |
+
function add_condition_fields(num, ids1, labels1, types1, params1)
|
624 |
+
{
|
625 |
+
|
626 |
+
ids = ids1.split("@@**@@");
|
627 |
+
labels = labels1.split("@@**@@");
|
628 |
+
types = types1.split("@@**@@");
|
629 |
+
params = params1.split("@@**@@");
|
630 |
+
|
631 |
+
for(i=100; i>=0; i--)
|
632 |
+
{
|
633 |
+
if(document.getElementById('condition_div'+num+'_'+i))
|
634 |
+
break;
|
635 |
+
}
|
636 |
+
|
637 |
+
m=i+1;
|
638 |
+
|
639 |
+
var condition_div = document.createElement('div');
|
640 |
+
condition_div.setAttribute("id", "condition_div"+num+'_'+m);
|
641 |
+
|
642 |
+
var labels_select = document.createElement('select');
|
643 |
+
labels_select.setAttribute("id", "field_labels"+num+'_'+m);
|
644 |
+
labels_select.setAttribute("onchange", "change_choices(options[selectedIndex].id+'_"+m+"','"+ids1+"','"+types1+"','"+params1+"')");
|
645 |
+
labels_select.style.cssText="width:350px; vertical-align:top;";
|
646 |
+
|
647 |
+
for(k=0; k<labels.length; k++)
|
648 |
+
{
|
649 |
+
if(ids[k]!=document.getElementById('fields'+num).value)
|
650 |
+
{
|
651 |
+
var labels_option = document.createElement('option');
|
652 |
+
labels_option.setAttribute("id", num+"_"+k);
|
653 |
+
labels_option.setAttribute("value", ids[k]);
|
654 |
+
labels_option.innerHTML = labels[k];
|
655 |
+
|
656 |
+
labels_select.appendChild(labels_option);
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
condition_div.appendChild(labels_select);
|
661 |
+
condition_div.appendChild(document.createTextNode(' '));
|
662 |
+
|
663 |
+
var is_select = document.createElement('select');
|
664 |
+
is_select.setAttribute("id", "is_select"+num+'_'+m);
|
665 |
+
is_select.style.cssText = "vertical-align: top";
|
666 |
+
|
667 |
+
var is_option = document.createElement('option');
|
668 |
+
is_option.setAttribute("id", "is");
|
669 |
+
is_option.setAttribute("value", "==");
|
670 |
+
is_option.innerHTML = "is";
|
671 |
+
|
672 |
+
var is_notoption = document.createElement('option');
|
673 |
+
is_notoption.setAttribute("id", "is_not");
|
674 |
+
is_notoption.setAttribute("value", "!=");
|
675 |
+
is_notoption.innerHTML = "is not";
|
676 |
+
|
677 |
+
is_select.appendChild(is_option);
|
678 |
+
is_select.appendChild(is_notoption);
|
679 |
+
|
680 |
+
condition_div.appendChild(is_select);
|
681 |
+
condition_div.appendChild(document.createTextNode(' '));
|
682 |
+
|
683 |
+
if(ids[0]!=document.getElementById('fields'+num).value)
|
684 |
+
var index_of_field = 0;
|
685 |
+
else
|
686 |
+
var index_of_field = 1;
|
687 |
+
|
688 |
+
switch(types[index_of_field])
|
689 |
+
{
|
690 |
+
case "type_text":
|
691 |
+
case "type_password":
|
692 |
+
case "type_textarea":
|
693 |
+
case "type_name":
|
694 |
+
case "type_submitter_mail":
|
695 |
+
case "type_phone":
|
696 |
+
case "type_number":
|
697 |
+
case "type_paypal_price":
|
698 |
+
|
699 |
+
if(types[index_of_field]=="type_number" || types[index_of_field]=="type_phone")
|
700 |
+
var keypress_function = "return check_isnum_space(event)";
|
701 |
+
else
|
702 |
+
if(types[index_of_field]=="type_paypal_price")
|
703 |
+
var keypress_function = "return check_isnum_point(event)";
|
704 |
+
else
|
705 |
+
var keypress_function = "";
|
706 |
+
|
707 |
+
var label_input = document.createElement('input');
|
708 |
+
label_input.setAttribute("id", "field_value"+num+'_'+m);
|
709 |
+
label_input.setAttribute("type", "text");
|
710 |
+
label_input.setAttribute("value", "");
|
711 |
+
label_input.style.cssText = "vertical-align: top; width:200px;";
|
712 |
+
label_input.setAttribute("onKeyPress", keypress_function);
|
713 |
+
|
714 |
+
condition_div.appendChild(label_input);
|
715 |
+
|
716 |
+
break;
|
717 |
+
|
718 |
+
case "type_checkbox":
|
719 |
+
case "type_radio":
|
720 |
+
case "type_own_select":
|
721 |
+
case "type_paypal_select":
|
722 |
+
case "type_paypal_checkbox":
|
723 |
+
case "type_paypal_radio":
|
724 |
+
case "type_paypal_shipping":
|
725 |
+
|
726 |
+
if(types[index_of_field]=="type_own_select" || types[index_of_field]=="type_paypal_select")
|
727 |
+
w_size = params[index_of_field].split('*:*w_size*:*');
|
728 |
+
else
|
729 |
+
w_size = params[index_of_field].split('*:*w_flow*:*');
|
730 |
+
|
731 |
+
w_choices = w_size[1].split('*:*w_choices*:*');
|
732 |
+
w_choices_array = w_choices[0].split('***');
|
733 |
+
|
734 |
+
if(types[index_of_field]== "type_paypal_checkbox")
|
735 |
+
{
|
736 |
+
w_choices_price = w_choices[1].split('*:*w_choices_price*:*');
|
737 |
+
w_choices_price_array = w_choices_price[0].split('***');
|
738 |
+
}
|
739 |
+
|
740 |
+
var choise_select = document.createElement('select');
|
741 |
+
choise_select.setAttribute("id", "field_value"+num+'_'+m);
|
742 |
+
choise_select.style.cssText = "vertical-align: top; width:200px;";
|
743 |
+
if(types[index_of_field]== "type_checkbox" || types[index_of_field]== "type_paypal_checkbox")
|
744 |
+
{
|
745 |
+
choise_select.setAttribute('multiple', 'multiple');
|
746 |
+
choise_select.setAttribute('class', 'multiple_select');
|
747 |
+
}
|
748 |
+
|
749 |
+
for(k=0; k<w_choices_array.length; k++)
|
750 |
+
{
|
751 |
+
var choise_option = document.createElement('option');
|
752 |
+
choise_option.setAttribute("id", "choise_"+num+'_'+k);
|
753 |
+
if(types[index_of_field]== "type_paypal_checkbox")
|
754 |
+
choise_option.setAttribute("value", w_choices_array[k]+'*:*value*:*'+w_choices_price_array[k]);
|
755 |
+
else
|
756 |
+
choise_option.setAttribute("value", w_choices_array[k]);
|
757 |
+
choise_option.innerHTML = w_choices_array[k];
|
758 |
+
|
759 |
+
choise_select.appendChild(choise_option);
|
760 |
+
}
|
761 |
+
|
762 |
+
condition_div.appendChild(choise_select);
|
763 |
+
|
764 |
+
break;
|
765 |
+
|
766 |
+
case "type_address":
|
767 |
+
coutries=["Afghanistan","Albania", "Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombi","Comoros","Congo (Brazzaville)","Congo","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor (Timor Timur)","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia, The","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, North","Korea, South","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepa","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe"];
|
768 |
+
|
769 |
+
var choise_select = document.createElement('select');
|
770 |
+
choise_select.setAttribute("id", "field_value"+num+'_'+m);
|
771 |
+
choise_select.style.cssText = "vertical-align: top; width:200px;";
|
772 |
+
|
773 |
+
for(k=0; k<coutries.length; k++)
|
774 |
+
{
|
775 |
+
var choise_option = document.createElement('option');
|
776 |
+
choise_option.setAttribute("id", "choise_"+num+'_'+k);
|
777 |
+
choise_option.setAttribute("value", coutries[k]);
|
778 |
+
choise_option.innerHTML = coutries[k];
|
779 |
+
|
780 |
+
choise_select.appendChild(choise_option);
|
781 |
+
}
|
782 |
+
|
783 |
+
condition_div.appendChild(choise_select);
|
784 |
+
|
785 |
+
break;
|
786 |
+
}
|
787 |
+
|
788 |
+
condition_div.appendChild(document.createTextNode(' '));
|
789 |
+
|
790 |
+
var img=document.createElement('img');
|
791 |
+
img.setAttribute('src',plugin_url + '/images/delete.png');
|
792 |
+
img.setAttribute('id','delete_condition'+num+'_'+m);
|
793 |
+
img.setAttribute('onClick','delete_field_condition("'+num+'_'+m+'")');
|
794 |
+
img.style.cssText = "vertical-align: top";
|
795 |
+
|
796 |
+
condition_div.appendChild(img);
|
797 |
+
|
798 |
+
document.getElementById('condition'+num).appendChild(condition_div);
|
799 |
+
|
800 |
+
}
|
801 |
+
|
802 |
+
|
803 |
+
function add_condition(ids1, labels1, types1, params1, all_ids, all_labels)
|
804 |
+
{
|
805 |
+
for(i=100; i>=0; i--)
|
806 |
+
{
|
807 |
+
if(document.getElementById('condition'+i))
|
808 |
+
break;
|
809 |
+
}
|
810 |
+
|
811 |
+
num=i+1;
|
812 |
+
|
813 |
+
ids = all_ids.split("@@**@@");
|
814 |
+
labels = all_labels.split("@@**@@");
|
815 |
+
|
816 |
+
var condition_div = document.createElement('div');
|
817 |
+
condition_div.setAttribute("id", "condition"+num);
|
818 |
+
|
819 |
+
var conditional_fields_div = document.createElement('div');
|
820 |
+
conditional_fields_div.setAttribute("id", "conditional_fileds"+num);
|
821 |
+
|
822 |
+
var show_hide_select = document.createElement('select');
|
823 |
+
show_hide_select.setAttribute("id", "show_hide"+num);
|
824 |
+
show_hide_select.setAttribute("name", "show_hide"+num);
|
825 |
+
show_hide_select.style.cssText="width:60px;";
|
826 |
+
|
827 |
+
var show_option = document.createElement('option');
|
828 |
+
show_option.setAttribute("value", "1");
|
829 |
+
show_option.innerHTML = "show";
|
830 |
+
|
831 |
+
var hide_option = document.createElement('option');
|
832 |
+
hide_option.setAttribute("value", "0");
|
833 |
+
hide_option.innerHTML = "hide";
|
834 |
+
|
835 |
+
show_hide_select.appendChild(show_option);
|
836 |
+
show_hide_select.appendChild(hide_option);
|
837 |
+
|
838 |
+
var fields_select = document.createElement('select');
|
839 |
+
fields_select.setAttribute("id", "fields"+num);
|
840 |
+
fields_select.setAttribute("name", "fields"+num);
|
841 |
+
fields_select.style.cssText="width:400px;";
|
842 |
+
|
843 |
+
for(k=0; k<labels.length; k++)
|
844 |
+
{
|
845 |
+
var fields_option = document.createElement('option');
|
846 |
+
fields_option.setAttribute("value", ids[k]);
|
847 |
+
fields_option.innerHTML = labels[k];
|
848 |
+
|
849 |
+
fields_select.appendChild(fields_option);
|
850 |
+
|
851 |
+
}
|
852 |
+
|
853 |
+
var span = document.createElement('span');
|
854 |
+
span.innerHTML = 'if';
|
855 |
+
|
856 |
+
var all_any_select = document.createElement('select');
|
857 |
+
all_any_select.setAttribute("id", "all_any"+num);
|
858 |
+
all_any_select.setAttribute("name", "all_any"+num);
|
859 |
+
all_any_select.style.cssText="width:45px;";
|
860 |
+
|
861 |
+
var all_option = document.createElement('option');
|
862 |
+
all_option.setAttribute("value", "and");
|
863 |
+
all_option.innerHTML = "all";
|
864 |
+
|
865 |
+
var any_option = document.createElement('option');
|
866 |
+
any_option.setAttribute("value", "or");
|
867 |
+
any_option.innerHTML = "any";
|
868 |
+
|
869 |
+
all_any_select.appendChild(all_option);
|
870 |
+
all_any_select.appendChild(any_option);
|
871 |
+
|
872 |
+
var span1 = document.createElement('span');
|
873 |
+
span1.innerHTML = 'of the following match:';
|
874 |
+
|
875 |
+
|
876 |
+
var add_img = document.createElement('img');
|
877 |
+
add_img.setAttribute('src',plugin_url + '/images/add.png');
|
878 |
+
add_img.setAttribute('onClick','add_condition_fields("'+num+'", "'+ids1+'", "'+labels1+'", "'+types1+'", "'+params1+'")');
|
879 |
+
add_img.style.cssText = "cursor: pointer; vertical-align: middle;";
|
880 |
+
|
881 |
+
var delete_img = document.createElement('img');
|
882 |
+
delete_img.setAttribute('src',plugin_url + '/images/page_delete.png');
|
883 |
+
delete_img.setAttribute('onClick','delete_condition("'+num+'")');
|
884 |
+
delete_img.style.cssText = "cursor: pointer; vertical-align: middle;";
|
885 |
+
|
886 |
+
conditional_fields_div.appendChild(show_hide_select);
|
887 |
+
conditional_fields_div.appendChild(document.createTextNode(' '));
|
888 |
+
conditional_fields_div.appendChild(fields_select);
|
889 |
+
conditional_fields_div.appendChild(document.createTextNode(' '));
|
890 |
+
conditional_fields_div.appendChild(span);
|
891 |
+
conditional_fields_div.appendChild(document.createTextNode(' '));
|
892 |
+
conditional_fields_div.appendChild(all_any_select);
|
893 |
+
conditional_fields_div.appendChild(document.createTextNode(' '));
|
894 |
+
conditional_fields_div.appendChild(span1);
|
895 |
+
conditional_fields_div.appendChild(document.createTextNode(' '));
|
896 |
+
conditional_fields_div.appendChild(add_img);
|
897 |
+
conditional_fields_div.appendChild(document.createTextNode(' '));
|
898 |
+
conditional_fields_div.appendChild(delete_img);
|
899 |
+
|
900 |
+
condition_div.appendChild(conditional_fields_div);
|
901 |
+
document.getElementById('conditions_fieldset').appendChild(condition_div);
|
902 |
+
}
|
903 |
+
|
904 |
+
function delete_condition(num)
|
905 |
+
{
|
906 |
+
document.getElementById('conditions_fieldset').removeChild(document.getElementById('condition'+num));
|
907 |
+
}
|
908 |
+
|
909 |
+
function check_isnum_space(e) {
|
910 |
+
var chCode1 = e.which || e.keyCode;
|
911 |
+
if (chCode1 ==32) {
|
912 |
+
return true;
|
913 |
+
}
|
914 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
915 |
+
return false;
|
916 |
+
}
|
917 |
+
return true;
|
918 |
+
}
|
919 |
+
|
920 |
+
function check_isnum_point(e) {
|
921 |
+
var chCode1 = e.which || e.keyCode;
|
922 |
+
if (chCode1 ==46) {
|
923 |
+
return true;
|
924 |
+
}
|
925 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
926 |
+
return false;
|
927 |
+
}
|
928 |
+
return true;
|
929 |
+
}
|
{images → js/images}/form_maker_edit_but.png
RENAMED
File without changes
|
js/main_div_front_end.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
F=2;
|
2 |
var chCode1 = e.which || e.keyCode;
|
3 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
4 |
return false;
|
5 |
if(document.getElementById(num+'_total_element'+form_id)){
|
6 |
var chCode1 = e.which || e.keyCode;
|
7 |
if ( jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39))
|
8 |
return true;
|
9 |
return false;
|
10 |
var chCode1 = e.which || e.keyCode;
|
11 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
12 |
return false;
|
13 |
return false;
|
14 |
var chCode1 = e.which || e.keyCode;
|
15 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
16 |
return false;
|
17 |
return false;
|
18 |
var chCode1 = e.which || e.keyCode;
|
19 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
20 |
return false;
|
21 |
return false;
|
22 |
var chCode1 = e.which || e.keyCode;
|
23 |
if (jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39)) {
|
24 |
return true;
|
25 |
}
|
26 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
27 |
return false;
|
28 |
}
|
29 |
return false;
|
30 |
return false;
|
31 |
return false;
|
32 |
var chCode1 = e.which || e.keyCode;
|
33 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
34 |
return false;
|
35 |
return false;
|
36 |
return false;
|
37 |
return false;
|
38 |
var chCode1 = e.which || e.keyCode;
|
39 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
40 |
return false;
|
41 |
return false;
|
42 |
return false;
|
43 |
return false;
|
44 |
var chCode1 = e.which || e.keyCode;
|
45 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
46 |
return false;
|
47 |
return false;
|
48 |
while (node.firstChild)
|
49 |
node.removeChild(node.firstChild);
|
50 |
|
51 |
}
|
52 |
|
53 |
}
|
54 |
jQuery('.wdform-element-section').each(function() {
|
55 |
var div_parent = document.createElement('div');
|
56 |
div_parent.setAttribute("class", "page_percentage_deactive");
|
57 |
var div = document.createElement('div');
|
58 |
div.setAttribute("id", "div_percentage");
|
59 |
div.setAttribute("class", "page_percentage_active");
|
60 |
div.setAttribute("align", "right");
|
61 |
var div_arrow = document.createElement('div');
|
62 |
div_arrow.setAttribute("class", "wdform_percentage_arrow");
|
63 |
b.setAttribute("class", "wdform_percentage_text");
|
64 |
var curtop = 0;
|
65 |
if (obj.offsetParent) {
|
66 |
do {
|
67 |
curtop += obj.offsetTop;
|
68 |
} while (obj = obj.offsetParent);
|
69 |
return [curtop];
|
70 |
}
|
71 |
addclass = typeof(addclass) != 'undefined' ? addclass : '';
|
72 |
jQuery(select).wrap('<div class="sel-wrap ' + addclass + '"/>');
|
73 |
var sel_options = '';
|
74 |
var selected_option = false;
|
75 |
jQuery(select).children('option').each(function() {
|
76 |
if(jQuery(this).is(':selected')){
|
77 |
selected_option = jQuery(this).index();
|
78 |
}
|
79 |
sel_options = sel_options + '<div class="sel-option" value="' + jQuery(this).val() + '">' + jQuery(this).html() + '</div>';
|
80 |
});
|
81 |
<div class="sel-selected">\
|
82 |
<div class="selected-text">' + jQuery(select).children('option').eq(selected_option).html() + '</div>\
|
83 |
<div class="sel-arraw"></div>\
|
84 |
</div>\
|
85 |
<div class="sel-options">' + sel_options + '</div>\
|
86 |
</div>';
|
87 |
jQuery(select).before(sel_imul);
|
88 |
jQuery('.sel-imul').removeClass('act');
|
89 |
jQuery(this).addClass('act');
|
90 |
if (jQuery(this).children('.sel-options').is(':visible')) {
|
91 |
jQuery('.sel-options').hide();
|
92 |
}
|
93 |
else {
|
94 |
jQuery('.sel-options').hide();
|
95 |
jQuery(this).children('.sel-options').show();
|
96 |
}
|
97 |
var tektext = jQuery(this).html();
|
98 |
jQuery(this).parent('.sel-options').parent('.sel-imul').children('.sel-selected').children('.selected-text').html(tektext);
|
99 |
jQuery(this).parent('.sel-options').children('.sel-option').removeClass('sel-ed');
|
100 |
jQuery(this).addClass('sel-ed');
|
101 |
var tekval = jQuery(this).attr('value');
|
102 |
tekval = typeof(tekval) != 'undefined' ? tekval : tektext;
|
103 |
jQuery(this).parent('.sel-options').parent('.sel-imul').parent('.sel-wrap').children('select').children('option').removeAttr('selected').each(function() {
|
104 |
if (jQuery(this).html() == tektext) {
|
105 |
|
106 |
jQuery(this).attr('selected', 'select');
|
107 |
}
|
108 |
});
|
109 |
selenter = true;
|
110 |
selenter = false;
|
111 |
if (!selenter) {
|
112 |
jQuery('.sel-options').hide();
|
113 |
jQuery('.sel-imul').removeClass('act');
|
114 |
}
|
115 |
if( node.childNodes[ttt] && node.childNodes[ttt].nodeType == '3' && !/\S/.test( node.childNodes[ttt].nodeValue ))
|
|
|
116 |
var chCode1 = e.which || e.keyCode;
|
117 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
118 |
return false;
|
119 |
if(document.getElementById(num+'_total_element'+form_id)){
|
120 |
var chCode1 = e.which || e.keyCode;
|
121 |
if ( jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39))
|
122 |
return true;
|
123 |
return false;
|
124 |
var chCode1 = e.which || e.keyCode;
|
125 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
126 |
return false;
|
127 |
return false;
|
128 |
var chCode1 = e.which || e.keyCode;
|
129 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
130 |
return false;
|
131 |
return false;
|
132 |
var chCode1 = e.which || e.keyCode;
|
133 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
134 |
return false;
|
135 |
return false;
|
136 |
var chCode1 = e.which || e.keyCode;
|
137 |
if (jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39)) {
|
138 |
return true;
|
139 |
}
|
140 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
141 |
return false;
|
142 |
}
|
143 |
return false;
|
144 |
return false;
|
145 |
return false;
|
146 |
var chCode1 = e.which || e.keyCode;
|
147 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
148 |
return false;
|
149 |
return false;
|
150 |
return false;
|
151 |
return false;
|
152 |
var chCode1 = e.which || e.keyCode;
|
153 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
154 |
return false;
|
155 |
return false;
|
156 |
return false;
|
157 |
return false;
|
158 |
var chCode1 = e.which || e.keyCode;
|
159 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
160 |
return false;
|
161 |
return false;
|
162 |
while (node.firstChild)
|
163 |
node.removeChild(node.firstChild);
|
164 |
|
165 |
}
|
166 |
|
167 |
}
|
168 |
jQuery('.wdform-element-section').each(function() {
|
169 |
var div_parent = document.createElement('div');
|
170 |
div_parent.setAttribute("class", "page_percentage_deactive");
|
171 |
var div = document.createElement('div');
|
172 |
div.setAttribute("id", "div_percentage");
|
173 |
div.setAttribute("class", "page_percentage_active");
|
174 |
div.setAttribute("align", "right");
|
175 |
var div_arrow = document.createElement('div');
|
176 |
div_arrow.setAttribute("class", "wdform_percentage_arrow");
|
177 |
b.setAttribute("class", "wdform_percentage_text");
|
178 |
var curtop = 0;
|
179 |
if (obj.offsetParent) {
|
180 |
do {
|
181 |
curtop += obj.offsetTop;
|
182 |
} while (obj = obj.offsetParent);
|
183 |
return [curtop];
|
184 |
}
|
185 |
addclass = typeof(addclass) != 'undefined' ? addclass : '';
|
186 |
jQuery(select).wrap('<div class="sel-wrap ' + addclass + '"/>');
|
187 |
var sel_options = '';
|
188 |
var selected_option = false;
|
189 |
jQuery(select).children('option').each(function() {
|
190 |
if(jQuery(this).is(':selected')){
|
191 |
selected_option = jQuery(this).index();
|
192 |
}
|
193 |
sel_options = sel_options + '<div class="sel-option" value="' + jQuery(this).val() + '">' + jQuery(this).html() + '</div>';
|
194 |
});
|
195 |
<div class="sel-selected">\
|
196 |
<div class="selected-text">' + jQuery(select).children('option').eq(selected_option).html() + '</div>\
|
197 |
<div class="sel-arraw"></div>\
|
198 |
</div>\
|
199 |
<div class="sel-options">' + sel_options + '</div>\
|
200 |
</div>';
|
201 |
jQuery(select).before(sel_imul);
|
202 |
jQuery('.sel-imul').removeClass('act');
|
203 |
jQuery(this).addClass('act');
|
204 |
if (jQuery(this).children('.sel-options').is(':visible')) {
|
205 |
jQuery('.sel-options').hide();
|
206 |
}
|
207 |
else {
|
208 |
jQuery('.sel-options').hide();
|
209 |
jQuery(this).children('.sel-options').show();
|
210 |
}
|
211 |
var tektext = jQuery(this).html();
|
212 |
jQuery(this).parent('.sel-options').parent('.sel-imul').children('.sel-selected').children('.selected-text').html(tektext);
|
213 |
jQuery(this).parent('.sel-options').children('.sel-option').removeClass('sel-ed');
|
214 |
jQuery(this).addClass('sel-ed');
|
215 |
var tekval = jQuery(this).attr('value');
|
216 |
tekval = typeof(tekval) != 'undefined' ? tekval : tektext;
|
217 |
jQuery(this).parent('.sel-options').parent('.sel-imul').parent('.sel-wrap').children('select').children('option').removeAttr('selected').each(function() {
|
218 |
if (jQuery(this).html() == tektext) {
|
219 |
|
220 |
jQuery(this).attr('selected', 'select');
|
221 |
}
|
222 |
});
|
223 |
selenter = true;
|
224 |
selenter = false;
|
225 |
if (!selenter) {
|
226 |
jQuery('.sel-options').hide();
|
227 |
jQuery('.sel-imul').removeClass('act');
|
228 |
}
|
229 |
if( node.childNodes[ttt] && node.childNodes[ttt].nodeType == '3' && !/\S/.test( node.childNodes[ttt].nodeValue ))
|
|
|
1 |
var chCode1 = e.which || e.keyCode;
|
2 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
3 |
return false;
|
4 |
if(document.getElementById(num+'_total_element'+form_id)){
|
5 |
var chCode1 = e.which || e.keyCode;
|
6 |
if ( jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39))
|
7 |
return true;
|
8 |
return false;
|
9 |
var chCode1 = e.which || e.keyCode;
|
10 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
11 |
return false;
|
12 |
return false;
|
13 |
var chCode1 = e.which || e.keyCode;
|
14 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
15 |
return false;
|
16 |
return false;
|
17 |
var chCode1 = e.which || e.keyCode;
|
18 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
19 |
return false;
|
20 |
return false;
|
21 |
var chCode1 = e.which || e.keyCode;
|
22 |
if (jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39)) {
|
23 |
return true;
|
24 |
}
|
25 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
26 |
return false;
|
27 |
}
|
28 |
return false;
|
29 |
return false;
|
30 |
return false;
|
31 |
var chCode1 = e.which || e.keyCode;
|
32 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
33 |
return false;
|
34 |
return false;
|
35 |
return false;
|
36 |
return false;
|
37 |
var chCode1 = e.which || e.keyCode;
|
38 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
39 |
return false;
|
40 |
return false;
|
41 |
return false;
|
42 |
return false;
|
43 |
var chCode1 = e.which || e.keyCode;
|
44 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
45 |
return false;
|
46 |
return false;
|
47 |
while (node.firstChild)
|
48 |
node.removeChild(node.firstChild);
|
49 |
|
50 |
}
|
51 |
|
52 |
}
|
53 |
jQuery('.wdform-element-section').each(function() {
|
54 |
var div_parent = document.createElement('div');
|
55 |
div_parent.setAttribute("class", "page_percentage_deactive");
|
56 |
var div = document.createElement('div');
|
57 |
div.setAttribute("id", "div_percentage");
|
58 |
div.setAttribute("class", "page_percentage_active");
|
59 |
div.setAttribute("align", "right");
|
60 |
var div_arrow = document.createElement('div');
|
61 |
div_arrow.setAttribute("class", "wdform_percentage_arrow");
|
62 |
b.setAttribute("class", "wdform_percentage_text");
|
63 |
var curtop = 0;
|
64 |
if (obj.offsetParent) {
|
65 |
do {
|
66 |
curtop += obj.offsetTop;
|
67 |
} while (obj = obj.offsetParent);
|
68 |
return [curtop];
|
69 |
}
|
70 |
addclass = typeof(addclass) != 'undefined' ? addclass : '';
|
71 |
jQuery(select).wrap('<div class="sel-wrap ' + addclass + '"/>');
|
72 |
var sel_options = '';
|
73 |
var selected_option = false;
|
74 |
jQuery(select).children('option').each(function() {
|
75 |
if(jQuery(this).is(':selected')){
|
76 |
selected_option = jQuery(this).index();
|
77 |
}
|
78 |
sel_options = sel_options + '<div class="sel-option" value="' + jQuery(this).val() + '">' + jQuery(this).html() + '</div>';
|
79 |
});
|
80 |
<div class="sel-selected">\
|
81 |
<div class="selected-text">' + jQuery(select).children('option').eq(selected_option).html() + '</div>\
|
82 |
<div class="sel-arraw"></div>\
|
83 |
</div>\
|
84 |
<div class="sel-options">' + sel_options + '</div>\
|
85 |
</div>';
|
86 |
jQuery(select).before(sel_imul);
|
87 |
jQuery('.sel-imul').removeClass('act');
|
88 |
jQuery(this).addClass('act');
|
89 |
if (jQuery(this).children('.sel-options').is(':visible')) {
|
90 |
jQuery('.sel-options').hide();
|
91 |
}
|
92 |
else {
|
93 |
jQuery('.sel-options').hide();
|
94 |
jQuery(this).children('.sel-options').show();
|
95 |
}
|
96 |
var tektext = jQuery(this).html();
|
97 |
jQuery(this).parent('.sel-options').parent('.sel-imul').children('.sel-selected').children('.selected-text').html(tektext);
|
98 |
jQuery(this).parent('.sel-options').children('.sel-option').removeClass('sel-ed');
|
99 |
jQuery(this).addClass('sel-ed');
|
100 |
var tekval = jQuery(this).attr('value');
|
101 |
tekval = typeof(tekval) != 'undefined' ? tekval : tektext;
|
102 |
jQuery(this).parent('.sel-options').parent('.sel-imul').parent('.sel-wrap').children('select').children('option').removeAttr('selected').each(function() {
|
103 |
if (jQuery(this).html() == tektext) {
|
104 |
|
105 |
jQuery(this).attr('selected', 'select');
|
106 |
}
|
107 |
});
|
108 |
selenter = true;
|
109 |
selenter = false;
|
110 |
if (!selenter) {
|
111 |
jQuery('.sel-options').hide();
|
112 |
jQuery('.sel-imul').removeClass('act');
|
113 |
}
|
114 |
if( node.childNodes[ttt] && node.childNodes[ttt].nodeType == '3' && !/\S/.test( node.childNodes[ttt].nodeValue ))
|
115 |
+
F=2;
|
116 |
var chCode1 = e.which || e.keyCode;
|
117 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
118 |
return false;
|
119 |
if(document.getElementById(num+'_total_element'+form_id)){
|
120 |
var chCode1 = e.which || e.keyCode;
|
121 |
if ( jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39))
|
122 |
return true;
|
123 |
return false;
|
124 |
var chCode1 = e.which || e.keyCode;
|
125 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
126 |
return false;
|
127 |
return false;
|
128 |
var chCode1 = e.which || e.keyCode;
|
129 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
130 |
return false;
|
131 |
return false;
|
132 |
var chCode1 = e.which || e.keyCode;
|
133 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
134 |
return false;
|
135 |
return false;
|
136 |
var chCode1 = e.which || e.keyCode;
|
137 |
if (jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39)) {
|
138 |
return true;
|
139 |
}
|
140 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
141 |
return false;
|
142 |
}
|
143 |
return false;
|
144 |
return false;
|
145 |
return false;
|
146 |
var chCode1 = e.which || e.keyCode;
|
147 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
148 |
return false;
|
149 |
return false;
|
150 |
return false;
|
151 |
return false;
|
152 |
var chCode1 = e.which || e.keyCode;
|
153 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
154 |
return false;
|
155 |
return false;
|
156 |
return false;
|
157 |
return false;
|
158 |
var chCode1 = e.which || e.keyCode;
|
159 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
160 |
return false;
|
161 |
return false;
|
162 |
while (node.firstChild)
|
163 |
node.removeChild(node.firstChild);
|
164 |
|
165 |
}
|
166 |
|
167 |
}
|
168 |
jQuery('.wdform-element-section').each(function() {
|
169 |
var div_parent = document.createElement('div');
|
170 |
div_parent.setAttribute("class", "page_percentage_deactive");
|
171 |
var div = document.createElement('div');
|
172 |
div.setAttribute("id", "div_percentage");
|
173 |
div.setAttribute("class", "page_percentage_active");
|
174 |
div.setAttribute("align", "right");
|
175 |
var div_arrow = document.createElement('div');
|
176 |
div_arrow.setAttribute("class", "wdform_percentage_arrow");
|
177 |
b.setAttribute("class", "wdform_percentage_text");
|
178 |
var curtop = 0;
|
179 |
if (obj.offsetParent) {
|
180 |
do {
|
181 |
curtop += obj.offsetTop;
|
182 |
} while (obj = obj.offsetParent);
|
183 |
return [curtop];
|
184 |
}
|
185 |
addclass = typeof(addclass) != 'undefined' ? addclass : '';
|
186 |
jQuery(select).wrap('<div class="sel-wrap ' + addclass + '"/>');
|
187 |
var sel_options = '';
|
188 |
var selected_option = false;
|
189 |
jQuery(select).children('option').each(function() {
|
190 |
if(jQuery(this).is(':selected')){
|
191 |
selected_option = jQuery(this).index();
|
192 |
}
|
193 |
sel_options = sel_options + '<div class="sel-option" value="' + jQuery(this).val() + '">' + jQuery(this).html() + '</div>';
|
194 |
});
|
195 |
<div class="sel-selected">\
|
196 |
<div class="selected-text">' + jQuery(select).children('option').eq(selected_option).html() + '</div>\
|
197 |
<div class="sel-arraw"></div>\
|
198 |
</div>\
|
199 |
<div class="sel-options">' + sel_options + '</div>\
|
200 |
</div>';
|
201 |
jQuery(select).before(sel_imul);
|
202 |
jQuery('.sel-imul').removeClass('act');
|
203 |
jQuery(this).addClass('act');
|
204 |
if (jQuery(this).children('.sel-options').is(':visible')) {
|
205 |
jQuery('.sel-options').hide();
|
206 |
}
|
207 |
else {
|
208 |
jQuery('.sel-options').hide();
|
209 |
jQuery(this).children('.sel-options').show();
|
210 |
}
|
211 |
var tektext = jQuery(this).html();
|
212 |
jQuery(this).parent('.sel-options').parent('.sel-imul').children('.sel-selected').children('.selected-text').html(tektext);
|
213 |
jQuery(this).parent('.sel-options').children('.sel-option').removeClass('sel-ed');
|
214 |
jQuery(this).addClass('sel-ed');
|
215 |
var tekval = jQuery(this).attr('value');
|
216 |
tekval = typeof(tekval) != 'undefined' ? tekval : tektext;
|
217 |
jQuery(this).parent('.sel-options').parent('.sel-imul').parent('.sel-wrap').children('select').children('option').removeAttr('selected').each(function() {
|
218 |
if (jQuery(this).html() == tektext) {
|
219 |
|
220 |
jQuery(this).attr('selected', 'select');
|
221 |
}
|
222 |
});
|
223 |
selenter = true;
|
224 |
selenter = false;
|
225 |
if (!selenter) {
|
226 |
jQuery('.sel-options').hide();
|
227 |
jQuery('.sel-imul').removeClass('act');
|
228 |
}
|
229 |
if( node.childNodes[ttt] && node.childNodes[ttt].nodeType == '3' && !/\S/.test( node.childNodes[ttt].nodeValue ))
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-form.html
|
|
4 |
Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, Formular, formulario
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
4 |
Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, Formular, formulario
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9
|
7 |
+
Stable tag: 1.7.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|