Version Description
- Plugin submitted to http://wordpress.org for review and approval
- Plugin committed to http://wordpress.org plugin repository
=
Download this release
Release Info
Developer | Access Keys |
Plugin | Contact Form for WordPress – Ultimate Form Builder Lite |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- classes/ufbl-lib.php +423 -0
- classes/ufbl-model.php +296 -0
- css/backend.css +687 -0
- css/frontend.css +1165 -0
- css/jquery.selectbox.css +110 -0
- images/ajax-loader-bkp.gif +0 -0
- images/ajax-loader-delete.gif +0 -0
- images/ajax-loader-entry.gif +0 -0
- images/ajax-loader.gif +0 -0
- images/check-box-bod-border.png +0 -0
- images/check-box-checked-bold-border.png +0 -0
- images/check-box-checked.png +0 -0
- images/check-box.png +0 -0
- images/checked-radio-bold-border.png +0 -0
- images/checked-radio.png +0 -0
- images/customize.png +0 -0
- images/form-icon.png +0 -0
- images/mail.png +0 -0
- images/option-angle.png +0 -0
- images/plugin.png +0 -0
- images/previews/default-template.jpg +0 -0
- images/previews/template-1.jpg +0 -0
- images/previews/template-2.jpg +0 -0
- images/previews/template-3.jpg +0 -0
- images/previews/template-4.png +0 -0
- images/select-icons.png +0 -0
- images/theme.png +0 -0
- images/uncheck-radio-bold-border.png +0 -0
- images/uncheck-radio.png +0 -0
- inc/cores/activation.php +71 -0
- inc/cores/save-form.php +139 -0
- inc/cores/shortcode.php +6 -0
- inc/views/backend/about.php +37 -0
- inc/views/backend/boxes/display-settings.php +73 -0
- inc/views/backend/boxes/email-settings.php +55 -0
- inc/views/backend/boxes/form-builder-main.php +887 -0
- inc/views/backend/boxes/form-fields-html.php +797 -0
- inc/views/backend/entry-detail.php +56 -0
- inc/views/backend/form-builder.php +54 -0
- inc/views/backend/form-entries-list.php +148 -0
- inc/views/backend/form-list.php +146 -0
- inc/views/backend/header.php +4 -0
- inc/views/backend/how-to-use.php +48 -0
- inc/views/backend/new-form.php +17 -0
- inc/views/frontend/front-form.php +203 -0
- inc/views/frontend/preview-form.php +27 -0
- js/backend.js +484 -0
- js/frontend.js +92 -0
- js/jquery.selectbox-0.2.min.js +9 -0
- readme.txt +103 -0
- ultimate-form-builder-lite.php +448 -0
classes/ufbl-lib.php
ADDED
@@ -0,0 +1,423 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
4 |
+
/**
|
5 |
+
* UFBL Library Class
|
6 |
+
* Class with all the necessary functions
|
7 |
+
*/
|
8 |
+
if ( !class_exists( 'UFBL_Lib' ) ) {
|
9 |
+
|
10 |
+
class UFBL_Lib {
|
11 |
+
|
12 |
+
/**
|
13 |
+
*
|
14 |
+
* @param string $view_file
|
15 |
+
* @returns void
|
16 |
+
*/
|
17 |
+
public static function load_view( $view_file, $variable_array = array() ) {
|
18 |
+
if ( !empty( $variable_array ) && is_array( $variable_array ) ) {
|
19 |
+
/**
|
20 |
+
* Creating a variable for each key
|
21 |
+
*/
|
22 |
+
foreach ( $variable_array as $key => $val ) {
|
23 |
+
$$key = $val;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
if ( file_exists( UFBL_PATH . 'inc/views/' . $view_file . '.php' ) ) {
|
27 |
+
include UFBL_PATH . 'inc/views/' . $view_file . '.php';
|
28 |
+
} else {
|
29 |
+
echo UFBL_PATH . 'inc/views/' . $view_file . '.php File Not found';
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
*
|
35 |
+
* @param string $core_file
|
36 |
+
* @return void
|
37 |
+
*/
|
38 |
+
public static function load_core( $core_file, $variable_array = array() ) {
|
39 |
+
if ( !empty( $variable_array ) && is_array( $variable_array ) ) {
|
40 |
+
/**
|
41 |
+
* Creating a variable for each key
|
42 |
+
*/
|
43 |
+
foreach ( $variable_array as $key => $val ) {
|
44 |
+
$$key = $val;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
if ( file_exists( UFBL_PATH . 'inc/cores/' . $core_file . '.php' ) ) {
|
48 |
+
include UFBL_PATH . 'inc/cores/' . $core_file . '.php';
|
49 |
+
} else {
|
50 |
+
echo UFBL_PATH . 'inc/cores/' . $core_file . '.php File Not Found';
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
*
|
56 |
+
* @param array $array
|
57 |
+
* @return void
|
58 |
+
*/
|
59 |
+
public static function print_array( $array ) {
|
60 |
+
echo "<pre>";
|
61 |
+
print_r( $array );
|
62 |
+
echo "</pre>";
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Returns Form default values
|
67 |
+
* @return array
|
68 |
+
*/
|
69 |
+
public static function get_default_detail() {
|
70 |
+
$default_detail = array();
|
71 |
+
$default_detail['field_data'] = array();
|
72 |
+
$default_detail['form_design'] = array( 'plugin_style' => 1, 'form_width' => '', 'form_template' => 'ufbl-default-template' );
|
73 |
+
$default_detail['email_settings'] = array( 'email_reciever' => array( get_option( 'admin_email' ) ), 'from_name' => '', 'from_email' => '', 'from_subject' => '' );
|
74 |
+
return $default_detail;
|
75 |
+
}
|
76 |
+
|
77 |
+
public static function do_form_process() {
|
78 |
+
$form_data = array();
|
79 |
+
foreach ( $_POST['form_data'] as $val ) {
|
80 |
+
if ( strpos( $val['name'], '[]' ) !== false ) {
|
81 |
+
$form_data_name = str_replace( '[]', '', $val['name'] );
|
82 |
+
if ( !isset( $form_data[$form_data_name] ) ) {
|
83 |
+
$form_data[$form_data_name] = array();
|
84 |
+
}
|
85 |
+
$form_data[$form_data_name][] = $val['value'];
|
86 |
+
} else {
|
87 |
+
|
88 |
+
$form_data[$val['name']] = $val['value'];
|
89 |
+
}
|
90 |
+
}
|
91 |
+
$form_id = sanitize_text_field( $form_data['form_id'] );
|
92 |
+
$form_temp_data = $form_data;
|
93 |
+
$form_row = UFBL_Model::get_form_detail( $form_id );
|
94 |
+
$form_detail = maybe_unserialize( $form_row['form_detail'] );
|
95 |
+
$field_data = $form_detail['field_data'];
|
96 |
+
//self::print_array( $form_data );
|
97 |
+
$form_response = array();
|
98 |
+
$form_response['error_keys'] = array();
|
99 |
+
$error_flag = 0;
|
100 |
+
$email_reference_array = array();
|
101 |
+
|
102 |
+
foreach ( $field_data as $key => $value ) {
|
103 |
+
|
104 |
+
switch ( $field_data[$key]['field_type'] ) {
|
105 |
+
case 'textfield':
|
106 |
+
$val = isset( $form_data[$key] ) ? sanitize_text_field( $form_data[$key] ) : '';
|
107 |
+
if ( isset( $field_data[$key]['required'] ) && $field_data[$key]['required'] == 1 && $val == '' ) {
|
108 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'This field is required', UFBL_TD );
|
109 |
+
$error_flag = 1;
|
110 |
+
$form_response['error_keys'][$key] = $error_message;
|
111 |
+
} else {
|
112 |
+
if ( $field_data[$key]['max_chars'] != '' && strlen( $val ) > $field_data[$key]['max_chars'] ) {
|
113 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Characters exceeded.Max characters allowed is :', UFBL_TD ) . $field_data[$key]['max_chars'];
|
114 |
+
$error_flag = 1;
|
115 |
+
$form_response['error_keys'][$key] = $error_message;
|
116 |
+
}
|
117 |
+
if ( $field_data[$key]['min_chars'] != '' && strlen( $val ) < $field_data[$key]['min_chars'] ) {
|
118 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Mininum characters required is :', UFBL_TD ) . $field_data[$key]['min_chars'];
|
119 |
+
$error_flag = 1;
|
120 |
+
$form_response['error_keys'][$key] = $error_message;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
if ( $error_flag == 0 ) {
|
124 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
125 |
+
}
|
126 |
+
break;
|
127 |
+
case 'textarea':
|
128 |
+
$val = isset( $form_data[$key] ) ? sanitize_text_field( $form_data[$key] ) : '';
|
129 |
+
if ( isset( $field_data[$key]['required'] ) && $field_data[$key]['required'] == 1 && $val == '' ) {
|
130 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'This field is required', UFBL_TD );
|
131 |
+
$error_flag = 1;
|
132 |
+
$form_response['error_keys'][$key] = $error_message;
|
133 |
+
} else {
|
134 |
+
if ( $field_data[$key]['max_chars'] != '' && strlen( $val ) > $field_data[$key]['max_chars'] ) {
|
135 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Characters exceeded.Max characters allowed is :', UFBL_TD ) . $field_data[$key]['max_chars'];
|
136 |
+
$error_flag = 1;
|
137 |
+
$form_response['error_keys'][$key] = $error_message;
|
138 |
+
}
|
139 |
+
if ( $field_data[$key]['min_chars'] != '' && strlen( $val ) < $field_data[$key]['min_chars'] ) {
|
140 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Mininum characters required is :', UFBL_TD ) . $field_data[$key]['min_chars'];
|
141 |
+
$error_flag = 1;
|
142 |
+
$form_response['error_keys'][$key] = $error_message;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
if ( $error_flag == 0 ) {
|
146 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
147 |
+
}
|
148 |
+
break;
|
149 |
+
case 'email':
|
150 |
+
$val = isset( $form_data[$key] ) ? sanitize_text_field( $form_data[$key] ) : '';
|
151 |
+
if ( isset( $field_data[$key]['required'] ) && $field_data[$key]['required'] == 1 && $val == '' ) {
|
152 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'This field is required', UFBL_TD );
|
153 |
+
$error_flag = 1;
|
154 |
+
$form_response['error_keys'][$key] = $error_message;
|
155 |
+
} else {
|
156 |
+
if ( !is_email( $val ) && $val != '' ) {
|
157 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Please enter the valid email address.', UFBL_TD );
|
158 |
+
$error_flag = 1;
|
159 |
+
$form_response['error_keys'][$key] = $error_message;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
if ( $error_flag == 0 ) {
|
163 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
164 |
+
}
|
165 |
+
break;
|
166 |
+
case 'checkbox':
|
167 |
+
if ( isset( $form_data[$key] ) ) {
|
168 |
+
$val = array_map( 'sanitize_text_field', $form_data[$key] );
|
169 |
+
$val = implode( ',', $val );
|
170 |
+
} else {
|
171 |
+
$val = '';
|
172 |
+
}
|
173 |
+
|
174 |
+
if ( isset( $field_data[$key]['required'] ) && $field_data[$key]['required'] == 1 && $val == '' ) {
|
175 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'This field is required', UFBL_TD );
|
176 |
+
$error_flag = 1;
|
177 |
+
$form_response['error_keys'][$key] = $error_message;
|
178 |
+
}
|
179 |
+
if ( $error_flag == 0 ) {
|
180 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
181 |
+
}
|
182 |
+
break;
|
183 |
+
case 'radio':
|
184 |
+
$val = isset( $form_data[$key] ) ? sanitize_text_field( $form_data[$key] ) : '';
|
185 |
+
if ( isset( $field_data[$key]['required'] ) && $field_data[$key]['required'] == 1 && $val == '' ) {
|
186 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'This field is required', UFBL_TD );
|
187 |
+
$error_flag = 1;
|
188 |
+
$form_response['error_keys'][$key] = $error_message;
|
189 |
+
}
|
190 |
+
if ( $error_flag == 0 ) {
|
191 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
192 |
+
}
|
193 |
+
if ( $error_flag == 0 ) {
|
194 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
195 |
+
}
|
196 |
+
break;
|
197 |
+
case 'dropdown':
|
198 |
+
if ( isset( $form_data[$key] ) ) {
|
199 |
+
|
200 |
+
if ( is_array( $val ) ) {
|
201 |
+
$val = array_map( 'sanitize_text_field', $form_data[$key] );
|
202 |
+
$val = implode( ',', $val );
|
203 |
+
} else {
|
204 |
+
$val = sanitize_text_field( $form_data[$key] );
|
205 |
+
}
|
206 |
+
} else {
|
207 |
+
$val = '';
|
208 |
+
}
|
209 |
+
|
210 |
+
if ( isset( $field_data[$key]['required'] ) && $field_data[$key]['required'] == 1 && $val == '' ) {
|
211 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'This field is required', UFBL_TD );
|
212 |
+
$error_flag = 1;
|
213 |
+
$form_response['error_keys'][$key] = $error_message;
|
214 |
+
}
|
215 |
+
if ( $error_flag == 0 ) {
|
216 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
217 |
+
}
|
218 |
+
break;
|
219 |
+
case 'password':
|
220 |
+
$val = isset( $form_data[$key] ) ? $form_data[$key] : '';
|
221 |
+
if ( isset( $field_data[$key]['required'] ) && $field_data[$key]['required'] == 1 && $val == '' ) {
|
222 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'This field is required', UFBL_TD );
|
223 |
+
$error_flag = 1;
|
224 |
+
$form_response['error_keys'][$key] = $error_message;
|
225 |
+
} else {
|
226 |
+
if ( $field_data[$key]['max_chars'] != '' && strlen( $val ) > $field_data[$key]['max_chars'] ) {
|
227 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Characters exceeded.Max characters allowed is :', UFBL_TD ) . $field_data[$key]['max_chars'];
|
228 |
+
$error_flag = 1;
|
229 |
+
$form_response['error_keys'][$key] = $error_message;
|
230 |
+
}
|
231 |
+
if ( $field_data[$key]['min_chars'] != '' && strlen( $val ) < $field_data[$key]['min_chars'] ) {
|
232 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Mininum characters required is :', UFBL_TD ) . $field_data[$key]['min_chars'];
|
233 |
+
$error_flag = 1;
|
234 |
+
$form_response['error_keys'][$key] = $error_message;
|
235 |
+
}
|
236 |
+
}
|
237 |
+
if ( $error_flag == 0 ) {
|
238 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
239 |
+
}
|
240 |
+
break;
|
241 |
+
case 'number':
|
242 |
+
$val = isset( $form_data[$key] ) ? sanitize_text_field( $form_data[$key] ) : '';
|
243 |
+
if ( isset( $field_data[$key]['required'] ) && $field_data[$key]['required'] == 1 && $val == '' ) {
|
244 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'This field is required', UFBL_TD );
|
245 |
+
$error_flag = 1;
|
246 |
+
$form_response['error_keys'][$key] = $error_message;
|
247 |
+
} else {
|
248 |
+
if ( !is_numeric( $val ) ) {
|
249 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Only numbers allowed.', UFBL_TD );
|
250 |
+
$error_flag = 1;
|
251 |
+
$form_response['error_keys'][$key] = $error_message;
|
252 |
+
} else {
|
253 |
+
if ( $field_data[$key]['max_value'] != '' && intval( $val ) > $field_data[$key]['max_value'] ) {
|
254 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Characters exceeded.Max characters allowed is :', UFBL_TD ) . $field_data[$key]['max_value'];
|
255 |
+
$error_flag = 1;
|
256 |
+
$form_response['error_keys'][$key] = $error_message;
|
257 |
+
}
|
258 |
+
if ( $field_data[$key]['min_value'] != '' && intval( $val ) < $field_data[$key]['min_value'] ) {
|
259 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Mininum characters required is :', UFBL_TD ) . $field_data[$key]['min_value'];
|
260 |
+
$error_flag = 1;
|
261 |
+
$form_response['error_keys'][$key] = $error_message;
|
262 |
+
}
|
263 |
+
}
|
264 |
+
}
|
265 |
+
if ( $error_flag == 0 ) {
|
266 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
267 |
+
}
|
268 |
+
break;
|
269 |
+
case 'hidden':
|
270 |
+
$val = isset( $form_data[$key] ) ? sanitize_text_field( $form_data[$key] ) : '';
|
271 |
+
if ( $error_flag == 0 ) {
|
272 |
+
$email_reference_array[$key] = array( 'label' => $field_data[$key]['field_label'], 'value' => $val );
|
273 |
+
}
|
274 |
+
break;
|
275 |
+
case 'captcha':
|
276 |
+
if ( $value['captcha_type'] == 'mathematical' ) {
|
277 |
+
$val = isset( $form_data[$key] ) ? sanitize_text_field( $form_data[$key] ) : 0;
|
278 |
+
if ( $val != 0 ) {
|
279 |
+
$num1_key = $key . '_num_1';
|
280 |
+
$num2_key = $key . '_num_2';
|
281 |
+
$num1 = $form_data[$num1_key];
|
282 |
+
$num2 = $form_data[$num2_key];
|
283 |
+
$result = $num1 + $num2;
|
284 |
+
if ( $result != $val ) {
|
285 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Please enter the correct sum.', UFBL_TD );
|
286 |
+
$error_flag = 1;
|
287 |
+
$form_response['error_keys'][$key] = $error_message;
|
288 |
+
}
|
289 |
+
} else {
|
290 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Please enter the correct sum.', UFBL_TD );
|
291 |
+
$error_flag = 1;
|
292 |
+
$form_response['error_keys'][$key] = $error_message;
|
293 |
+
}
|
294 |
+
} else {
|
295 |
+
$captcha = sanitize_text_field( $_POST['captchaResponse'] ); // get the captchaResponse parameter sent from our ajax
|
296 |
+
if ( !$captcha ) {
|
297 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Please check the captcha.', UFBL_TD );
|
298 |
+
$error_flag = 1;
|
299 |
+
$form_response['error_keys'][$key] = $error_message;
|
300 |
+
} else {
|
301 |
+
$secret_key = $value['secret_key'];
|
302 |
+
$response_html = wp_remote_get( "https://www.google.com/recaptcha/api/siteverify?secret=" . $secret_key . "&response=" . $captcha );
|
303 |
+
//self::print_array($response_html);
|
304 |
+
$response = json_decode( $response_html['body'] );
|
305 |
+
if ( $response->success == false ) {
|
306 |
+
$error_message = (isset( $field_data[$key]['error_message'] ) && $field_data[$key]['error_message'] != '') ? $field_data[$key]['error_message'] : __( 'Please check the captcha.', UFBL_TD );
|
307 |
+
$error_flag = 1;
|
308 |
+
$form_response['error_keys'][$key] = $error_message;
|
309 |
+
}
|
310 |
+
}
|
311 |
+
}
|
312 |
+
break;
|
313 |
+
default:
|
314 |
+
break;
|
315 |
+
}//switch close
|
316 |
+
}//foreach form data close
|
317 |
+
$form_response['error_flag'] = $error_flag;
|
318 |
+
$form_submission_message = (isset( $form_detail['form_design']['form_submission_message'] ) && $form_detail['form_design']['form_submission_message'] != '') ? esc_attr( $form_detail['form_design']['form_submission_message'] ) : __( 'Form submitted successfully.', UFBL_TD );
|
319 |
+
$form_error_message = ( isset( $form_detail['form_design']['form_error_message'] ) && $form_detail['form_design']['form_error_message'] != '') ? esc_attr( $form_detail['form_design']['form_error_message'] ) : __( 'Validation Errors Occured.Please check and submit the form again.', UFBL_TD );
|
320 |
+
$form_response['response_message'] = ($error_flag == 1) ? $form_error_message : $form_submission_message;
|
321 |
+
if ( $error_flag == 0 ) {
|
322 |
+
self::do_email_process( $email_reference_array, $form_row );
|
323 |
+
UFBL_Model::save_to_db( $form_data );
|
324 |
+
}
|
325 |
+
echo json_encode( $form_response );
|
326 |
+
die();
|
327 |
+
}
|
328 |
+
|
329 |
+
/**
|
330 |
+
* Do the email sending process after form validation
|
331 |
+
* return void
|
332 |
+
* @param array $form_data
|
333 |
+
*/
|
334 |
+
public static function do_email_process( $email_reference_array = array(), $form_row = array() ) {
|
335 |
+
if ( !empty( $form_row ) && !empty( $email_reference_array ) ) {
|
336 |
+
$form_title = $form_row['form_title'];
|
337 |
+
$form_detail = maybe_unserialize( $form_row['form_detail'] );
|
338 |
+
$field_data = $form_detail['field_data'];
|
339 |
+
$fields_html = '';
|
340 |
+
$count = 0;
|
341 |
+
foreach ( $email_reference_array as $key => $val ) {
|
342 |
+
$field_label = ($field_data[$key]['field_label'] != '') ? $field_data[$key]['field_label'] : __( 'Untitled', UFBL_TD ) . ' ' . $field_data[$key]['field_type'];
|
343 |
+
$count++;
|
344 |
+
if ( $count % 2 == 0 ) {
|
345 |
+
$fields_html .= '<tr style="background-color:#eee;"><td style="width:150px;border:1px solid #D54E21;" ><strong>' . $field_label . ':</strong></td> <td style="border:1px solid #D54E21;">' . $val['value'] . '</td><tr>';
|
346 |
+
} else {
|
347 |
+
$fields_html .= '<tr><td style="width:150px;border:1px solid #D54E21;" ><strong>' . $field_label . ':</strong></td> <td style="border:1px solid #D54E21;">' . $val['value'] . '</td><tr>';
|
348 |
+
}
|
349 |
+
}
|
350 |
+
$form_html = '<html>
|
351 |
+
<head><title></title></head>
|
352 |
+
<body>
|
353 |
+
<table style="border:1px solid #D54E21" cellspacing="0" cellpadding="10" align="center" style="width:600px;">
|
354 |
+
<tr><td colspan="2" style="text-align:center;"><h2>' . $form_title . '</h2></td></tr>
|
355 |
+
' .
|
356 |
+
$fields_html
|
357 |
+
. '</table></body>
|
358 |
+
</html>';
|
359 |
+
$site_url = str_replace( 'http://', '', site_url() );
|
360 |
+
$site_url = str_replace( 'https://', '', $site_url );
|
361 |
+
$email_subject = ($form_detail['email_settings']['from_subject'] != '') ? esc_attr( $form_detail['email_settings']['from_subject'] ) : __( 'New Form Submission', UFBL_TD );
|
362 |
+
$from_name = ($form_detail['email_settings']['from_name'] != '') ? esc_attr( $form_detail['email_settings']['from_name'] ) : __( 'No Name', UFBL_TD );
|
363 |
+
$from_email = ($form_detail['email_settings']['from_email'] != '') ? esc_attr( $form_detail['email_settings']['from_email'] ) : 'noreply@' . $site_url;
|
364 |
+
$admin_email = get_option( 'admin_email' );
|
365 |
+
$email_recievers = $form_detail['email_settings']['email_reciever'];
|
366 |
+
$headers = 'Content-type: text/html' . "\r\n" . 'From: ' . $from_name . '<' . $from_email . '>' . "\r\n" .
|
367 |
+
'Reply-To: ' . $from_email . "\r\n" .
|
368 |
+
'X-Mailer: PHP/' . phpversion();
|
369 |
+
//$mail = wp_mail( $from_em, $form_html, $fields_html, $headers );
|
370 |
+
|
371 |
+
foreach ( $email_recievers as $email_reciever ) {
|
372 |
+
$to_email = ($email_reciever == '') ? $admin_email : esc_attr( $email_reciever );
|
373 |
+
$mail = mail( $to_email, $email_subject, $form_html, $headers );
|
374 |
+
}
|
375 |
+
}
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* Function to generate CSV for form entries
|
380 |
+
* @param array $form_data
|
381 |
+
* @param array $entry_rows
|
382 |
+
*/
|
383 |
+
public static function generate_csv( $form_data, $entry_rows ) {
|
384 |
+
//self::print_array( $form_data );
|
385 |
+
//self::print_array( $entry_rows );
|
386 |
+
$output = '';
|
387 |
+
foreach ( $form_data['form_labels'] as $label ) {
|
388 |
+
//$output .=$label . ',';
|
389 |
+
$output .='"' . $label . '",';
|
390 |
+
}
|
391 |
+
$output .='"' . __( 'Entry Created On', UFBL_TD ) . '",';
|
392 |
+
$output .="\n";
|
393 |
+
foreach ( $entry_rows as $entry_row ) {
|
394 |
+
$entry_detail = maybe_unserialize( $entry_row['entry_detail'] );
|
395 |
+
foreach ( $form_data['form_keys'] as $form_key ) {
|
396 |
+
if ( isset( $entry_detail[$form_key] ) ) {
|
397 |
+
if ( is_array( $entry_detail[$form_key] ) ) {
|
398 |
+
$entry_value = array_map( 'esc_attr', $entry_detail[$form_key] );
|
399 |
+
$entry_value = implode( ', ', $entry_value );
|
400 |
+
} else {
|
401 |
+
$entry_value = esc_attr( $entry_detail[$form_key] );
|
402 |
+
}
|
403 |
+
} else {
|
404 |
+
$entry_value = '';
|
405 |
+
}
|
406 |
+
//$output .=$entry_value . ',';
|
407 |
+
$output .='"' . $entry_value . '",';
|
408 |
+
}
|
409 |
+
$output .='"' . $entry_row['entry_created'] . '",';
|
410 |
+
$output .="\n";
|
411 |
+
}
|
412 |
+
$filename = "form-entries.csv";
|
413 |
+
header( 'Content-type: application/csv' );
|
414 |
+
header( 'Content-Disposition: attachment; filename=' . $filename );
|
415 |
+
|
416 |
+
echo $output;
|
417 |
+
exit;
|
418 |
+
}
|
419 |
+
|
420 |
+
}
|
421 |
+
|
422 |
+
//class termination
|
423 |
+
}//class exists check
|
classes/ufbl-model.php
ADDED
@@ -0,0 +1,296 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
4 |
+
|
5 |
+
/**
|
6 |
+
* UFBL Model Class
|
7 |
+
* All the database related tasks
|
8 |
+
*/
|
9 |
+
if ( !class_exists( 'UFBL_Model' ) ) {
|
10 |
+
|
11 |
+
class UFBL_Model {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Model to add form into DB
|
15 |
+
* @global UFBL_Lib object $library_obj
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
public static function add_form() {
|
19 |
+
global $library_obj;
|
20 |
+
//$library_obj->print_array( $_POST );
|
21 |
+
$form_title = sanitize_text_field( $_POST['form_title'] );
|
22 |
+
$form_title = ($form_title == '') ? __( 'Contact Form', UFBL_TD ) : $form_title;
|
23 |
+
$form_status = 1;
|
24 |
+
$form_detail = serialize( $library_obj->get_default_detail() );
|
25 |
+
$created_date = date( 'Y-m-d H:i:s:u' );
|
26 |
+
global $wpdb;
|
27 |
+
$check = $wpdb->insert(
|
28 |
+
UFBL_FORM_TABLE, array(
|
29 |
+
'form_title' => $form_title,
|
30 |
+
'form_detail' => $form_detail,
|
31 |
+
'form_status' => $form_status,
|
32 |
+
'form_created' => $created_date,
|
33 |
+
'form_modified' => $created_date
|
34 |
+
), array(
|
35 |
+
'%s', '%s', '%s', '%s', '%s'
|
36 |
+
)
|
37 |
+
);
|
38 |
+
if ( $check == 1 ) {
|
39 |
+
$form_id = $wpdb->insert_id;
|
40 |
+
$redirect_url = admin_url( 'admin.php?page=ufbl&action=edit-form&form_id=' . $form_id );
|
41 |
+
$response_array = array( 'success' => 1, 'form_id' => $form_id, 'redirect_url' => $redirect_url );
|
42 |
+
} else {
|
43 |
+
$response_array = array( 'success' => 0, 'error_msg' => __( 'Something went wrong.Please try again later', UFBL_TD ) );
|
44 |
+
}
|
45 |
+
die( json_encode( $response_array ) );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Returns all the forms from the database
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
public static function get_all_forms() {
|
53 |
+
global $wpdb;
|
54 |
+
$table_name = UFBL_FORM_TABLE;
|
55 |
+
$forms = $wpdb->get_results( "SELECT * FROM $table_name" );
|
56 |
+
return $forms;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Model to change status of the form
|
61 |
+
*
|
62 |
+
*/
|
63 |
+
public static function change_form_status() {
|
64 |
+
$form_id = sanitize_text_field( $_POST['form_id'] );
|
65 |
+
$form_status = sanitize_text_field( $_POST['status'] );
|
66 |
+
global $wpdb;
|
67 |
+
$check = $wpdb->update(
|
68 |
+
UFBL_FORM_TABLE, array(
|
69 |
+
'form_status' => $form_status
|
70 |
+
), array( 'form_id' => $form_id ), array(
|
71 |
+
'%d'
|
72 |
+
), array( '%d' )
|
73 |
+
);
|
74 |
+
$msg = ($check) ? __( 'Status updated.', UFBL_TD ) : __( 'Something went wrong.', UFBL_TD );
|
75 |
+
die( $msg );
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Model to return form settings by form id
|
80 |
+
* @param int $form_id
|
81 |
+
* @return array
|
82 |
+
*/
|
83 |
+
public static function get_form_detail( $form_id ) {
|
84 |
+
global $wpdb;
|
85 |
+
$form_table = UFBL_FORM_TABLE;
|
86 |
+
$form_row = $wpdb->get_row( "SELECT * FROM $form_table WHERE form_id = $form_id", ARRAY_A );
|
87 |
+
return $form_row;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Model to save form
|
92 |
+
* @return string
|
93 |
+
*/
|
94 |
+
public static function save_form() {
|
95 |
+
global $library_obj;
|
96 |
+
$library_obj->load_core( 'save-form' );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Model to delete form
|
101 |
+
* @return string;
|
102 |
+
*/
|
103 |
+
public static function delete_form() {
|
104 |
+
//global $library_obj;
|
105 |
+
//$library_obj->print_array($_POST);
|
106 |
+
$form_id = sanitize_text_field( $_POST['form_id'] );
|
107 |
+
global $wpdb;
|
108 |
+
$wpdb->delete( UFBL_FORM_TABLE, array( 'form_id' => $form_id ), array( '%d' ) );
|
109 |
+
die( 'success' );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Model to get the form row by form_id
|
114 |
+
* @return array
|
115 |
+
*/
|
116 |
+
public static function get_form_row( $form_id ) {
|
117 |
+
global $wpdb;
|
118 |
+
$table_name = UFBL_FORM_TABLE;
|
119 |
+
$form_row = $wpdb->get_row( "SELECT * FROM $table_name WHERE form_id = $form_id", ARRAY_A );
|
120 |
+
return $form_row;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
*
|
125 |
+
* @param array $form_data
|
126 |
+
* @return void
|
127 |
+
*/
|
128 |
+
public static function save_to_db( $form_data = array() ) {
|
129 |
+
|
130 |
+
if ( isset( $form_data['form_id'] ) ) {
|
131 |
+
$form_id = sanitize_text_field( $form_data['form_id'] );
|
132 |
+
unset( $form_data['form_id'] );
|
133 |
+
foreach ( $form_data as $key => $val ) {
|
134 |
+
if ( !is_array( $val ) ) {
|
135 |
+
$form_data[$key] = sanitize_text_field( $val );
|
136 |
+
} else {
|
137 |
+
$form_data[$key] = array_map( 'sanitize_text_field', $val );
|
138 |
+
}
|
139 |
+
}
|
140 |
+
global $wpdb;
|
141 |
+
$created_date = date( 'Y-m-d H:i:s:u' );
|
142 |
+
$wpdb->insert(
|
143 |
+
UFBL_ENTRY_TABLE, array(
|
144 |
+
'form_id' => $form_id,
|
145 |
+
'entry_detail' => maybe_serialize( $form_data ),
|
146 |
+
'entry_created' => $created_date
|
147 |
+
), array(
|
148 |
+
'%d',
|
149 |
+
'%s',
|
150 |
+
'%s'
|
151 |
+
)
|
152 |
+
);
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Model to return form with id and form title
|
158 |
+
* @return array
|
159 |
+
*/
|
160 |
+
public static function get_forms() {
|
161 |
+
global $wpdb;
|
162 |
+
$form_table = UFBL_FORM_TABLE;
|
163 |
+
$form_rows = $wpdb->get_results( "select `form_id`,`form_title` from $form_table", 'ARRAY_A' );
|
164 |
+
return $form_rows;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Model to return form entries
|
169 |
+
* @param int $form_id
|
170 |
+
* @return array
|
171 |
+
*/
|
172 |
+
public static function get_forms_entries( $form_id = NULL,$limit = UFBL_ENTRY_LIMIT,$offset = 0 ) {
|
173 |
+
global $wpdb;
|
174 |
+
$form_table = UFBL_FORM_TABLE;
|
175 |
+
$form_entry_table = UFBL_ENTRY_TABLE;
|
176 |
+
if ( $form_id == NULL ) {
|
177 |
+
$query = "select $form_entry_table.entry_id, $form_entry_table.entry_detail, $form_entry_table.entry_created, $form_table.form_title, $form_table.form_id from $form_entry_table inner join $form_table on $form_entry_table.form_id = $form_table.form_id order by $form_entry_table.entry_id desc limit $offset, $limit";
|
178 |
+
} else {
|
179 |
+
$query = "select $form_entry_table.entry_id, $form_entry_table.entry_detail, $form_entry_table.entry_created, $form_table.form_title, $form_table.form_id from $form_entry_table inner join $form_table on $form_entry_table.form_id = $form_table.form_id where $form_entry_table.form_id = $form_id order by $form_entry_table.entry_id desc limit $offset, $limit";
|
180 |
+
}
|
181 |
+
$form_entry_rows = $wpdb->get_results( $query, 'ARRAY_A' );
|
182 |
+
return $form_entry_rows;
|
183 |
+
}
|
184 |
+
/**
|
185 |
+
* Model to return form entries
|
186 |
+
* @param int $form_id
|
187 |
+
* @return array
|
188 |
+
*/
|
189 |
+
public static function get_total_form_entries( $form_id = NULL) {
|
190 |
+
global $wpdb;
|
191 |
+
$form_table = UFBL_FORM_TABLE;
|
192 |
+
$form_entry_table = UFBL_ENTRY_TABLE;
|
193 |
+
if ( $form_id == NULL ) {
|
194 |
+
$query = "select $form_entry_table.entry_id, $form_entry_table.entry_detail, $form_entry_table.entry_created, $form_table.form_title, $form_table.form_id from $form_entry_table inner join $form_table on $form_entry_table.form_id = $form_table.form_id order by $form_entry_table.entry_id desc";
|
195 |
+
} else {
|
196 |
+
$query = "select $form_entry_table.entry_id, $form_entry_table.entry_detail, $form_entry_table.entry_created, $form_table.form_title, $form_table.form_id from $form_entry_table inner join $form_table on $form_entry_table.form_id = $form_table.form_id where $form_entry_table.form_id = $form_id order by $form_entry_table.entry_id desc";
|
197 |
+
}
|
198 |
+
$form_entry_rows = $wpdb->get_results( $query, 'ARRAY_A' );
|
199 |
+
$total_form_entry_rows = count($form_entry_rows);
|
200 |
+
return $total_form_entry_rows;
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Model to delete entry
|
205 |
+
* @param type $entry_id
|
206 |
+
* @return int
|
207 |
+
*/
|
208 |
+
public static function delete_entry( $entry_id ) {
|
209 |
+
global $wpdb;
|
210 |
+
if ( $entry_id != '' ) {
|
211 |
+
$wpdb->delete( UFBL_ENTRY_TABLE, array( 'entry_id' => $entry_id ), array( '%d' ) );
|
212 |
+
die( 'success' );
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Model to return entry detail by entry id
|
218 |
+
* @param int $entry_id
|
219 |
+
* @return array
|
220 |
+
*/
|
221 |
+
public static function get_entry_detail( $entry_id ) {
|
222 |
+
global $wpdb;
|
223 |
+
if ( $entry_id != '' ) {
|
224 |
+
$form_table = UFBL_FORM_TABLE;
|
225 |
+
$entry_table = UFBL_ENTRY_TABLE;
|
226 |
+
$entry_row = $wpdb->get_row( "SELECT * FROM $entry_table INNER JOIN $form_table ON $entry_table.form_id = $form_table.form_id WHERE $entry_table.entry_id = $entry_id", 'ARRAY_A' );
|
227 |
+
return $entry_row;
|
228 |
+
} else {
|
229 |
+
return NULL;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Model to return all the form labels in array
|
235 |
+
* @param int $form_id
|
236 |
+
* @return array
|
237 |
+
*/
|
238 |
+
public static function get_form_data( $form_id ) {
|
239 |
+
global $wpdb;
|
240 |
+
$form_table = UFBL_FORM_TABLE;
|
241 |
+
$form_row = $wpdb->get_row( "SELECT form_detail FROM $form_table WHERE form_id = $form_id ", 'ARRAY_A' );
|
242 |
+
if ( !empty( $form_row ) ) {
|
243 |
+
$form_detail = maybe_unserialize( $form_row['form_detail'] );
|
244 |
+
$form_labels = array();
|
245 |
+
$form_keys = array();
|
246 |
+
$except_field_types = array( 'submit','captcha' );
|
247 |
+
foreach ( $form_detail['field_data'] as $field_key => $field_settings ) {
|
248 |
+
if ( !in_array( $field_settings['field_type'], $except_field_types ) ) {
|
249 |
+
$form_labels[] = (isset( $field_settings['field_label'] ) && $field_settings['field_label'] != '') ? esc_attr( $field_settings['field_label'] ) : __( 'Untitled', UFBL_TD ) . ' ' . $field_settings['field_type'];
|
250 |
+
$form_keys[] = $field_key;
|
251 |
+
}
|
252 |
+
}
|
253 |
+
$form_data = array( 'form_labels' => $form_labels, 'form_keys' => $form_keys );
|
254 |
+
} else {
|
255 |
+
$form_data = array( 'form_labels' => array(), 'form_keys' => array() );
|
256 |
+
}
|
257 |
+
return $form_data;
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Model to copy form
|
262 |
+
* @return void
|
263 |
+
*/
|
264 |
+
public static function copy_form() {
|
265 |
+
$form_id = sanitize_text_field( $_POST['form_id'] );
|
266 |
+
$form_title = sanitize_text_field( $_POST['form_title'] );
|
267 |
+
$form_row = self::get_form_row( $form_id );
|
268 |
+
$form_title = ($form_title == '') ? esc_attr( $form_row['form_title'] ) . '- Copy' : $form_title;
|
269 |
+
$form_detail = $form_row['form_detail'];
|
270 |
+
$form_status = $form_row['form_status'];
|
271 |
+
$created_date = date( 'Y-m-d H:i:s:u' );
|
272 |
+
global $wpdb;
|
273 |
+
$check = $wpdb->insert(
|
274 |
+
UFBL_FORM_TABLE, array(
|
275 |
+
'form_title' => $form_title,
|
276 |
+
'form_detail' => $form_detail,
|
277 |
+
'form_status' => $form_status,
|
278 |
+
'form_created' => $created_date,
|
279 |
+
'form_modified' => $created_date
|
280 |
+
), array(
|
281 |
+
'%s', '%s', '%s', '%s', '%s'
|
282 |
+
)
|
283 |
+
);
|
284 |
+
if ( $check == 1 ) {
|
285 |
+
$form_id = $wpdb->insert_id;
|
286 |
+
$redirect_url = admin_url( 'admin.php?page=ufbl&action=edit-form&form_id=' . $form_id );
|
287 |
+
$response_array = array( 'success' => 1, 'form_id' => $form_id, 'redirect_url' => $redirect_url );
|
288 |
+
} else {
|
289 |
+
$response_array = array( 'success' => 0, 'error_msg' => __( 'Something went wrong.Please try again later', UFBL_TD ) );
|
290 |
+
}
|
291 |
+
die( json_encode( $response_array ) );
|
292 |
+
}
|
293 |
+
|
294 |
+
}
|
295 |
+
|
296 |
+
}
|
css/backend.css
ADDED
@@ -0,0 +1,687 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/** Clearfix */
|
2 |
+
.ufbl-clearfix:after {
|
3 |
+
visibility: hidden;
|
4 |
+
display: block;
|
5 |
+
font-size: 0;
|
6 |
+
content: " ";
|
7 |
+
clear: both;
|
8 |
+
height: 0;
|
9 |
+
}
|
10 |
+
.ufbl-clearfix { display: inline-block; }
|
11 |
+
/* start commented backslash hack \*/
|
12 |
+
* html .ufbl-clearfix { height: 1%; }
|
13 |
+
.ufbl-clearfix { display: block; }
|
14 |
+
/* close commented backslash hack */
|
15 |
+
.ufbl-clear{clear:both;}
|
16 |
+
.ufbl-overlay {
|
17 |
+
position: fixed;
|
18 |
+
top: 0;
|
19 |
+
left: 0;
|
20 |
+
background-color: #222;
|
21 |
+
height: 100%;
|
22 |
+
width: 100%;
|
23 |
+
opacity: 0.75;
|
24 |
+
}
|
25 |
+
.ufbl-add-form-wrap {
|
26 |
+
position: fixed;
|
27 |
+
top: 25%;
|
28 |
+
right: 32%;
|
29 |
+
background-color: #fff;
|
30 |
+
padding: 20px;
|
31 |
+
width: 500px;
|
32 |
+
}
|
33 |
+
.ufbl-add-form-wrap input[type="text"] {
|
34 |
+
width: 100%;
|
35 |
+
height: 35px;
|
36 |
+
margin-bottom: 5px;
|
37 |
+
}
|
38 |
+
.ufbl-add-form-wrap label {
|
39 |
+
font-size: 16px;
|
40 |
+
display: block;
|
41 |
+
margin-bottom: 10px;
|
42 |
+
font-weight: bold;
|
43 |
+
}
|
44 |
+
.ufbl-field-note {
|
45 |
+
padding: 2px;
|
46 |
+
color: #736D6D;
|
47 |
+
font-style: italic;
|
48 |
+
margin-bottom: 25px
|
49 |
+
}
|
50 |
+
span.ufbl-ajax-loader {
|
51 |
+
background-image: url("../images/ajax-loader.gif");
|
52 |
+
background-repeat: no-repeat;
|
53 |
+
display:inline-block;
|
54 |
+
margin-left: 5px
|
55 |
+
}
|
56 |
+
span.ufbl-ajax-loader {
|
57 |
+
background: url("../images/ajax-loader.gif") no-repeat center;
|
58 |
+
display: block;
|
59 |
+
width: 16px;
|
60 |
+
height: 16px;
|
61 |
+
display: inline-block;
|
62 |
+
margin-left: 10px;
|
63 |
+
}
|
64 |
+
span.ufbl-msg {
|
65 |
+
padding-left: 10px;
|
66 |
+
font-style: italic;
|
67 |
+
color: #736D6D;
|
68 |
+
}
|
69 |
+
|
70 |
+
.ufbl-status-loader{margin-bottom: 10px;}
|
71 |
+
.ufbl-relative{position: relative;}
|
72 |
+
span.ufbl-status-message {
|
73 |
+
position: absolute;
|
74 |
+
background-color: #222;
|
75 |
+
width: 100%;
|
76 |
+
left: 0;
|
77 |
+
opacity: 0.75;
|
78 |
+
height: 90%;
|
79 |
+
color: white;
|
80 |
+
top: 0;
|
81 |
+
text-align: center;
|
82 |
+
line-height: 2.5;
|
83 |
+
font-size: 16px;
|
84 |
+
font-style: italic;
|
85 |
+
font-weight: 300;
|
86 |
+
border-radius: 5px;
|
87 |
+
}
|
88 |
+
.ufbl-tab-content {
|
89 |
+
background-color: white;
|
90 |
+
min-height: 450px;
|
91 |
+
margin-top: 10px;
|
92 |
+
padding: 10px;
|
93 |
+
border: 1px solid #ccc;
|
94 |
+
}
|
95 |
+
.ufbl-form-elements-wrap {
|
96 |
+
width: 150px;
|
97 |
+
border: 1px solid #bbb;
|
98 |
+
padding: 20px 15px;
|
99 |
+
margin-top: 20px;
|
100 |
+
float: left;
|
101 |
+
}
|
102 |
+
.ufbl-form-element {
|
103 |
+
margin-bottom: 5px !important;
|
104 |
+
display: block;
|
105 |
+
}
|
106 |
+
span.ufbl-form-element-title {
|
107 |
+
position: absolute;
|
108 |
+
top: -32px;
|
109 |
+
background-color: white;
|
110 |
+
font-size: 14px;
|
111 |
+
font-style: italic;
|
112 |
+
font-weight: bold;
|
113 |
+
padding: 2px;
|
114 |
+
}
|
115 |
+
.ufbl-form-wrap {
|
116 |
+
float: left;
|
117 |
+
border: 1px solid #bbb;
|
118 |
+
min-height: 400px;
|
119 |
+
width: 80%;
|
120 |
+
margin-left: 26px;
|
121 |
+
margin-top: 20px;
|
122 |
+
}
|
123 |
+
|
124 |
+
span.ufbl-form-title {
|
125 |
+
position: absolute;
|
126 |
+
top: -15px;
|
127 |
+
background-color: white;
|
128 |
+
font-size: 15px;
|
129 |
+
font-style: italic;
|
130 |
+
font-weight: bold;
|
131 |
+
padding: 2px;
|
132 |
+
left: 30px;
|
133 |
+
cursor: pointer;
|
134 |
+
}
|
135 |
+
|
136 |
+
.ufbl-form-field-holder {
|
137 |
+
padding: 30px 30px;
|
138 |
+
}
|
139 |
+
.ufbl-form-field-wrap label {
|
140 |
+
display: inline-block;
|
141 |
+
margin-bottom: 10px;
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
/* On Off Switch */
|
146 |
+
.onoffswitch {
|
147 |
+
position: relative; width: 90px;
|
148 |
+
-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
|
149 |
+
display:inline-block;
|
150 |
+
}
|
151 |
+
.onoffswitch-checkbox {
|
152 |
+
display: none;
|
153 |
+
}
|
154 |
+
.onoffswitch-label {
|
155 |
+
display: block; overflow: hidden; cursor: pointer;
|
156 |
+
border: 2px solid #999999; border-radius: 20px;
|
157 |
+
}
|
158 |
+
.onoffswitch-inner {
|
159 |
+
display: block; width: 200%; margin-left: -100%;
|
160 |
+
transition: margin 0.3s ease-in 0s;
|
161 |
+
}
|
162 |
+
.onoffswitch-inner:before, .onoffswitch-inner:after {
|
163 |
+
display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
|
164 |
+
font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
|
165 |
+
box-sizing: border-box;
|
166 |
+
}
|
167 |
+
.onoffswitch-inner:before {
|
168 |
+
content: "ON";
|
169 |
+
padding-left: 10px;
|
170 |
+
background-color: #EEEEEE; color: #736868;
|
171 |
+
}
|
172 |
+
.onoffswitch-inner:after {
|
173 |
+
content: "OFF";
|
174 |
+
padding-right: 10px;
|
175 |
+
background-color: #EEEEEE; color: #999999;
|
176 |
+
text-align: right;
|
177 |
+
}
|
178 |
+
.onoffswitch-switch {
|
179 |
+
display: block; width: 18px; margin: 6px;
|
180 |
+
background: #A1A1A1;
|
181 |
+
position: absolute; top: 0; bottom: 0;
|
182 |
+
right: 56px;
|
183 |
+
border: 2px solid #999999; border-radius: 20px;
|
184 |
+
transition: all 0.3s ease-in 0s;
|
185 |
+
}
|
186 |
+
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
|
187 |
+
margin-left: 0;
|
188 |
+
}
|
189 |
+
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
|
190 |
+
right: 0px;
|
191 |
+
background-color: #D54E21;
|
192 |
+
}
|
193 |
+
|
194 |
+
|
195 |
+
/* To be removed */
|
196 |
+
.ufbl-each-form-field {
|
197 |
+
border: 2px solid #D54E21;
|
198 |
+
margin: 20px 0;
|
199 |
+
background-color: white;
|
200 |
+
padding-left: 10px;
|
201 |
+
}
|
202 |
+
.ufbl-form-field-wrap {
|
203 |
+
border: 1px solid #bbb;
|
204 |
+
width: 50%;
|
205 |
+
margin: 10px;
|
206 |
+
padding: 10px;
|
207 |
+
display: inline-block;
|
208 |
+
}
|
209 |
+
.ufbl-field-controls {
|
210 |
+
display: inline-block;
|
211 |
+
}
|
212 |
+
|
213 |
+
a.ufbl-field-settings-trigger.button-primary {
|
214 |
+
border-radius: 3px 0px 0px 3px;
|
215 |
+
}
|
216 |
+
|
217 |
+
a.ufbl-field-delete-trigger {
|
218 |
+
background-color: rgb(213, 78, 33);
|
219 |
+
color: white;
|
220 |
+
padding: 5px 10px;
|
221 |
+
border-radius: 5px;
|
222 |
+
text-decoration: none;
|
223 |
+
}
|
224 |
+
.ufbl-field-controls {
|
225 |
+
float: right;
|
226 |
+
margin-top: 50px;
|
227 |
+
margin-right: 20px;
|
228 |
+
}
|
229 |
+
|
230 |
+
.ufbl-field-controls span {
|
231 |
+
background-color: rgba(34, 34, 34, 0.64);
|
232 |
+
color: white;
|
233 |
+
padding: 5px 6px;
|
234 |
+
margin-right: 10px;
|
235 |
+
}
|
236 |
+
a.ufbl-field-settings-trigger.button-primary:active {
|
237 |
+
vertical-align: baseline;
|
238 |
+
}
|
239 |
+
|
240 |
+
a.ufbl-field-delete-trigger:active,a.ufbl-field-delete-trigger:hover {
|
241 |
+
background-color: rgba(213, 78, 33, 0.73);
|
242 |
+
}
|
243 |
+
|
244 |
+
.ufbl-field-settings-wrap .ufbl-form-field-wrap {
|
245 |
+
display: inline-block;
|
246 |
+
width: 40%;
|
247 |
+
margin-left: 30px
|
248 |
+
}
|
249 |
+
|
250 |
+
.ufbl-field-settings-wrap {
|
251 |
+
width: 98%;
|
252 |
+
margin: 0 auto;
|
253 |
+
position: relative;
|
254 |
+
margin-bottom: 10px;
|
255 |
+
box-shadow: 0 0 2px 0;
|
256 |
+
}
|
257 |
+
.ufbl-up-arrow {
|
258 |
+
width: 0;
|
259 |
+
height: 0px;
|
260 |
+
border-left: 10px solid transparent;
|
261 |
+
border-right: 10px solid transparent;
|
262 |
+
border-bottom: 10px solid #bbb;
|
263 |
+
position: absolute;
|
264 |
+
top: -10px;
|
265 |
+
right: 118px;
|
266 |
+
}
|
267 |
+
.ufbl-form-field-wrap label {
|
268 |
+
font-weight: bold;
|
269 |
+
}
|
270 |
+
.ufbl-each-option input {
|
271 |
+
display: inline-block;
|
272 |
+
width: 40% !important;
|
273 |
+
margin-left: 10px;
|
274 |
+
margin-bottom: 10px;
|
275 |
+
}
|
276 |
+
.ufbl-option-value-wrap {
|
277 |
+
margin-top: 10px;
|
278 |
+
}
|
279 |
+
.ufbl-full-width {
|
280 |
+
width: 88% !important;
|
281 |
+
}
|
282 |
+
span.ufbl-option-remover {
|
283 |
+
background-color: #D54E21;
|
284 |
+
color: white;
|
285 |
+
padding: 1px 6px;
|
286 |
+
border-radius: 50%;
|
287 |
+
text-align: center;
|
288 |
+
cursor: pointer;
|
289 |
+
}
|
290 |
+
.ufbl-each-option {
|
291 |
+
border: 1px solid #bbb;
|
292 |
+
width: 70%;
|
293 |
+
padding: 15px 20px 5px 20px;
|
294 |
+
margin-bottom: 10px;
|
295 |
+
background:white;
|
296 |
+
}
|
297 |
+
.ufbl-submit-button-wrap .ufbl-field-controls {
|
298 |
+
margin-top: 20px;
|
299 |
+
}
|
300 |
+
input.button-primary.ufbl-submit-reference[disabled] {
|
301 |
+
color: white !important;
|
302 |
+
}
|
303 |
+
.ufbl-form-field input[type="text"],.ufbl-form-field input[type="email"],.ufbl-form-field input[type="number"] {
|
304 |
+
width: 100%;
|
305 |
+
}
|
306 |
+
.ufbl-form-field textarea {
|
307 |
+
width: 100%;
|
308 |
+
height: 100px;
|
309 |
+
resize: none;
|
310 |
+
}
|
311 |
+
.ufbl-form-field select[disabled] {
|
312 |
+
color: #222;
|
313 |
+
width: 40%;
|
314 |
+
}
|
315 |
+
.ufbl-form-field input[disabled] {
|
316 |
+
color: #222;
|
317 |
+
opacity: 1 !important;
|
318 |
+
border-color: #ddd;
|
319 |
+
}
|
320 |
+
.ufbl-form-controls {
|
321 |
+
float: right;
|
322 |
+
margin-top: 10px;
|
323 |
+
margin-right: 10px;
|
324 |
+
}
|
325 |
+
.ufbl-header {
|
326 |
+
text-align: center;
|
327 |
+
background-color: #D54E21;
|
328 |
+
color: white;
|
329 |
+
padding: 10px;
|
330 |
+
margin-bottom: 20px;
|
331 |
+
border-radius: 5px 5px 0 0;
|
332 |
+
}
|
333 |
+
|
334 |
+
.ufbl-message{
|
335 |
+
background: #fff;
|
336 |
+
border-left: 4px solid #fff;
|
337 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
338 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
339 |
+
margin: 10px 15px 2px;
|
340 |
+
border-color: #7ad03a;
|
341 |
+
float:left;
|
342 |
+
width:70%;
|
343 |
+
position:relative;
|
344 |
+
}
|
345 |
+
.ufbl-message p{
|
346 |
+
padding-left: 10px;
|
347 |
+
margin:10px;
|
348 |
+
}
|
349 |
+
|
350 |
+
.ufbl-field-wrap label {
|
351 |
+
display: inline-block;
|
352 |
+
width: 150px;
|
353 |
+
font-weight: bold;
|
354 |
+
vertical-align: top;
|
355 |
+
font-size: 14px;
|
356 |
+
}
|
357 |
+
.ufbl-field {
|
358 |
+
display: inline-block;
|
359 |
+
}
|
360 |
+
.ufbl-side-note {
|
361 |
+
display: inline-block;
|
362 |
+
font-weight: bold;
|
363 |
+
}
|
364 |
+
.ufbl-field-wrap {
|
365 |
+
padding: 20px 10px;
|
366 |
+
}
|
367 |
+
.ufbl-template-preview {
|
368 |
+
width: 40%;
|
369 |
+
text-align: center;
|
370 |
+
border: 1px solid #bbb;
|
371 |
+
min-height: 500px;
|
372 |
+
float:right;
|
373 |
+
}
|
374 |
+
.ufbl-template-preview h3 {
|
375 |
+
background-color: #bbb;
|
376 |
+
margin-top: 0px;
|
377 |
+
padding: 10px;
|
378 |
+
color: white;
|
379 |
+
}
|
380 |
+
.ufbl-email-wrap {
|
381 |
+
border: 1px solid #bbb;
|
382 |
+
padding: 10px;
|
383 |
+
position: relative;
|
384 |
+
width: 420px;
|
385 |
+
margin-bottom: 10px;
|
386 |
+
margin-left: 10px;
|
387 |
+
}
|
388 |
+
.ufbl-email-wrap label {
|
389 |
+
font-style: italic;
|
390 |
+
font-weight: bold;
|
391 |
+
position: absolute;
|
392 |
+
top: -14px;
|
393 |
+
padding: 5px;
|
394 |
+
background-color: white;
|
395 |
+
}
|
396 |
+
.ufbl-emails input[type="button"] {
|
397 |
+
margin: 10px;
|
398 |
+
margin-left: 0;
|
399 |
+
}
|
400 |
+
.ufbl-field input[type="text"],.ufbl-field textarea {
|
401 |
+
width: 282px;
|
402 |
+
}
|
403 |
+
.ufbl-field textarea {
|
404 |
+
height: 150px;
|
405 |
+
}
|
406 |
+
div#ufbl-email-tab {
|
407 |
+
padding-top: 25px;
|
408 |
+
}
|
409 |
+
.ufbl-email-fields {
|
410 |
+
margin-bottom: 10px;
|
411 |
+
}
|
412 |
+
span.ufbl-email-remove {
|
413 |
+
background-color: #D54E21;
|
414 |
+
border-radius: 50%;
|
415 |
+
padding: 2px 7px;
|
416 |
+
margin-left: 5px;
|
417 |
+
color: white;
|
418 |
+
cursor: pointer;
|
419 |
+
}
|
420 |
+
.ufbl-emails input[type="text"] {
|
421 |
+
width: 282px;
|
422 |
+
}
|
423 |
+
.ufbl-delete-yes {
|
424 |
+
background-color: #54BB54;
|
425 |
+
color: white;
|
426 |
+
width: 60px;
|
427 |
+
border: none;
|
428 |
+
text-align: center;
|
429 |
+
margin-right: 20px;
|
430 |
+
border-radius: 3px;
|
431 |
+
cursor: pointer;
|
432 |
+
}
|
433 |
+
.ufbl-delete-yes:hover {
|
434 |
+
background-color: rgba(84, 187, 84, 0.59);
|
435 |
+
}
|
436 |
+
.ufbl-delete-cancel {
|
437 |
+
background-color: #D54E21;
|
438 |
+
color: white;
|
439 |
+
width: 60px;
|
440 |
+
border: none;
|
441 |
+
text-align: center;
|
442 |
+
margin-right: 20px;
|
443 |
+
border-radius: 3px;
|
444 |
+
cursor: pointer;
|
445 |
+
}
|
446 |
+
.ufbl-delete-cancel:hover{background-color: rgba(213, 78, 33, 0.69);}
|
447 |
+
.ufbl-delete-confirmation {
|
448 |
+
background-color: #bbb;
|
449 |
+
padding: 5px 10px;
|
450 |
+
color: white;
|
451 |
+
margin-top:10px;
|
452 |
+
}
|
453 |
+
.ufbl-delete-confirmation p{color:white;}
|
454 |
+
.ufbl-delete-confirmation .ufbl-ajax-loader{background-image:url('../images/ajax-loader-delete.gif');margin-left:0;}
|
455 |
+
.ufbl-drag-arrow {
|
456 |
+
position: absolute;
|
457 |
+
top: 35%;
|
458 |
+
left: -15px;
|
459 |
+
background-color: #D54E21;
|
460 |
+
font-size: 15px;
|
461 |
+
padding: 4px 6px;
|
462 |
+
color: white;
|
463 |
+
border-radius: 50%;
|
464 |
+
box-shadow: 0 0 2px;
|
465 |
+
cursor: move;
|
466 |
+
}
|
467 |
+
span.ufbl-option-drag-arrow.ui-sortable-handle {
|
468 |
+
font-size: 16px;
|
469 |
+
cursor: move;
|
470 |
+
margin-left: -31px;
|
471 |
+
background-color: white;
|
472 |
+
border-radius: 50%;
|
473 |
+
box-shadow: 0 0 2px;
|
474 |
+
padding: 0 3px;
|
475 |
+
}
|
476 |
+
.ufbl-op-wrap {
|
477 |
+
padding-left: 20px;
|
478 |
+
}
|
479 |
+
.ufbl-save-form {
|
480 |
+
margin-right: 10px;
|
481 |
+
}
|
482 |
+
|
483 |
+
.ufbl-entry-filter-select {
|
484 |
+
height: 35px !important;
|
485 |
+
min-width: 250px;
|
486 |
+
text-align: center;
|
487 |
+
}
|
488 |
+
.ufbl-entry-filter-wrap {
|
489 |
+
margin: 20px 0px;
|
490 |
+
}
|
491 |
+
input.ufbl-csv-export-trigger {
|
492 |
+
height: 34px;
|
493 |
+
background-color: #D54E21;
|
494 |
+
color: white;
|
495 |
+
cursor: pointer;
|
496 |
+
border-color: #D54E21;
|
497 |
+
}
|
498 |
+
input.ufbl-csv-export-trigger:hover,.ufbl-preview-form:hover{
|
499 |
+
background-color: rgba(213, 78, 33, 0.69);
|
500 |
+
border-color:rgba(213, 78, 33, 0.69);
|
501 |
+
}
|
502 |
+
|
503 |
+
.ufbl-entry-overlay {
|
504 |
+
position: fixed;
|
505 |
+
width: 100%;
|
506 |
+
height: 100%;
|
507 |
+
background-color: #222;
|
508 |
+
top: 0;
|
509 |
+
right: 0;
|
510 |
+
opacity: 0.75;
|
511 |
+
}
|
512 |
+
.ufbl-entry-wrap .ufbl-entry-ajax-loader{
|
513 |
+
position:fixed;
|
514 |
+
top: 37%;
|
515 |
+
left:50%;
|
516 |
+
background: url("../images/ajax-loader-entry.gif") no-repeat center;
|
517 |
+
width:100px;
|
518 |
+
height: 100px;
|
519 |
+
display: inline-block;
|
520 |
+
margin-left: 10px;
|
521 |
+
}
|
522 |
+
.ufbl-entry-detail-wrap{position:fixed;top:30%;left:30%;background-color: white;box-shadow: 0 0 2px #bbb;width: 600px;}
|
523 |
+
.ufbl-entry-detail-wrap {
|
524 |
+
background-color: white;
|
525 |
+
box-shadow: 0 0 2px #bbb;
|
526 |
+
height: 80%;
|
527 |
+
left: 30%;
|
528 |
+
padding:0 20px 20px 20px;
|
529 |
+
position: fixed;
|
530 |
+
top: 10%;
|
531 |
+
width: 700px;
|
532 |
+
}
|
533 |
+
.ufbl-entry-detail-wrap label{
|
534 |
+
display: inline-block;
|
535 |
+
font-weight: bold;
|
536 |
+
vertical-align: top;
|
537 |
+
width: 25%;
|
538 |
+
}
|
539 |
+
.ufbl-entry-field-wrap {
|
540 |
+
border-bottom: 1px solid #ddd;
|
541 |
+
margin: 10px;
|
542 |
+
padding: 10px 10px 20px;
|
543 |
+
}
|
544 |
+
.ufbl-entry-value {
|
545 |
+
display: inline-block;
|
546 |
+
width: 70%;
|
547 |
+
}
|
548 |
+
.ufbl-entry-detail-wrap h3 {
|
549 |
+
margin-bottom: 30px;
|
550 |
+
text-align: center;
|
551 |
+
background-color: #bbb;
|
552 |
+
padding: 10px;
|
553 |
+
color: white;
|
554 |
+
|
555 |
+
}
|
556 |
+
.ufbl-entry-detail-close {
|
557 |
+
background-color: #d54e21;
|
558 |
+
color: white;
|
559 |
+
cursor: pointer;
|
560 |
+
font-size: 16px;
|
561 |
+
font-weight: bold;
|
562 |
+
right: -40px;
|
563 |
+
padding: 5px 9px;
|
564 |
+
position: absolute;
|
565 |
+
top: -35px;
|
566 |
+
border-radius: 50%;
|
567 |
+
border: 2px solid;
|
568 |
+
}
|
569 |
+
|
570 |
+
|
571 |
+
.ufbl-entry-inner-wrap {
|
572 |
+
overflow-y: scroll;
|
573 |
+
}
|
574 |
+
.ufbl-entry-filter-wrap form {
|
575 |
+
display: inline-block;
|
576 |
+
}
|
577 |
+
.ufbl-entry-filter-wrap a{text-decoration: none;}
|
578 |
+
input.ufbl-preview-form {
|
579 |
+
color: white;
|
580 |
+
background-color: #D54E21;
|
581 |
+
border-color: #D54E21;
|
582 |
+
cursor: pointer;
|
583 |
+
}
|
584 |
+
.ufbl-field-extra-note {
|
585 |
+
margin: 10px 0 10px 30px;
|
586 |
+
background-color: #FFFBCC;
|
587 |
+
padding: 7px;
|
588 |
+
font-style: italic;
|
589 |
+
width: 86%;
|
590 |
+
margin-bottom: 20px;
|
591 |
+
}
|
592 |
+
.ufbl-entries-pagination-wrap {
|
593 |
+
display: inline-block;
|
594 |
+
margin-left: 20px;
|
595 |
+
}
|
596 |
+
.ufbl-entry-page-link {
|
597 |
+
background-color: #bbb;
|
598 |
+
color: white;
|
599 |
+
padding: 8px 15px;
|
600 |
+
font-weight: bold;
|
601 |
+
margin: 0 10px;
|
602 |
+
}
|
603 |
+
.ufbl-entry-page-link:hover{
|
604 |
+
background-color:#d54e21;
|
605 |
+
color:white;
|
606 |
+
}
|
607 |
+
.ufbl-entry-current-page {
|
608 |
+
background-color: #d54e21;
|
609 |
+
color: white;
|
610 |
+
}
|
611 |
+
.ufbl-entries-pagination-outerwrap {
|
612 |
+
display: inline-block;
|
613 |
+
float:right;
|
614 |
+
}
|
615 |
+
.ufbl-new-form-wrap, .ufbl-content-wrap {
|
616 |
+
background-color: white;
|
617 |
+
min-height: 400px;
|
618 |
+
padding: 20px;
|
619 |
+
}
|
620 |
+
.ufbl-new-form-wrap label {
|
621 |
+
font-size: 16px;
|
622 |
+
margin-right: 20px;
|
623 |
+
}
|
624 |
+
.ufbl-new-form-wrap .ufbl-field-note {
|
625 |
+
margin-left: 100px;
|
626 |
+
margin-top: 10px;
|
627 |
+
}
|
628 |
+
.ufbl-add-submit-wrap {
|
629 |
+
margin-left: 100px;
|
630 |
+
}
|
631 |
+
.ufbl-shortcode-display-wrap {
|
632 |
+
background-color: white;
|
633 |
+
width: 386px;
|
634 |
+
padding: 10px;
|
635 |
+
font-size: 16px;
|
636 |
+
margin-bottom: 10px;
|
637 |
+
border:1px solid #bbb;
|
638 |
+
}
|
639 |
+
h4.ufbl-content-title {
|
640 |
+
background-color: #bbb;
|
641 |
+
color: white;
|
642 |
+
padding: 5px;
|
643 |
+
font-size: 14px;
|
644 |
+
}
|
645 |
+
.ufbl-content-section {
|
646 |
+
border-bottom: 1px solid #ddd;
|
647 |
+
padding-bottom: 20px;
|
648 |
+
margin-bottom: 10px;
|
649 |
+
}
|
650 |
+
.ufbl-content-section ul li {
|
651 |
+
margin-left: 20px;
|
652 |
+
list-style: disc;
|
653 |
+
width: auto;
|
654 |
+
font-weight: bold;
|
655 |
+
}
|
656 |
+
.ufbl-sub-section {
|
657 |
+
box-shadow: 0 0 4px 0;
|
658 |
+
padding: 10px;
|
659 |
+
float: left;
|
660 |
+
width: 305px;
|
661 |
+
text-align: center;
|
662 |
+
margin: 0 20px;
|
663 |
+
}
|
664 |
+
.ufbl-sub-section-title {
|
665 |
+
background-color: #bbb;
|
666 |
+
color: white;
|
667 |
+
margin-bottom: 15px;
|
668 |
+
padding: 5px;
|
669 |
+
font-size: 14px;
|
670 |
+
}
|
671 |
+
.ufbl-sub-section a {
|
672 |
+
text-decoration: none;
|
673 |
+
color: white;
|
674 |
+
}
|
675 |
+
.ufbl-sub-section a:focus{box-shadow: 0 0 0 !important;}
|
676 |
+
.ufbl-template-preview img {
|
677 |
+
max-width: 100%;
|
678 |
+
}
|
679 |
+
.ufbl-display-sub-section {
|
680 |
+
float: left;
|
681 |
+
}
|
682 |
+
#ufbl-display-tab .ufbl-form-controls, #ufbl-email-tab .ufbl-form-controls{
|
683 |
+
float: left;
|
684 |
+
margin-left: 165px;
|
685 |
+
}
|
686 |
+
.ufbl-form-controls .ufbl-field-note{margin:5px 0 0 0;}
|
687 |
+
.ufbl-text-align-right{text-align: right;}
|
css/frontend.css
ADDED
@@ -0,0 +1,1165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**---- Preivew CSS--------**/
|
2 |
+
.ufbl-preview-title {
|
3 |
+
background-color: white;
|
4 |
+
width: 200px;
|
5 |
+
margin: 20 auto;
|
6 |
+
box-shadow: 0 0 2px #222;
|
7 |
+
height: 70px;
|
8 |
+
padding: 20px 0;
|
9 |
+
font-weight: bold;
|
10 |
+
}
|
11 |
+
.ufbl-form-preview-wrap{
|
12 |
+
width:60%;
|
13 |
+
margin:50px auto;
|
14 |
+
background:white;
|
15 |
+
padding:40px;
|
16 |
+
}
|
17 |
+
.ufbl-preview-title-wrap {
|
18 |
+
height: 80px;
|
19 |
+
text-align: center;
|
20 |
+
}
|
21 |
+
.ufbl-preview-note {
|
22 |
+
text-align: center;
|
23 |
+
margin-top: 38px;
|
24 |
+
}
|
25 |
+
.ufbl-form-preview-wrap .ufbl-form-wrapper {
|
26 |
+
margin: 20px auto;
|
27 |
+
}
|
28 |
+
/**---- Preivew CSS--------**/
|
29 |
+
/**---- Default Template ---**/
|
30 |
+
.ufbl-form-loader {
|
31 |
+
background-image: url('../images/ajax-loader.gif');
|
32 |
+
height: 32px;
|
33 |
+
width: 32px;
|
34 |
+
display: inline-block;
|
35 |
+
background-repeat: no-repeat;
|
36 |
+
background-position: center;
|
37 |
+
text-align: center;
|
38 |
+
margin-bottom: -8px;
|
39 |
+
}
|
40 |
+
.ufbl-default-template .ufbl-error-message {
|
41 |
+
margin-top: 20px;
|
42 |
+
border: 2px solid rgba(255, 0, 0, 0.89);
|
43 |
+
color: rgba(255, 0, 0, 0.89);
|
44 |
+
padding: 10px 10px;
|
45 |
+
}
|
46 |
+
.ufbl-default-template .ufbl-error {
|
47 |
+
color: rgba(255, 0, 0, 0.89);
|
48 |
+
margin-top: 10px;
|
49 |
+
text-align: right;
|
50 |
+
}
|
51 |
+
.ufbl-form-wrapper.ufbl-default-template {
|
52 |
+
padding:20px;
|
53 |
+
box-shadow: 0 0 2px;
|
54 |
+
margin-top:20px;
|
55 |
+
}
|
56 |
+
.ufbl-default-template .ufbl-form-field-wrap {
|
57 |
+
margin-bottom: 10px;
|
58 |
+
padding-bottom: 10px;
|
59 |
+
}
|
60 |
+
.ufbl-default-template .ufbl-form-field > label {
|
61 |
+
display: block;
|
62 |
+
margin-bottom: 5px;
|
63 |
+
vertical-align: top;
|
64 |
+
margin-left: 15px;
|
65 |
+
}
|
66 |
+
.ufbl-default-template .ufbl-form-field >label>input[type="checkbox"],.ufbl-form-field >label>input[type="radio"] {
|
67 |
+
margin-right: 5px;
|
68 |
+
outline:none;
|
69 |
+
}
|
70 |
+
.ufbl-default-template .ufbl-form-field-wrap >label {
|
71 |
+
margin-bottom: 5px;
|
72 |
+
display: block;
|
73 |
+
font-weight: 600;
|
74 |
+
}
|
75 |
+
.ufbl-default-template .ufbl-form-title {
|
76 |
+
text-align: center;
|
77 |
+
font-size: 20px;
|
78 |
+
padding: 10px 0;
|
79 |
+
margin-bottom: 40px;
|
80 |
+
font-weight: bold;
|
81 |
+
}
|
82 |
+
.ufbl-default-template .ufbl-front-form input[type="text"], .ufbl-front-form input[type="email"], .ufbl-front-form input[type="password"] {
|
83 |
+
width: 100%;
|
84 |
+
}
|
85 |
+
.ufbl-default-template .ufbl-form-message.ufbl-success-message {
|
86 |
+
color: green;
|
87 |
+
border: 2px solid;
|
88 |
+
padding: 10px;
|
89 |
+
}
|
90 |
+
.ufbl-default-template input.ufbl-math-captcha-ans {
|
91 |
+
width: 23% !important;
|
92 |
+
}
|
93 |
+
.ufbl-default-template .ufbl-sub-field-wrap {
|
94 |
+
margin-left: 10px;
|
95 |
+
}
|
96 |
+
.ufbl-default-template .ufbl-sub-field-wrap label {
|
97 |
+
margin-left: 10px;
|
98 |
+
}
|
99 |
+
.ufbl-default-template .ufbl-form-field .ufbl-form-reset {
|
100 |
+
border-radius: 0;
|
101 |
+
padding: 13px 25px;
|
102 |
+
}
|
103 |
+
/**---- Default Template ---**/
|
104 |
+
.ufbl-template-1 .ufbl-form-reset:focus, .ufbl-template-2 .ufbl-form-reset:focus, .ufbl-template-3 .ufbl-form-reset:focus, .ufbl-template-4 .ufbl-form-reset:focus, .ufbl-template-5 .ufbl-form-reset:focus {
|
105 |
+
background-color: transparent !important;
|
106 |
+
color:#434a54 !important;
|
107 |
+
}
|
108 |
+
.ufbl-template-1 .ufbl-form-submit:focus, .ufbl-template-2 .ufbl-form-submit:focus, .ufbl-template-3 .ufbl-form-submit:focus, .ufbl-template-4 .ufbl-form-submit:focus, .ufbl-template-5 .ufbl-form-submit:focus {
|
109 |
+
background-color: #74baf5 !important;
|
110 |
+
color:#fff !important;
|
111 |
+
}
|
112 |
+
.ufbl-template-1 .ufbl-number-field:focus, .ufbl-template-2 .ufbl-number-field:focus, .ufbl-template-3 .ufbl-number-field:focus, .ufbl-template-4 .ufbl-number-field:focus, .ufbl-template-5 .ufbl-number-field:focus {
|
113 |
+
outline:none !important;
|
114 |
+
}
|
115 |
+
/**-------- Template 1------ */
|
116 |
+
.ufbl-form-wrapper.ufbl-template-1 {
|
117 |
+
background-color: #fff;
|
118 |
+
padding:40px 30px;
|
119 |
+
-webkit-box-shadow: 0 3px 8px 3px rgba(0,0,0,0.4);
|
120 |
+
box-shadow: 0 3px 8px 3px rgba(0,0,0,0.4);
|
121 |
+
}
|
122 |
+
.ufbl-template-1 .ufbl-form-title {
|
123 |
+
margin-bottom: 40px;
|
124 |
+
font-size:22px;
|
125 |
+
color:#3979a9;
|
126 |
+
text-transform:uppercase;
|
127 |
+
}
|
128 |
+
.ufbl-template-1 .ufbl-form-field-wrap{
|
129 |
+
margin-bottom:20px;
|
130 |
+
}
|
131 |
+
.ufbl-template-1 .ufbl-form-field-wrap > label{
|
132 |
+
display:inline-block;
|
133 |
+
width:135px;
|
134 |
+
font-size:16px;
|
135 |
+
color:#000;
|
136 |
+
vertical-align:top;
|
137 |
+
}
|
138 |
+
.ufbl-template-1 .ufbl-form-field {
|
139 |
+
display: inline-block;
|
140 |
+
width: 74%;
|
141 |
+
}
|
142 |
+
.ufbl-template-1 .ufbl-form-field input[type="text"], .ufbl-template-1 .ufbl-form-field input[type="email"],.ufbl-template-1 .ufbl-form-field input[type="password"],.ufbl-template-1 .ufbl-form-field textarea,.ufbl-template-1 .ufbl-form-field input[type="reset"]{
|
143 |
+
border-radius:4px;
|
144 |
+
border-color:#aab2bd;
|
145 |
+
padding:4px 8px;
|
146 |
+
background-color: transparent;
|
147 |
+
}
|
148 |
+
.ufbl-template-1 input[type="checkbox"], input[type="radio"] button, select, textarea{
|
149 |
+
outline:none !important;
|
150 |
+
}
|
151 |
+
.ufbl-template-1 .ufbl-form-checkbox{
|
152 |
+
margin-right:5px;
|
153 |
+
}
|
154 |
+
.ufbl-template-1 .ufbl-form-textfield:focus{
|
155 |
+
-webkit-box-shadow: 0 0 1px 1px #67D5EB;
|
156 |
+
box-shadow: 0 0 1px 1px #67D5EB;
|
157 |
+
}
|
158 |
+
.ufbl-template-1 #your-hobbies > label {
|
159 |
+
vertical-align: top !important;
|
160 |
+
}
|
161 |
+
.ufbl-template-1 .your-hobbies .ufbl-form-field > label {
|
162 |
+
display: block;
|
163 |
+
margin-bottom: 10px;
|
164 |
+
}
|
165 |
+
.ufbl-template-1 *::-moz-placeholder {
|
166 |
+
color: rgba(51, 51, 51, 0.7);
|
167 |
+
font-family: "Noto Sans",sans-serif;
|
168 |
+
opacity: 1;
|
169 |
+
font-size: 14px;
|
170 |
+
}
|
171 |
+
.ufbl-template-1 select.ufbl-required, .ufbl-template-1 .ufbl-form-field select,.ufbl-template-1 .ufbl-form-field .ufbl-number-field {
|
172 |
+
border: 1px solid #aab2bd;
|
173 |
+
border-radius:4px;
|
174 |
+
width:50%;
|
175 |
+
padding:5px;
|
176 |
+
font-size:14px;
|
177 |
+
cursor:pointer;
|
178 |
+
height:35px;
|
179 |
+
background: transparent;
|
180 |
+
}
|
181 |
+
.ufbl-template-1 .ufbl-email-field{
|
182 |
+
font-size:14px;
|
183 |
+
box-shadow: none;
|
184 |
+
padding:8px;
|
185 |
+
}
|
186 |
+
.ufbl-template-1 .ufbl-form-field-wrap > label {
|
187 |
+
margin-top:7px;
|
188 |
+
}
|
189 |
+
.ufbl-template-1 .ufbl-math-captcha-wrap {
|
190 |
+
display: inline-block;
|
191 |
+
}
|
192 |
+
.ufbl-template-1 .ufbl-form-submit {
|
193 |
+
background-color: #74baf5;
|
194 |
+
border-radius:4px;
|
195 |
+
margin-left:135px;
|
196 |
+
font-size:15px;
|
197 |
+
text-transform:none;
|
198 |
+
}
|
199 |
+
.ufbl-template-1 .ufbl-form-submit:hover {
|
200 |
+
background-color: #52a2e5;
|
201 |
+
}
|
202 |
+
.ufbl-template-1 .ufbl-form-reset {
|
203 |
+
background-color: rgba(0, 0, 0, 0);
|
204 |
+
border: 1px solid #aab2bd !important;
|
205 |
+
color: #434a54;
|
206 |
+
font-size: 15px;
|
207 |
+
padding: 11px 20px !important;
|
208 |
+
text-transform: none;
|
209 |
+
}
|
210 |
+
.ufbl-template-1 .ufbl-form-reset:hover {
|
211 |
+
background-color: #52a2e5;
|
212 |
+
color:#fff;
|
213 |
+
}
|
214 |
+
.ufbl-template-1 .ufbl-error {
|
215 |
+
color: #ff0000;
|
216 |
+
font-size: 13px;
|
217 |
+
font-style: italic;
|
218 |
+
margin-top: 5px;
|
219 |
+
text-align: right;
|
220 |
+
}
|
221 |
+
.ufbl-template-1 .ufbl-math-captcha-ans {
|
222 |
+
border: 1px solid #aab2bd;
|
223 |
+
border-radius: 4px;
|
224 |
+
height: 35px;
|
225 |
+
margin-top: 3px;
|
226 |
+
width: 176px;
|
227 |
+
font-size:15px;
|
228 |
+
}
|
229 |
+
.ufbl-template-1 input.ufbl-form-radio{
|
230 |
+
display:none;
|
231 |
+
}
|
232 |
+
.ufbl-template-1 input[type=radio] + label{
|
233 |
+
background: rgba(0, 0, 0, 0) url("../images/uncheck-radio.png") no-repeat scroll left center;
|
234 |
+
cursor: pointer;
|
235 |
+
display: block;
|
236 |
+
font-size: 16px;
|
237 |
+
height: 34px;
|
238 |
+
margin-bottom: 8px;
|
239 |
+
padding: 3px 0 0 35px;
|
240 |
+
vertical-align: top;
|
241 |
+
}
|
242 |
+
.ufbl-template-1 input[type=radio]:checked + label{
|
243 |
+
background: rgba(0, 0, 0, 0) url("../images/checked-radio.png") no-repeat scroll left center;
|
244 |
+
cursor: pointer;
|
245 |
+
display: block;
|
246 |
+
height: 34px;
|
247 |
+
margin-bottom: 8px;
|
248 |
+
padding: 3px 0 0 35px;
|
249 |
+
vertical-align: top;
|
250 |
+
}
|
251 |
+
.ufbl-template-1 .ufbl-form-checkbox {
|
252 |
+
display:none;
|
253 |
+
}
|
254 |
+
.ufbl-template-1 input[type=checkbox]:checked + label {
|
255 |
+
background: rgba(0, 0, 0, 0) url("../images/check-box-checked.png") no-repeat scroll left center;
|
256 |
+
cursor: pointer;
|
257 |
+
display: block;
|
258 |
+
height: 34px;
|
259 |
+
margin-bottom: 8px;
|
260 |
+
padding: 5px 0 0 35px;
|
261 |
+
vertical-align: top;
|
262 |
+
}
|
263 |
+
.ufbl-template-1 input[type=checkbox] + label {
|
264 |
+
background: rgba(0, 0, 0, 0) url("../images/check-box.png") no-repeat scroll left center;
|
265 |
+
cursor: pointer;
|
266 |
+
display: block;
|
267 |
+
height: 34px;
|
268 |
+
margin-bottom: 8px;
|
269 |
+
padding: 5px 0 0 35px;
|
270 |
+
vertical-align: top;
|
271 |
+
font-size:16px;
|
272 |
+
}
|
273 |
+
.ufbl-template-1 .ufbl-form-field .ufbl-email-field {
|
274 |
+
background: #f7f7f7 url("../images/mail.png") no-repeat scroll right 10px center / 20px auto;
|
275 |
+
height:35px;
|
276 |
+
}
|
277 |
+
.ufbl-template-1 .ufbl-form-message.ufbl-success-message{
|
278 |
+
border: 1px solid #aab2bd;
|
279 |
+
border-radius: 4px;
|
280 |
+
font-size: 15px;
|
281 |
+
padding: 5px 10px;
|
282 |
+
}
|
283 |
+
.ufbl-template-1 .ufbl-form-message.ufbl-error-message {
|
284 |
+
border: 1px solid #ff0000;
|
285 |
+
border-radius: 4px;
|
286 |
+
color: #ff0000;
|
287 |
+
font-size: 15px;
|
288 |
+
padding: 5px 10px;
|
289 |
+
}
|
290 |
+
/**-------- dropdown ------ */
|
291 |
+
.ufbl-template-1 .sbSelector{
|
292 |
+
line-height:34px !important;
|
293 |
+
}
|
294 |
+
.ufbl-template-1 .sbSelector:link, .sbSelector:visited, .sbSelector:hover {
|
295 |
+
color: #434a54 !important;
|
296 |
+
}
|
297 |
+
.ufbl-template-1 .entry-content a, .ufbl-template-1 .entry-summary a, .ufbl-template-1 .page-content a, .ufbl-template-1 .comment-content a, .pingback .comment-body > a {
|
298 |
+
border: none !important;
|
299 |
+
}
|
300 |
+
.ufbl-template-1 .ufbl-form-field .sbHolder {
|
301 |
+
background-color: #ffffff;
|
302 |
+
border-radius: 4px;
|
303 |
+
font-size: 14px;
|
304 |
+
width: 50% !important;
|
305 |
+
border: 1px solid #aab2bd !important;
|
306 |
+
height:35px;
|
307 |
+
}
|
308 |
+
.ufbl-template-1 .sbOptions {
|
309 |
+
background-color: #ffffff !important;
|
310 |
+
border: 1px solid #aab2bd;
|
311 |
+
border-radius: 0 0 4px 4px;
|
312 |
+
color: #000000 !important;
|
313 |
+
top: 31px !important;
|
314 |
+
width: 101% !important;
|
315 |
+
}
|
316 |
+
.ufbl-template-1 .sbOptions a:link, .ufbl-template-1 .sbOptions a:visited {
|
317 |
+
color:#999999 !important;
|
318 |
+
}
|
319 |
+
.ufbl-template-1 .sbOptions a:hover, .ufbl-template-1 .sbOptions a:focus, .ufbl-template-1 .sbOptions a.sbFocus {
|
320 |
+
background-color: #74baf5;
|
321 |
+
color:#fff !important;
|
322 |
+
}
|
323 |
+
.ufbl-template-1 .sbOptions{
|
324 |
+
max-height:inherit !important;
|
325 |
+
}
|
326 |
+
.ufbl-template-1 .sbOptions li {
|
327 |
+
padding: 0 !important;
|
328 |
+
border-bottom:1px solid #aab2bd;
|
329 |
+
}
|
330 |
+
.ufbl-template-1 .sbOptions li:last-child{
|
331 |
+
border-bottom: none;
|
332 |
+
}
|
333 |
+
.ufbl-template-1 .sbToggle {
|
334 |
+
background-attachment: scroll !important;
|
335 |
+
background-clip: border-box !important;
|
336 |
+
background-color: rgba(0, 0, 0, 0) !important;
|
337 |
+
background-image: url("../images/option-angle.png") !important;
|
338 |
+
background-origin: padding-box !important;
|
339 |
+
background-position: right 15px center;
|
340 |
+
background-repeat: no-repeat !important;
|
341 |
+
background-size: auto auto !important;
|
342 |
+
}
|
343 |
+
.ufbl-template-1.sbToggle:hover, .ufbl-template-1 .sbToggle:focus {
|
344 |
+
background-attachment: scroll !important;
|
345 |
+
background-clip: border-box !important;
|
346 |
+
background-color: rgba(0, 0, 0, 0) !important;
|
347 |
+
background-image: url("../images/option-angle.png") !important;
|
348 |
+
background-origin: padding-box !important;
|
349 |
+
background-position: right 15px center;
|
350 |
+
background-repeat: no-repeat !important;
|
351 |
+
background-size: auto auto !important;
|
352 |
+
outline:none;
|
353 |
+
}
|
354 |
+
/**-------- Template 1 end ------ */
|
355 |
+
/**-------- Template 2 ------ */
|
356 |
+
.ufbl-form-wrapper.ufbl-template-2 {
|
357 |
+
background-color: #fff;
|
358 |
+
padding:40px 30px;
|
359 |
+
-webkit-box-shadow: 0 3px 8px 3px rgba(0,0,0,0.4);
|
360 |
+
box-shadow: 0 3px 8px 3px rgba(0,0,0,0.4);
|
361 |
+
}
|
362 |
+
.ufbl-template-2 .ufbl-form-title {
|
363 |
+
margin-bottom: 40px;
|
364 |
+
font-size:22px;
|
365 |
+
color:#3979a9;
|
366 |
+
text-transform:uppercase;
|
367 |
+
}
|
368 |
+
.ufbl-template-2 .ufbl-form-field-wrap{
|
369 |
+
margin-bottom:20px;
|
370 |
+
}
|
371 |
+
.ufbl-template-2 .ufbl-form-field-wrap > label{
|
372 |
+
display:inline-block;
|
373 |
+
width:135px;
|
374 |
+
font-size:16px;
|
375 |
+
color:#000;
|
376 |
+
vertical-align:top;
|
377 |
+
margin-top:7px;
|
378 |
+
}
|
379 |
+
.ufbl-template-2 .ufbl-form-field {
|
380 |
+
display: inline-block;
|
381 |
+
width: 75%;
|
382 |
+
}
|
383 |
+
.ufbl-template-2 input[type="text"], .ufbl-template-2 input[type="email"], .ufbl-template-2 input[type="url"],.ufbl-template-2 input[type="password"],.ufbl-template-2 input[type="search"],.ufbl-template-2 textarea{
|
384 |
+
border-color:#aab2bd;
|
385 |
+
background-color: transparent;
|
386 |
+
padding:4px 8px;
|
387 |
+
}
|
388 |
+
.ufbl-template-2 input[type="checkbox"], input[type="radio"] button, select, textarea{
|
389 |
+
outline:none !important;
|
390 |
+
}
|
391 |
+
.ufbl-template-2 .ufbl-form-checkbox{
|
392 |
+
margin-right:5px;
|
393 |
+
}
|
394 |
+
.ufbl-template-2 .ufbl-form-textfield:focus{
|
395 |
+
-webkit-box-shadow: 0 0 1px 1px #67D5EB;
|
396 |
+
box-shadow: 0 0 1px 1px #67D5EB;
|
397 |
+
}
|
398 |
+
.ufbl-template-2 #your-hobbies > label {
|
399 |
+
vertical-align: top !important;
|
400 |
+
}
|
401 |
+
.ufbl-template-2 .your-hobbies .ufbl-form-field > label {
|
402 |
+
display: block;
|
403 |
+
margin-bottom: 10px;
|
404 |
+
}
|
405 |
+
.ufbl-template-2 *::-moz-placeholder {
|
406 |
+
color: rgba(51, 51, 51, 0.7);
|
407 |
+
font-family: "Noto Sans",sans-serif;
|
408 |
+
opacity: 1;
|
409 |
+
font-size: 14px;
|
410 |
+
}
|
411 |
+
.ufbl-template-2 select.ufbl-required, .ufbl-template-2 .ufbl-form-field select,.ufbl-template-2 .ufbl-form-field .ufbl-number-field {
|
412 |
+
border: 1px solid #aab2bd;
|
413 |
+
width:50%;
|
414 |
+
padding:5px;
|
415 |
+
font-size:14px;
|
416 |
+
cursor:pointer;
|
417 |
+
height:35px;
|
418 |
+
background:transparent;
|
419 |
+
}
|
420 |
+
.ufbl-template-2 .ufbl-email-field{
|
421 |
+
font-size:14px;
|
422 |
+
box-shadow: none;
|
423 |
+
padding:8px;
|
424 |
+
}
|
425 |
+
.ufbl-template-2 #asdfasdf > label {
|
426 |
+
margin-top:7px;
|
427 |
+
}
|
428 |
+
.ufbl-template-2 .ufbl-form-submit {
|
429 |
+
background-color: #74baf5;
|
430 |
+
margin-left:135px;
|
431 |
+
font-size:15px;
|
432 |
+
text-transform:none;
|
433 |
+
}
|
434 |
+
.ufbl-template-2 .ufbl-form-submit:hover {
|
435 |
+
background-color: #52a2e5;
|
436 |
+
}
|
437 |
+
.ufbl-template-2 .ufbl-form-submit:focus {
|
438 |
+
color: #fff;
|
439 |
+
}
|
440 |
+
.ufbl-template-2 .ufbl-form-reset {
|
441 |
+
background-color: rgba(0, 0, 0, 0);
|
442 |
+
border: 1px solid #aab2bd !important;
|
443 |
+
border-radius: 0 !important;
|
444 |
+
color: #434a54;
|
445 |
+
font-size: 15px;
|
446 |
+
padding: 11px 20px !important;
|
447 |
+
text-transform: none;
|
448 |
+
}
|
449 |
+
.ufbl-template-2 .ufbl-form-reset:hover {
|
450 |
+
background-color: #52a2e5;
|
451 |
+
color:#fff;
|
452 |
+
}
|
453 |
+
.ufbl-template-2 .ufbl-form-reset:focus{
|
454 |
+
color:#fff;
|
455 |
+
}
|
456 |
+
.ufbl-template-2 .ufbl-error {
|
457 |
+
color: #ff0000;
|
458 |
+
font-size: 13px;
|
459 |
+
margin-top:5px;
|
460 |
+
text-align:right;
|
461 |
+
font-style:italic;
|
462 |
+
}
|
463 |
+
.ufbl-template-2 .ufbl-math-captcha-ans {
|
464 |
+
border:1px solid #aab2bd;
|
465 |
+
margin-top: 3px;
|
466 |
+
width:176px;
|
467 |
+
height:35px;
|
468 |
+
font-size:15px;
|
469 |
+
}
|
470 |
+
.ufbl-template-2 input.ufbl-form-radio{
|
471 |
+
display:none;
|
472 |
+
}
|
473 |
+
.ufbl-template-2 input[type=radio] + label{
|
474 |
+
background: rgba(0, 0, 0, 0) url("../images/uncheck-radio.png") no-repeat scroll left center;
|
475 |
+
cursor: pointer;
|
476 |
+
display: block;
|
477 |
+
font-size: 16px;
|
478 |
+
height: 34px;
|
479 |
+
margin-bottom: 8px;
|
480 |
+
padding: 3px 0 0 35px;
|
481 |
+
vertical-align: top;
|
482 |
+
}
|
483 |
+
.ufbl-template-2 input[type=radio]:checked + label{
|
484 |
+
background: rgba(0, 0, 0, 0) url("../images/checked-radio.png") no-repeat scroll left center;
|
485 |
+
cursor: pointer;
|
486 |
+
display: block;
|
487 |
+
height: 34px;
|
488 |
+
margin-bottom: 8px;
|
489 |
+
padding: 3px 0 0 35px;
|
490 |
+
vertical-align: top;
|
491 |
+
}
|
492 |
+
.ufbl-template-2 .ufbl-form-checkbox {
|
493 |
+
display:none;
|
494 |
+
}
|
495 |
+
.ufbl-template-2 input[type=checkbox]:checked + label {
|
496 |
+
background: rgba(0, 0, 0, 0) url("../images/check-box-checked.png") no-repeat scroll left center;
|
497 |
+
cursor: pointer;
|
498 |
+
display: block;
|
499 |
+
height: 34px;
|
500 |
+
margin-bottom: 8px;
|
501 |
+
padding: 5px 0 0 35px;
|
502 |
+
vertical-align: top;
|
503 |
+
}
|
504 |
+
.ufbl-template-2 input[type=checkbox] + label {
|
505 |
+
background: rgba(0, 0, 0, 0) url("../images/check-box.png") no-repeat scroll left center;
|
506 |
+
cursor: pointer;
|
507 |
+
display: block;
|
508 |
+
height: 34px;
|
509 |
+
margin-bottom: 8px;
|
510 |
+
padding: 5px 0 0 35px;
|
511 |
+
vertical-align: top;
|
512 |
+
font-size:16px;
|
513 |
+
}
|
514 |
+
.ufbl-template-2 .ufbl-email-field {
|
515 |
+
background: #f7f7f7 url("../images/mail.png") no-repeat scroll right 10px center / 20px auto;
|
516 |
+
height: 35px;
|
517 |
+
}
|
518 |
+
.ufbl-template-2 .ufbl-form-message.ufbl-success-message{
|
519 |
+
border: 1px solid #aab2bd;
|
520 |
+
font-size: 15px;
|
521 |
+
padding: 5px 10px;
|
522 |
+
}
|
523 |
+
.ufbl-template-2 .ufbl-form-message.ufbl-error-message {
|
524 |
+
border: 1px solid #ff0000;
|
525 |
+
color: #ff0000;
|
526 |
+
font-size: 15px;
|
527 |
+
padding: 5px 10px;
|
528 |
+
}
|
529 |
+
/**-------- dropdown ------ */
|
530 |
+
.ufbl-template-2 .sbSelector{
|
531 |
+
line-height:34px !important;
|
532 |
+
}
|
533 |
+
.ufbl-template-2 .sbSelector:link, .sbSelector:visited, .sbSelector:hover {
|
534 |
+
color: #434a54 !important;
|
535 |
+
}
|
536 |
+
.ufbl-template-2 .entry-content a, .ufbl-template-2 .entry-summary a, .ufbl-template-2 .page-content a, .ufbl-template-2 .comment-content a, .ufbl-template-2 .pingback .comment-body > a {
|
537 |
+
border: none !important;
|
538 |
+
}
|
539 |
+
.entry-content a, .entry-summary a, .page-content a, .comment-content a, .pingback .comment-body > a {
|
540 |
+
border-bottom:none !important;
|
541 |
+
}
|
542 |
+
.ufbl-template-2 .ufbl-form-field .sbHolder {
|
543 |
+
background-color: #ffffff;
|
544 |
+
font-size: 14px;
|
545 |
+
width: 50% !important;
|
546 |
+
border: 1px solid #aab2bd !important;
|
547 |
+
height:35px;
|
548 |
+
}
|
549 |
+
.ufbl-template-2 .sbOptions {
|
550 |
+
background-color: #ffffff !important;
|
551 |
+
border: 1px solid #aab2bd;
|
552 |
+
color: #000000 !important;
|
553 |
+
top: 33px !important;
|
554 |
+
width: 101% !important;
|
555 |
+
}
|
556 |
+
.ufbl-template-2 .sbOptions a:link, .ufbl-template-2 .sbOptions a:visited {
|
557 |
+
color:#999999 !important;
|
558 |
+
}
|
559 |
+
.ufbl-template-2 .sbOptions a:hover, .ufbl-template-2 .sbOptions a:focus, .ufbl-template-2 .sbOptions a.sbFocus {
|
560 |
+
background-color: #74baf5;
|
561 |
+
color:#fff !important;
|
562 |
+
}
|
563 |
+
.ufbl-template-2 .sbOptions{
|
564 |
+
max-height:inherit !important;
|
565 |
+
}
|
566 |
+
.ufbl-template-2 .sbOptions li {
|
567 |
+
padding: 0 !important;
|
568 |
+
border-bottom:1px solid #aab2bd;
|
569 |
+
}
|
570 |
+
.ufbl-template-2 .sbOptions li:last-child{
|
571 |
+
border-bottom: none;
|
572 |
+
}
|
573 |
+
.ufbl-template-2 .sbToggle {
|
574 |
+
background-attachment: scroll !important;
|
575 |
+
background-clip: border-box !important;
|
576 |
+
background-color: rgba(0, 0, 0, 0) !important;
|
577 |
+
background-image: url("../images/option-angle.png") !important;
|
578 |
+
background-origin: padding-box !important;
|
579 |
+
background-position: right 15px center;
|
580 |
+
background-repeat: no-repeat !important;
|
581 |
+
background-size: auto auto !important;
|
582 |
+
}
|
583 |
+
.ufbl-template-2.sbToggle:hover, .ufbl-template-2 .sbToggle:focus {
|
584 |
+
background-attachment: scroll !important;
|
585 |
+
background-clip: border-box !important;
|
586 |
+
background-color: rgba(0, 0, 0, 0) !important;
|
587 |
+
background-image: url("../images/option-angle.png") !important;
|
588 |
+
background-origin: padding-box !important;
|
589 |
+
background-position: right 15px center;
|
590 |
+
background-repeat: no-repeat !important;
|
591 |
+
background-size: auto auto !important;
|
592 |
+
outline:none;
|
593 |
+
}
|
594 |
+
/**-------- Template 2 end ------ */
|
595 |
+
/**-------- Template 3 ------ */
|
596 |
+
.ufbl-form-wrapper.ufbl-template-3 {
|
597 |
+
background-color: #fff;
|
598 |
+
padding:40px 30px;
|
599 |
+
-webkit-box-shadow: 0 3px 8px 3px rgba(0,0,0,0.4);
|
600 |
+
box-shadow: 0 3px 8px 3px rgba(0,0,0,0.4);
|
601 |
+
}
|
602 |
+
.ufbl-template-3 .ufbl-form-title {
|
603 |
+
margin-bottom: 40px;
|
604 |
+
font-size:22px;
|
605 |
+
color:#3979a9;
|
606 |
+
text-transform:uppercase;
|
607 |
+
}
|
608 |
+
.ufbl-template-3 .ufbl-form-field-wrap{
|
609 |
+
margin-bottom:20px;
|
610 |
+
}
|
611 |
+
.ufbl-template-3 .ufbl-form-field-wrap > label{
|
612 |
+
display:inline-block;
|
613 |
+
width:135px;
|
614 |
+
font-size:16px;
|
615 |
+
color:#000;
|
616 |
+
vertical-align:top;
|
617 |
+
margin-top:7px;
|
618 |
+
}
|
619 |
+
.ufbl-template-3 .ufbl-form-field {
|
620 |
+
display: inline-block;
|
621 |
+
width: 75%;
|
622 |
+
}
|
623 |
+
.ufbl-template-3 .ufbl-form-field input[type="text"], .ufbl-template-3 .ufbl-form-field input[type="email"],.ufbl-template-3 .ufbl-form-field input[type="password"],.ufbl-template-3 .ufbl-form-field textarea,.ufbl-template-3 .ufbl-form-field input[type="reset"] {
|
624 |
+
border: 3px solid #74baf5;
|
625 |
+
padding:4px 8px;
|
626 |
+
background-color:transparent;
|
627 |
+
font-size:14px;
|
628 |
+
}
|
629 |
+
.ufbl-template-3 .ufbl-form-field .ufbl-form-reset:hover{
|
630 |
+
background:#52a2e5;
|
631 |
+
border-color:#52a2e5;
|
632 |
+
}
|
633 |
+
.ufbl-template-3 input[type="checkbox"], input[type="radio"] button, select, textarea{
|
634 |
+
outline:none !important;
|
635 |
+
}
|
636 |
+
.ufbl-template-3 .ufbl-form-checkbox{
|
637 |
+
margin-right:5px;
|
638 |
+
}
|
639 |
+
.ufbl-template-3 .ufbl-required:focus{
|
640 |
+
-webkit-box-shadow: 0 0 1px 1px #67D5EB;
|
641 |
+
box-shadow: 0 0 1px 1px #67D5EB;
|
642 |
+
}
|
643 |
+
.ufbl-template-3 #your-hobbies > label {
|
644 |
+
vertical-align: top !important;
|
645 |
+
}
|
646 |
+
.ufbl-template-3 .your-hobbies .ufbl-form-field > label {
|
647 |
+
display: block;
|
648 |
+
margin-bottom: 10px;
|
649 |
+
}
|
650 |
+
.ufbl-template-3 *::-moz-placeholder {
|
651 |
+
color: rgba(51, 51, 51, 0.7);
|
652 |
+
font-family: "Noto Sans",sans-serif;
|
653 |
+
opacity: 1;
|
654 |
+
font-size: 14px;
|
655 |
+
}
|
656 |
+
.ufbl-template-3 select.ufbl-required, .ufbl-template-3 .ufbl-form-field select,.ufbl-template-3 .ufbl-form-field .ufbl-number-field {
|
657 |
+
border: 3px solid #74baf5;
|
658 |
+
width:50%;
|
659 |
+
padding:5px;
|
660 |
+
font-size:14px;
|
661 |
+
cursor:pointer;
|
662 |
+
height:38px;
|
663 |
+
background:transparent;
|
664 |
+
}
|
665 |
+
.ufbl-template-3 .ufbl-email-field{
|
666 |
+
font-size:14px;
|
667 |
+
box-shadow: none;
|
668 |
+
padding:8px;
|
669 |
+
}
|
670 |
+
.ufbl-template-3 #asdfasdf > label {
|
671 |
+
margin-top:7px;
|
672 |
+
}
|
673 |
+
.ufbl-template-3 .ufbl-form-submit {
|
674 |
+
background-color: #74baf5;
|
675 |
+
}
|
676 |
+
.ufbl-template-3 .ufbl-form-submit:hover {
|
677 |
+
background-color: #52a2e5;
|
678 |
+
}
|
679 |
+
.ufbl-template-3 .ufbl-form-submit:focus {
|
680 |
+
color: #fff;
|
681 |
+
}
|
682 |
+
.ufbl-template-3 .ufbl-form-reset {
|
683 |
+
border:3px solid #74baf5 !important;
|
684 |
+
background-color:transparent;
|
685 |
+
color:#434a54;
|
686 |
+
padding:9px 20px !important;
|
687 |
+
border-radius:0 !important;
|
688 |
+
text-transform: none;
|
689 |
+
}
|
690 |
+
.ufbl-template-3 .ufbl-form-reset:hover {
|
691 |
+
background-color: #52a2e5;
|
692 |
+
border-color:#52a2e5 !important;
|
693 |
+
color:#fff;
|
694 |
+
}
|
695 |
+
.ufbl-template-3 .ufbl-form-reset:focus{
|
696 |
+
color:#fff;
|
697 |
+
}
|
698 |
+
.ufbl-template-3 .ufbl-form-field .ufbl-form-submit {
|
699 |
+
font-size: 15px;
|
700 |
+
margin-left: 135px;
|
701 |
+
text-transform: none;
|
702 |
+
}
|
703 |
+
.ufbl-template-3 .ufbl-error {
|
704 |
+
color: #ff0000;
|
705 |
+
font-size: 13px;
|
706 |
+
margin-top:5px;
|
707 |
+
text-align:right;
|
708 |
+
font-style:italic;
|
709 |
+
}
|
710 |
+
.ufbl-template-3 .ufbl-math-captcha-ans {
|
711 |
+
border: 3px solid #74baf5;
|
712 |
+
margin-top: 3px;
|
713 |
+
width: 154px;
|
714 |
+
height:38px;
|
715 |
+
padding:2px 6px;
|
716 |
+
}
|
717 |
+
.ufbl-template-3 input.ufbl-form-radio{
|
718 |
+
display:none;
|
719 |
+
}
|
720 |
+
.ufbl-template-3 input[type=radio] + label{
|
721 |
+
background: rgba(0, 0, 0, 0) url("../images/uncheck-radio-bold-border.png") no-repeat scroll left center;
|
722 |
+
cursor: pointer;
|
723 |
+
display: block;
|
724 |
+
font-size: 16px;
|
725 |
+
height: 34px;
|
726 |
+
margin-bottom: 8px;
|
727 |
+
padding: 3px 0 0 35px;
|
728 |
+
vertical-align: top;
|
729 |
+
}
|
730 |
+
.ufbl-template-3 input[type=radio]:checked + label{
|
731 |
+
background: rgba(0, 0, 0, 0) url("../images/checked-radio-bold-border.png") no-repeat scroll left center;
|
732 |
+
cursor: pointer;
|
733 |
+
display: block;
|
734 |
+
height: 34px;
|
735 |
+
margin-bottom: 8px;
|
736 |
+
padding: 3px 0 0 35px;
|
737 |
+
vertical-align: top;
|
738 |
+
}
|
739 |
+
.ufbl-template-3 .ufbl-form-checkbox {
|
740 |
+
display:none;
|
741 |
+
}
|
742 |
+
.ufbl-template-3 input[type=checkbox]:checked + label {
|
743 |
+
background: rgba(0, 0, 0, 0) url("../images/check-box-checked-bold-border.png") no-repeat scroll left center;
|
744 |
+
cursor: pointer;
|
745 |
+
display: block;
|
746 |
+
height: 34px;
|
747 |
+
margin-bottom: 8px;
|
748 |
+
padding: 4px 0 0 35px;
|
749 |
+
vertical-align: top;
|
750 |
+
}
|
751 |
+
.ufbl-template-3 input[type=checkbox] + label {
|
752 |
+
background: rgba(0, 0, 0, 0) url("../images/check-box-bod-border.png") no-repeat scroll left center;
|
753 |
+
cursor: pointer;
|
754 |
+
display: block;
|
755 |
+
height: 34px;
|
756 |
+
margin-bottom: 8px;
|
757 |
+
padding: 4px 0 0 35px;
|
758 |
+
vertical-align: top;
|
759 |
+
font-size:16px;
|
760 |
+
}
|
761 |
+
.ufbl-template-3 .ufbl-email-field{
|
762 |
+
background: #f7f7f7 url("../images/mail.png") no-repeat scroll right 10px center / 20px auto;
|
763 |
+
height:40px;
|
764 |
+
}
|
765 |
+
.ufbl-template-3 .ufbl-form-message.ufbl-success-message{
|
766 |
+
border: 3px solid #74baf5;
|
767 |
+
font-size: 15px;
|
768 |
+
padding: 5px 10px;
|
769 |
+
}
|
770 |
+
.ufbl-template-3 .ufbl-form-message.ufbl-error-message {
|
771 |
+
border: 3px solid #ff0000;
|
772 |
+
color: #ff0000;
|
773 |
+
font-size: 15px;
|
774 |
+
padding: 5px 10px;
|
775 |
+
}
|
776 |
+
/**-------- dropdown ------ */
|
777 |
+
.ufbl-template-3 .sbSelector{
|
778 |
+
line-height:35px !important;
|
779 |
+
}
|
780 |
+
.ufbl-template-3 .sbSelector:link, .sbSelector:visited, .sbSelector:hover {
|
781 |
+
color: #434a54 !important;
|
782 |
+
}
|
783 |
+
.ufbl-template-3 .entry-content a, .ufbl-template-3 .entry-summary a, .ufbl-template-3 .page-content a, .ufbl-template-3 .comment-content a, .ufbl-template-3 .pingback .comment-body > a {
|
784 |
+
border: none !important;
|
785 |
+
}
|
786 |
+
.ufbl-template-3 .ufbl-form-field .sbHolder {
|
787 |
+
background-color: #ffffff;
|
788 |
+
font-size: 14px;
|
789 |
+
width: 50% !important;
|
790 |
+
border: 3px solid #74baf5 !important;
|
791 |
+
height:40px;
|
792 |
+
}
|
793 |
+
.ufbl-template-3 .sbOptions {
|
794 |
+
background-color: #ffffff !important;
|
795 |
+
border: 3px solid #74baf5;
|
796 |
+
color: #000000 !important;
|
797 |
+
margin-left: -2px;
|
798 |
+
top: 29px !important;
|
799 |
+
width: 103% !important;
|
800 |
+
}
|
801 |
+
.ufbl-template-3 .sbOptions a:link, .ufbl-template-3 .sbOptions a:visited {
|
802 |
+
color:#999999 !important;
|
803 |
+
}
|
804 |
+
.ufbl-template-3 .sbOptions a:hover, .ufbl-template-3 .sbOptions a:focus, .ufbl-template-3 .sbOptions a.sbFocus {
|
805 |
+
background-color: #74baf5;
|
806 |
+
color:#fff !important;
|
807 |
+
}
|
808 |
+
.ufbl-template-3 .sbOptions{
|
809 |
+
max-height:inherit !important;
|
810 |
+
}
|
811 |
+
.ufbl-template-3 .sbOptions li {
|
812 |
+
padding: 0 !important;
|
813 |
+
border-bottom:3px solid #74baf5;
|
814 |
+
}
|
815 |
+
.ufbl-template-3 .sbOptions li:last-child{
|
816 |
+
border-bottom: none;
|
817 |
+
}
|
818 |
+
.ufbl-template-3 .sbToggle {
|
819 |
+
background-attachment: scroll !important;
|
820 |
+
background-clip: border-box !important;
|
821 |
+
background-color: rgba(0, 0, 0, 0) !important;
|
822 |
+
background-image: url("../images/option-angle.png") !important;
|
823 |
+
background-origin: padding-box !important;
|
824 |
+
background-position: right 15px center;
|
825 |
+
background-repeat: no-repeat !important;
|
826 |
+
background-size: auto auto !important;
|
827 |
+
}
|
828 |
+
.ufbl-template-3.sbToggle:hover, .ufbl-template-2 .sbToggle:focus {
|
829 |
+
background-attachment: scroll !important;
|
830 |
+
background-clip: border-box !important;
|
831 |
+
background-color: rgba(0, 0, 0, 0) !important;
|
832 |
+
background-image: url("../images/option-angle.png") !important;
|
833 |
+
background-origin: padding-box !important;
|
834 |
+
background-position: right 15px center;
|
835 |
+
background-repeat: no-repeat !important;
|
836 |
+
background-size: auto auto !important;
|
837 |
+
outline:none;
|
838 |
+
}
|
839 |
+
/**-------- Template 3 end ------ */
|
840 |
+
/**-------- Template 4 ------ */
|
841 |
+
.ufbl-form-wrapper.ufbl-template-4 {
|
842 |
+
background-color: #fff;
|
843 |
+
padding:40px 30px;
|
844 |
+
-webkit-box-shadow: 0 3px 8px 3px rgba(0,0,0,0.4);
|
845 |
+
box-shadow: 0 3px 8px 3px rgba(0,0,0,0.4);
|
846 |
+
}
|
847 |
+
.ufbl-template-4 .ufbl-form-title {
|
848 |
+
margin-bottom: 40px;
|
849 |
+
font-size:22px;
|
850 |
+
color:#3979a9;
|
851 |
+
text-transform:uppercase;
|
852 |
+
}
|
853 |
+
.ufbl-template-4 .ufbl-form-field-wrap{
|
854 |
+
margin-bottom:20px;
|
855 |
+
}
|
856 |
+
.ufbl-template-4 .ufbl-form-field-wrap > label{
|
857 |
+
display:inline-block;
|
858 |
+
width:135px;
|
859 |
+
font-size:16px;
|
860 |
+
color:#000;
|
861 |
+
vertical-align:top;
|
862 |
+
margin-top:7px;
|
863 |
+
}
|
864 |
+
.ufbl-template-4 .ufbl-form-field {
|
865 |
+
display: inline-block;
|
866 |
+
width: 75%;
|
867 |
+
}
|
868 |
+
.ufbl-template-4 input[type="text"],.ufbl-template-4 input[type="email"],.ufbl-template-4 input[type="url"],.ufbl-template-4 input[type="password"],.ufbl-template-4 input[type="search"], textarea {
|
869 |
+
border:transparent;
|
870 |
+
border-bottom: 2px solid #74baf5;
|
871 |
+
padding: 4px 8px;
|
872 |
+
background-color: transparent;
|
873 |
+
}
|
874 |
+
.ufbl-template-4 textarea{
|
875 |
+
outline: 1px solid #74baf5 !important;
|
876 |
+
border-bottom: 2px solid #74baf5;
|
877 |
+
background-color:transparent;
|
878 |
+
}
|
879 |
+
.ufbl-template-4 input[type="checkbox"], input[type="radio"] button, select, textarea{
|
880 |
+
outline:none !important;
|
881 |
+
}
|
882 |
+
.ufbl-template-4 .ufbl-form-checkbox{
|
883 |
+
margin-right:5px;
|
884 |
+
}
|
885 |
+
.ufbl-template-4 .ufbl-email-field:focus,.ufbl-template-4 input[type="text"]:focus,.ufbl-template-4 input[type="number"]:focus,.ufbl-template-4 input[type="url"]:focus,.ufbl-template-4 input[type="password"]:focus,.ufbl-template-4 input[type="search"]:focus,.ufbl-template-4 textarea:focus{
|
886 |
+
-webkit-box-shadow: 0 0 1px 1px #67D5EB;
|
887 |
+
box-shadow: 0 0 1px 1px #67D5EB;
|
888 |
+
}
|
889 |
+
.ufbl-template-4 #your-hobbies > label {
|
890 |
+
vertical-align: top !important;
|
891 |
+
}
|
892 |
+
.ufbl-template-4 .your-hobbies .ufbl-form-field > label {
|
893 |
+
display: block;
|
894 |
+
margin-bottom: 10px;
|
895 |
+
}
|
896 |
+
.ufbl-template-4 *::-moz-placeholder {
|
897 |
+
color: rgba(51, 51, 51, 0.7)!important;
|
898 |
+
font-family: "Noto Sans",sans-serif;
|
899 |
+
opacity: 1;
|
900 |
+
font-size: 14px;
|
901 |
+
}
|
902 |
+
.ufbl-template-4 select.ufbl-required, .ufbl-template-4 .ufbl-form-field select,.ufbl-template-4 .ufbl-form-field .ufbl-number-field {
|
903 |
+
border:transparent;
|
904 |
+
border-bottom: 2px solid #74baf5;
|
905 |
+
width:50%;
|
906 |
+
padding:5px;
|
907 |
+
font-size:14px;
|
908 |
+
cursor:pointer;
|
909 |
+
height:38px;
|
910 |
+
background-color: transparent;
|
911 |
+
}
|
912 |
+
.ufbl-template-4 .ufbl-email-field{
|
913 |
+
font-size:14px;
|
914 |
+
box-shadow: none;
|
915 |
+
padding:8px;
|
916 |
+
}
|
917 |
+
.ufbl-template-4 .ufbl-form-submit {
|
918 |
+
background-color: #74baf5;
|
919 |
+
}
|
920 |
+
.ufbl-template-4 .ufbl-form-submit:hover {
|
921 |
+
background-color: #52a2e5;
|
922 |
+
}
|
923 |
+
.ufbl-template-4 .ufbl-form-submit:focus {
|
924 |
+
color: #fff;
|
925 |
+
}
|
926 |
+
.ufbl-template-4 .ufbl-form-reset {
|
927 |
+
background-color: rgba(0, 0, 0, 0);
|
928 |
+
border: 2px solid #74baf5 !important;
|
929 |
+
border-radius: 0 !important;
|
930 |
+
color: #434a54;
|
931 |
+
font-size: 15px;
|
932 |
+
padding: 10px 20px !important;
|
933 |
+
text-transform: none;
|
934 |
+
}
|
935 |
+
.ufbl-template-4 .ufbl-form-reset:hover {
|
936 |
+
background-color: #52a2e5;
|
937 |
+
border-color:#52a2e5;
|
938 |
+
color:#fff;
|
939 |
+
}
|
940 |
+
.ufbl-template-4 .ufbl-form-reset:focus{
|
941 |
+
color:#fff;
|
942 |
+
}
|
943 |
+
.ufbl-template-4 .ufbl-form-field .ufbl-form-submit {
|
944 |
+
font-size: 15px;
|
945 |
+
margin-left: 135px;
|
946 |
+
text-transform: none;
|
947 |
+
}
|
948 |
+
.ufbl-template-4 .ufbl-error {
|
949 |
+
color: #ff0000;
|
950 |
+
font-size: 13px;
|
951 |
+
margin-top:5px;
|
952 |
+
text-align:right;
|
953 |
+
font-style:italic;
|
954 |
+
}
|
955 |
+
.ufbl-template-4 .ufbl-math-captcha-ans {
|
956 |
+
border:transparent;
|
957 |
+
border-bottom: 2px solid #74baf5;
|
958 |
+
background-color:transparent;
|
959 |
+
margin-top: 3px;
|
960 |
+
width: 154px;
|
961 |
+
height:38px;
|
962 |
+
padding:2px 6px;
|
963 |
+
font-size:15px;
|
964 |
+
}
|
965 |
+
.ufbl-template-4 input.ufbl-form-radio{
|
966 |
+
display:none;
|
967 |
+
}
|
968 |
+
.ufbl-template-4 input[type=radio] + label{
|
969 |
+
background: rgba(0, 0, 0, 0) url("../images/uncheck-radio-bold-border.png") no-repeat scroll left center;
|
970 |
+
cursor: pointer;
|
971 |
+
display: block;
|
972 |
+
font-size: 16px;
|
973 |
+
height: 34px;
|
974 |
+
margin-bottom: 8px;
|
975 |
+
padding: 3px 0 0 35px;
|
976 |
+
vertical-align: top;
|
977 |
+
}
|
978 |
+
.ufbl-template-4 input[type=radio]:checked + label{
|
979 |
+
background: rgba(0, 0, 0, 0) url("../images/checked-radio-bold-border.png") no-repeat scroll left center;
|
980 |
+
cursor: pointer;
|
981 |
+
display: block;
|
982 |
+
height: 34px;
|
983 |
+
margin-bottom: 8px;
|
984 |
+
padding: 3px 0 0 35px;
|
985 |
+
vertical-align: top;
|
986 |
+
}
|
987 |
+
.ufbl-template-4 .ufbl-form-checkbox {
|
988 |
+
display:none;
|
989 |
+
}
|
990 |
+
.ufbl-template-4 input[type=checkbox]:checked + label {
|
991 |
+
background: rgba(0, 0, 0, 0) url("../images/check-box-checked-bold-border.png") no-repeat scroll left center;
|
992 |
+
cursor: pointer;
|
993 |
+
display: block;
|
994 |
+
height: 34px;
|
995 |
+
margin-bottom: 8px;
|
996 |
+
padding: 4px 0 0 35px;
|
997 |
+
vertical-align: top;
|
998 |
+
}
|
999 |
+
.ufbl-template-4 input[type=checkbox] + label {
|
1000 |
+
background: rgba(0, 0, 0, 0) url("../images/check-box-bod-border.png") no-repeat scroll left center;
|
1001 |
+
cursor: pointer;
|
1002 |
+
display: block;
|
1003 |
+
height: 34px;
|
1004 |
+
margin-bottom: 8px;
|
1005 |
+
padding: 4px 0 0 35px;
|
1006 |
+
vertical-align: top;
|
1007 |
+
font-size:16px;
|
1008 |
+
}
|
1009 |
+
.ufbl-template-4 .ufbl-email-field {
|
1010 |
+
background: url("../images/mail.png") no-repeat scroll right 10px center / 20px auto;
|
1011 |
+
height:40px;
|
1012 |
+
}
|
1013 |
+
.ufbl-template-4 .ufbl-form-message.ufbl-success-message{
|
1014 |
+
border: 2px solid #74baf5;
|
1015 |
+
font-size: 15px;
|
1016 |
+
padding: 5px 10px;
|
1017 |
+
}
|
1018 |
+
.ufbl-template-4 .ufbl-form-message.ufbl-error-message {
|
1019 |
+
border: 2px solid #ff0000;
|
1020 |
+
color: #ff0000;
|
1021 |
+
font-size: 15px;
|
1022 |
+
padding: 5px 10px;
|
1023 |
+
}
|
1024 |
+
/**-------- dropdown ------ */
|
1025 |
+
.ufbl-template-4 .sbSelector{
|
1026 |
+
line-height:30px !important;
|
1027 |
+
}
|
1028 |
+
.ufbl-template-4 .sbSelector:link, .sbSelector:visited, .sbSelector:hover {
|
1029 |
+
color: #434a54 !important;
|
1030 |
+
}
|
1031 |
+
.ufbl-template-4 .entry-content a, .ufbl-template-4 .entry-summary a, .ufbl-template-4 .page-content a, .ufbl-template-4 .comment-content a, .ufbl-template-4 .pingback .comment-body > a {
|
1032 |
+
border: none !important;
|
1033 |
+
}
|
1034 |
+
.ufbl-template-4 .ufbl-form-field .sbHolder {
|
1035 |
+
background-color: #ffffff;
|
1036 |
+
font-size: 14px;
|
1037 |
+
width: 50% !important;
|
1038 |
+
border: transparent;
|
1039 |
+
border-bottom: 2px solid #74baf5 !important;
|
1040 |
+
height:35px;
|
1041 |
+
}
|
1042 |
+
.ufbl-template-4 .sbOptions {
|
1043 |
+
background-color: #ffffff !important;
|
1044 |
+
border:transparent;
|
1045 |
+
color: #000000 !important;
|
1046 |
+
margin-left: -2px;
|
1047 |
+
top: 35px !important;
|
1048 |
+
width: 103% !important;
|
1049 |
+
}
|
1050 |
+
.ufbl-template-4 .sbOptions a:link, .ufbl-template-3 .sbOptions a:visited {
|
1051 |
+
color:#999999 !important;
|
1052 |
+
}
|
1053 |
+
.ufbl-template-4 .sbOptions a:hover, .ufbl-template-3 .sbOptions a:focus, .ufbl-template-3 .sbOptions a.sbFocus {
|
1054 |
+
background-color: transparent;
|
1055 |
+
color:#74baf5 !important;
|
1056 |
+
}
|
1057 |
+
.ufbl-template-4 .sbOptions{
|
1058 |
+
max-height:inherit !important;
|
1059 |
+
}
|
1060 |
+
.ufbl-template-4 .sbOptions li {
|
1061 |
+
padding: 0 !important;
|
1062 |
+
border-bottom:2px solid #74baf5;
|
1063 |
+
}
|
1064 |
+
.ufbl-template-4 .sbToggle {
|
1065 |
+
background-attachment: scroll !important;
|
1066 |
+
background-clip: border-box !important;
|
1067 |
+
background-color: rgba(0, 0, 0, 0) !important;
|
1068 |
+
background-image: url("../images/option-angle.png") !important;
|
1069 |
+
background-origin: padding-box !important;
|
1070 |
+
background-position: right 15px center;
|
1071 |
+
background-repeat: no-repeat !important;
|
1072 |
+
background-size: auto auto !important;
|
1073 |
+
}
|
1074 |
+
.ufbl-template-4.sbToggle:hover, .ufbl-template-2 .sbToggle:focus {
|
1075 |
+
background-attachment: scroll !important;
|
1076 |
+
background-clip: border-box !important;
|
1077 |
+
background-color: rgba(0, 0, 0, 0) !important;
|
1078 |
+
background-image: url("../images/option-angle.png") !important;
|
1079 |
+
background-origin: padding-box !important;
|
1080 |
+
background-position: right 15px center;
|
1081 |
+
background-repeat: no-repeat !important;
|
1082 |
+
background-size: auto auto !important;
|
1083 |
+
outline:none;
|
1084 |
+
}
|
1085 |
+
/**-------- Template 4 end ------ */
|
1086 |
+
/**-------- Template 5 ------ */
|
1087 |
+
|
1088 |
+
/**-------- Template 5 end ------ */
|
1089 |
+
|
1090 |
+
|
1091 |
+
|
1092 |
+
|
1093 |
+
|
1094 |
+
|
1095 |
+
|
1096 |
+
|
1097 |
+
/**-------- Responsive css ------ */
|
1098 |
+
|
1099 |
+
@media only screen and (max-width: 1300px) {
|
1100 |
+
/**-------- template 1 ------ */
|
1101 |
+
.ufbl-template-1 .ufbl-form-field, .ufbl-template-2 .ufbl-form-field, .ufbl-template-3 .ufbl-form-field,
|
1102 |
+
.ufbl-template-4 .ufbl-form-field {
|
1103 |
+
width: 72%;
|
1104 |
+
}
|
1105 |
+
|
1106 |
+
|
1107 |
+
|
1108 |
+
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
@media only screen and (max-width: 1200px) {
|
1112 |
+
/**-------- template 1 ------ */
|
1113 |
+
.ufbl-template-1 .ufbl-form-field, .ufbl-template-2 .ufbl-form-field, .ufbl-template-3 .ufbl-form-field,
|
1114 |
+
.ufbl-template-4 .ufbl-form-field {
|
1115 |
+
width: 67%;
|
1116 |
+
}
|
1117 |
+
.ufbl-template-1 .ufbl-form-submit, .ufbl-template-2 .ufbl-form-submit, .ufbl-template-3 .ufbl-form-field .ufbl-form-submit,
|
1118 |
+
.ufbl-template-4 .ufbl-form-field .ufbl-form-submit {
|
1119 |
+
margin-left: 0;
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
@media only screen and (max-width: 1024px) {
|
1126 |
+
/**-------- template 1 ------ */
|
1127 |
+
.ufbl-template-1 .ufbl-form-field,.ufbl-template-2 .ufbl-form-field, .ufbl-template-3 .ufbl-form-field,
|
1128 |
+
.ufbl-template-4 .ufbl-form-field {
|
1129 |
+
width: 100%;
|
1130 |
+
}
|
1131 |
+
.ufbl-template-1 .ufbl-form-field-wrap > label, .ufbl-template-2 .ufbl-form-field-wrap > label,
|
1132 |
+
.ufbl-template-3 .ufbl-form-field-wrap > label, .ufbl-template-4 .ufbl-form-field-wrap > label {
|
1133 |
+
margin-top: 7px;
|
1134 |
+
}
|
1135 |
+
}
|
1136 |
+
|
1137 |
+
|
1138 |
+
@media only screen and (max-width: 955px) {
|
1139 |
+
/**-------- template 1 ------ */
|
1140 |
+
.ufbl-template-1 .ufbl-form-field, .ufbl-template-2 .ufbl-form-field, .ufbl-template-3 .ufbl-form-field,
|
1141 |
+
.ufbl-template-4 .ufbl-form-field {
|
1142 |
+
width: 71%;
|
1143 |
+
}
|
1144 |
+
}
|
1145 |
+
|
1146 |
+
@media only screen and (max-width: 800px) {
|
1147 |
+
/**-------- template 1 ------ */
|
1148 |
+
.ufbl-template-1 .ufbl-form-field, .ufbl-template-2 .ufbl-form-field, .ufbl-template-3 .ufbl-form-field,
|
1149 |
+
.ufbl-template-4 .ufbl-form-field {
|
1150 |
+
width: 100%;
|
1151 |
+
}
|
1152 |
+
.ufbl-template-1 .ufbl-form-field-wrap > label, .ufbl-template-2 .ufbl-form-field-wrap > label,
|
1153 |
+
.ufbl-template-3 .ufbl-form-field-wrap > label, .ufbl-template-4 .ufbl-form-field-wrap > label {
|
1154 |
+
width: 100%;
|
1155 |
+
}
|
1156 |
+
}
|
1157 |
+
|
1158 |
+
@media only screen and (max-width: 640px) {
|
1159 |
+
/**-------- template 1 ------ */
|
1160 |
+
.ufbl-template-1 .ufbl-form-submit, .ufbl-template-2 .ufbl-form-submit, .ufbl-template-3 .ufbl-form-submit,
|
1161 |
+
.ufbl-template-4 .ufbl-form-submit {
|
1162 |
+
margin-bottom: 10px;
|
1163 |
+
margin-left: 0;
|
1164 |
+
}
|
1165 |
+
}
|
css/jquery.selectbox.css
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@CHARSET "UTF-8";
|
2 |
+
.sbHolder{
|
3 |
+
background-color: #2d2d2d;
|
4 |
+
border: solid 1px #515151;
|
5 |
+
font-family: Arial, sans-serif;
|
6 |
+
font-size: 12px;
|
7 |
+
font-weight: normal;
|
8 |
+
height: 33px;
|
9 |
+
position: relative;
|
10 |
+
width: 200px;
|
11 |
+
}
|
12 |
+
.sbHolder:focus .sbSelector{
|
13 |
+
|
14 |
+
}
|
15 |
+
.sbSelector{
|
16 |
+
display: block;
|
17 |
+
height: 30px;
|
18 |
+
left: 0;
|
19 |
+
line-height: 30px;
|
20 |
+
outline: none;
|
21 |
+
overflow: hidden;
|
22 |
+
position: absolute;
|
23 |
+
text-indent: 10px;
|
24 |
+
top: 0;
|
25 |
+
width: 100%;
|
26 |
+
}
|
27 |
+
.sbSelector:link, .sbSelector:visited, .sbSelector:hover{
|
28 |
+
color: #EBB52D;
|
29 |
+
outline: none;
|
30 |
+
text-decoration: none;
|
31 |
+
}
|
32 |
+
.sbToggle{
|
33 |
+
background: url(../images/select-icons.png) 0 -116px no-repeat;
|
34 |
+
display: block;
|
35 |
+
height: 30px;
|
36 |
+
outline: none;
|
37 |
+
position: absolute;
|
38 |
+
right: 0;
|
39 |
+
top: 0;
|
40 |
+
width: 30px;
|
41 |
+
}
|
42 |
+
.sbToggle:hover{
|
43 |
+
background: url(../images/select-icons.png) 0 -167px no-repeat;
|
44 |
+
}
|
45 |
+
.sbToggleOpen{
|
46 |
+
background: url(../images/select-icons.png) 0 -16px no-repeat;
|
47 |
+
}
|
48 |
+
.sbToggleOpen:hover{
|
49 |
+
background: url(../images/select-icons.png) 0 -66px no-repeat;
|
50 |
+
}
|
51 |
+
.sbHolderDisabled{
|
52 |
+
background-color: #3C3C3C;
|
53 |
+
border: solid 1px #515151;
|
54 |
+
}
|
55 |
+
.sbHolderDisabled .sbHolder{
|
56 |
+
|
57 |
+
}
|
58 |
+
.sbHolderDisabled .sbToggle{
|
59 |
+
|
60 |
+
}
|
61 |
+
.sbOptions{
|
62 |
+
background-color: #212121;
|
63 |
+
border: solid 1px #515151;
|
64 |
+
list-style: none;
|
65 |
+
left: -1px;
|
66 |
+
margin: 0;
|
67 |
+
padding: 0;
|
68 |
+
position: absolute;
|
69 |
+
top: 30px;
|
70 |
+
width: 200px;
|
71 |
+
z-index: 1;
|
72 |
+
overflow-y: auto;
|
73 |
+
}
|
74 |
+
.sbOptions li{
|
75 |
+
padding: 0 7px;
|
76 |
+
}
|
77 |
+
.sbOptions a{
|
78 |
+
border-bottom: dotted 1px #515151;
|
79 |
+
display: block;
|
80 |
+
outline: none;
|
81 |
+
padding: 7px 0 7px 3px;
|
82 |
+
}
|
83 |
+
.sbOptions a:link, .sbOptions a:visited{
|
84 |
+
color: #ddd;
|
85 |
+
text-decoration: none;
|
86 |
+
}
|
87 |
+
.sbOptions a:hover,
|
88 |
+
.sbOptions a:focus,
|
89 |
+
.sbOptions a.sbFocus{
|
90 |
+
color: #EBB52D;
|
91 |
+
}
|
92 |
+
.sbOptions li.last a{
|
93 |
+
border-bottom: none;
|
94 |
+
}
|
95 |
+
.sbOptions .sbDisabled{
|
96 |
+
border-bottom: dotted 1px #515151;
|
97 |
+
color: #999;
|
98 |
+
display: block;
|
99 |
+
padding: 7px 0 7px 3px;
|
100 |
+
}
|
101 |
+
.sbOptions .sbGroup{
|
102 |
+
border-bottom: dotted 1px #515151;
|
103 |
+
color: #EBB52D;
|
104 |
+
display: block;
|
105 |
+
font-weight: bold;
|
106 |
+
padding: 7px 0 7px 3px;
|
107 |
+
}
|
108 |
+
.sbOptions .sbSub{
|
109 |
+
padding-left: 17px;
|
110 |
+
}
|
images/ajax-loader-bkp.gif
ADDED
Binary file
|
images/ajax-loader-delete.gif
ADDED
Binary file
|
images/ajax-loader-entry.gif
ADDED
Binary file
|
images/ajax-loader.gif
ADDED
Binary file
|
images/check-box-bod-border.png
ADDED
Binary file
|
images/check-box-checked-bold-border.png
ADDED
Binary file
|
images/check-box-checked.png
ADDED
Binary file
|
images/check-box.png
ADDED
Binary file
|
images/checked-radio-bold-border.png
ADDED
Binary file
|
images/checked-radio.png
ADDED
Binary file
|
images/customize.png
ADDED
Binary file
|
images/form-icon.png
ADDED
Binary file
|
images/mail.png
ADDED
Binary file
|
images/option-angle.png
ADDED
Binary file
|
images/plugin.png
ADDED
Binary file
|
images/previews/default-template.jpg
ADDED
Binary file
|
images/previews/template-1.jpg
ADDED
Binary file
|
images/previews/template-2.jpg
ADDED
Binary file
|
images/previews/template-3.jpg
ADDED
Binary file
|
images/previews/template-4.png
ADDED
Binary file
|
images/select-icons.png
ADDED
Binary file
|
images/theme.png
ADDED
Binary file
|
images/uncheck-radio-bold-border.png
ADDED
Binary file
|
images/uncheck-radio.png
ADDED
Binary file
|
inc/cores/activation.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
4 |
+
/**
|
5 |
+
* Necessary Table Creation on activation
|
6 |
+
*/
|
7 |
+
if ( is_multisite() ) {
|
8 |
+
global $wpdb;
|
9 |
+
$current_blog = $wpdb->blogid;
|
10 |
+
|
11 |
+
// Get all blogs in the network and activate plugin on each one
|
12 |
+
$blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
|
13 |
+
foreach ( $blog_ids as $blog_id ) {
|
14 |
+
switch_to_blog( $blog_id );
|
15 |
+
|
16 |
+
$charset_collate = $wpdb->get_charset_collate();
|
17 |
+
$form_table = $wpdb->prefix . 'ufbl_forms';
|
18 |
+
$form_entry_table = $wpdb->prefix . 'ufbl_entries';
|
19 |
+
$form_sql = "CREATE TABLE $form_table (
|
20 |
+
form_id mediumint(9) NOT NULL AUTO_INCREMENT,
|
21 |
+
form_title varchar(255),
|
22 |
+
form_detail text,
|
23 |
+
form_status int,
|
24 |
+
form_created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
25 |
+
form_modified datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
26 |
+
UNIQUE KEY form_id (form_id)
|
27 |
+
) $charset_collate;";
|
28 |
+
|
29 |
+
$form_entry_sql = "CREATE TABLE $form_entry_table (
|
30 |
+
entry_id mediumint(9) NOT NULL AUTO_INCREMENT,
|
31 |
+
form_id mediumint(9),
|
32 |
+
entry_detail text,
|
33 |
+
entry_created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
34 |
+
UNIQUE KEY entry_id (entry_id)
|
35 |
+
) $charset_collate;";
|
36 |
+
|
37 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
38 |
+
dbDelta( $form_sql );
|
39 |
+
dbDelta( $form_entry_sql );
|
40 |
+
|
41 |
+
|
42 |
+
restore_current_blog();
|
43 |
+
}
|
44 |
+
} else {
|
45 |
+
global $wpdb;
|
46 |
+
|
47 |
+
$charset_collate = $wpdb->get_charset_collate();
|
48 |
+
$form_table = UFBL_FORM_TABLE;
|
49 |
+
$form_entry_table = UFBL_ENTRY_TABLE;
|
50 |
+
$form_sql = "CREATE TABLE $form_table (
|
51 |
+
form_id mediumint(9) NOT NULL AUTO_INCREMENT,
|
52 |
+
form_title varchar(255),
|
53 |
+
form_detail text,
|
54 |
+
form_status int,
|
55 |
+
form_created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
56 |
+
form_modified datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
57 |
+
UNIQUE KEY form_id (form_id)
|
58 |
+
) $charset_collate;";
|
59 |
+
|
60 |
+
$form_entry_sql = "CREATE TABLE $form_entry_table (
|
61 |
+
entry_id mediumint(9) NOT NULL AUTO_INCREMENT,
|
62 |
+
form_id mediumint(9),
|
63 |
+
entry_detail text,
|
64 |
+
entry_created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
65 |
+
UNIQUE KEY entry_id (entry_id)
|
66 |
+
) $charset_collate;";
|
67 |
+
|
68 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
69 |
+
dbDelta( $form_sql );
|
70 |
+
dbDelta( $form_entry_sql );
|
71 |
+
}
|
inc/cores/save-form.php
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Posted Variables
|
5 |
+
* Array
|
6 |
+
(
|
7 |
+
[action] => ufbl_form_action
|
8 |
+
[field_data] => Array
|
9 |
+
(
|
10 |
+
[ufbl_field_1] => Array
|
11 |
+
(
|
12 |
+
[field_label] => Your Name
|
13 |
+
[required] => 1
|
14 |
+
[max_chars] =>
|
15 |
+
[min_chars] =>
|
16 |
+
[error_message] =>
|
17 |
+
[placeholder] =>
|
18 |
+
[pre_filled_value] =>
|
19 |
+
[field_id] =>
|
20 |
+
[field_class] =>
|
21 |
+
[field_type] => textfield
|
22 |
+
)
|
23 |
+
|
24 |
+
[ufbl_field_2] => Array
|
25 |
+
(
|
26 |
+
[field_label] => Your Message
|
27 |
+
[error_message] =>
|
28 |
+
[textarea_rows] =>
|
29 |
+
[textarea_columns] =>
|
30 |
+
[max_chars] =>
|
31 |
+
[min_chars] =>
|
32 |
+
[placeholder] =>
|
33 |
+
[pre_field_value] =>
|
34 |
+
[field_id] =>
|
35 |
+
[field_class] =>
|
36 |
+
[field_type] => textfield
|
37 |
+
)
|
38 |
+
|
39 |
+
[ufbl_field_3] => Array
|
40 |
+
(
|
41 |
+
[field_label] => Your Email
|
42 |
+
[error_message] =>
|
43 |
+
[placeholder] =>
|
44 |
+
[pre_field_value] =>
|
45 |
+
[field_id] =>
|
46 |
+
[field_class] =>
|
47 |
+
[field_type] => email
|
48 |
+
)
|
49 |
+
|
50 |
+
[ufbl_field_4] => Array
|
51 |
+
(
|
52 |
+
[button_label] => Submit
|
53 |
+
[field_id] =>
|
54 |
+
[field_class] =>
|
55 |
+
[field_type] => submit
|
56 |
+
)
|
57 |
+
|
58 |
+
)
|
59 |
+
|
60 |
+
[form_title] => Test Form
|
61 |
+
[form_id] => Test Form
|
62 |
+
[form_key_count] => 4
|
63 |
+
[ufbl_form_nonce_field] => 8aaf69bf4e
|
64 |
+
[_wp_http_referer] => /ultimate-form-builder-lite/wp-admin/admin.php?page=ufbl&action=edit-form&form_id=1
|
65 |
+
)
|
66 |
+
* */
|
67 |
+
global $wpdb;
|
68 |
+
foreach ( $_POST as $key => $val ) {
|
69 |
+
if ( $key == 'field_data' || $key == 'form_design' || $key == 'email_settings' ) {
|
70 |
+
$$key = $val;
|
71 |
+
} else {
|
72 |
+
$$key = sanitize_text_field( $val );
|
73 |
+
}
|
74 |
+
}
|
75 |
+
//global $library_obj;
|
76 |
+
//$library_obj->print_array( $_POST );
|
77 |
+
//die();
|
78 |
+
//echo $form_id;
|
79 |
+
|
80 |
+
|
81 |
+
if ( isset( $field_data ) ) {
|
82 |
+
/**
|
83 |
+
* Sanitizing each form fields
|
84 |
+
*/
|
85 |
+
$field_data_temp = array();
|
86 |
+
foreach ( $field_data as $key => $val ) {
|
87 |
+
$field_data_temp[$key] = array();
|
88 |
+
foreach ( $val as $k => $v ) {
|
89 |
+
if ( !is_array( $v ) ) {
|
90 |
+
$field_data_temp[$key][$k] = sanitize_text_field( $v );
|
91 |
+
} else {
|
92 |
+
$field_data_temp[$key][$k] = array_map( 'sanitize_text_field', $v );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
$field_data = $field_data_temp;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Sanitizing each email field
|
101 |
+
*/
|
102 |
+
$email_settings_temp = array();
|
103 |
+
foreach ( $email_settings as $key => $val ) {
|
104 |
+
if ( $key == 'email_reciever' ) {
|
105 |
+
$email_settings_temp['email_reciever'] = array_map( 'sanitize_email', $val );
|
106 |
+
} else if ( $key == 'from_email' ) {
|
107 |
+
$email_settings_temp[$key] = sanitize_email( $val );
|
108 |
+
} else {
|
109 |
+
$email_settings_temp[$key] = sanitize_text_field( $val );
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
$form_design = array_map( 'sanitize_text_field', $form_design );
|
115 |
+
$email_settings = $email_settings_temp;
|
116 |
+
$form_data = array();
|
117 |
+
$form_data['field_data'] = isset( $field_data ) ? $field_data : array();
|
118 |
+
$form_data['form_design'] = $form_design;
|
119 |
+
$form_data['email_settings'] = $email_settings;
|
120 |
+
$form_data['form_key_count'] = $form_key_count;
|
121 |
+
$form_modified_date = date( 'Y-m-d H:i:s:u' );
|
122 |
+
//$library_obj->print_array( $form_data );
|
123 |
+
|
124 |
+
$wpdb->update(
|
125 |
+
UFBL_FORM_TABLE, array(
|
126 |
+
'form_title' => $form_title, // string
|
127 |
+
'form_detail' => maybe_serialize( $form_data ),
|
128 |
+
'form_modified' => $form_modified_date
|
129 |
+
), array( 'form_id' => $form_id ), array(
|
130 |
+
'%s', // form_title
|
131 |
+
'%s', // form_data
|
132 |
+
'%s' //form_modified
|
133 |
+
), array( '%d' )
|
134 |
+
);
|
135 |
+
$_SESSION['ufbl_message'] = __( 'Form Updated Successfully', UFBL_TD );
|
136 |
+
$redirect_url = admin_url( 'admin.php?page=ufbl&action=edit-form&form_id=' . $form_id );
|
137 |
+
wp_redirect( $redirect_url );
|
138 |
+
exit;
|
139 |
+
|
inc/cores/shortcode.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$form_id = $atts['form_id'];
|
3 |
+
global $wpdb;
|
4 |
+
$table_name = UFBL_FORM_TABLE;
|
5 |
+
$form_row = $wpdb->get_row( "SELECT * FROM $table_name WHERE form_id = $form_id" );
|
6 |
+
self::print_array($form_row);
|
inc/views/backend/about.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<?php self::load_view( 'backend/header' ); ?>
|
3 |
+
<h3><?php _e( 'About', UFBL_TD ); ?></h3>
|
4 |
+
|
5 |
+
<div class="ufbl-content-wrap">
|
6 |
+
<div class="ufbl-content-section">
|
7 |
+
<h4 class="ufbl-content-title">About Plugin</h4>
|
8 |
+
<p>Ultimate Form Builder Lite is a <strong>FREE WordPress Plugin</strong> to build any kind of HTML 5 forms with various configurable backend fields.You can build unlimted forms each with different settings and restrictions.</p>
|
9 |
+
<p>You can choose any of the pre designed templates for each form to assign the proper layout.</p>
|
10 |
+
<p>With simple and easy drag and drop user interface, you can build forms in <strike>Minutes</strike> Seconds.</p>
|
11 |
+
</div>
|
12 |
+
<div class="ufbl-content-section">
|
13 |
+
<h4 class="ufbl-content-title">About Author</h4>
|
14 |
+
<p>AccessPress Themes is a venture of Access Keys - who has developed hundreds of Custom WordPress themes and plugins for its clients over the years.</p>
|
15 |
+
<p>Visit our site to know more: <a href="https://accesspressthemes.com" target="_blank">https://accesspressthemes.com</a></p>
|
16 |
+
|
17 |
+
|
18 |
+
</div>
|
19 |
+
<div class="ufbl-content-section">
|
20 |
+
<h4 class="ufbl-content-title">More From AccesPress Themes</h4>
|
21 |
+
<div class="ufbl-sub-section">
|
22 |
+
<div class="ufbl-sub-section-title"><a href="http://accesspressthemes.com/plugins" target="_blank">WordPress Free & Premium Plugins</a></div>
|
23 |
+
<a href="http://accesspressthemes.com/plugins" target="_blank"><img src="<?php echo UFBL_IMG_DIR.'/plugin.png';?>" alt="Wordpress Free & Premium Plugins"/></a>
|
24 |
+
</div>
|
25 |
+
<div class="ufbl-sub-section">
|
26 |
+
<div class="ufbl-sub-section-title"><a href="http://accesspressthemes.com/themes" target="_blank">WordPress Free & Premium Themes</a></div>
|
27 |
+
<a href="http://accesspressthemes.com/themes" target="_blank"><img src="<?php echo UFBL_IMG_DIR.'/theme.png';?>" alt="Wordpress Free & Premium Themes"/></a>
|
28 |
+
</div>
|
29 |
+
<div class="ufbl-sub-section">
|
30 |
+
<div class="ufbl-sub-section-title"><a href="http://accesspressthemes.com/contact" target="_blank">WordPress Customization</a></div>
|
31 |
+
<a href="http://accesspressthemes.com/contact" target="_blank"><img src="<?php echo UFBL_IMG_DIR.'/customize.png';?>" alt="Wordpress Free & Premium Plugins"/></a>
|
32 |
+
</div>
|
33 |
+
<div class="ufbl-clear"></div>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
|
inc/views/backend/boxes/display-settings.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
global $library_obj;
|
3 |
+
$form_detail = maybe_unserialize( $form_row['form_detail'] );
|
4 |
+
$form_default_settings = $library_obj->get_default_detail();
|
5 |
+
$form_design = isset( $form_detail['form_design'] ) ? $form_detail['form_design'] : $form_default_settings['form_design'];
|
6 |
+
//$library_obj->print_array($form_default_settings);
|
7 |
+
?>
|
8 |
+
<div class="ufbl-tab-content" id="ufbl-display-tab" style="display:none">
|
9 |
+
<div class="ufbl-display-sub-section"><div class="ufbl-field-wrap">
|
10 |
+
<label><?php _e( 'Disable Plugin Styles', UFBL_TD ); ?></label>
|
11 |
+
<div class="ufbl-field">
|
12 |
+
<input type="checkbox" name="form_design[disable_plugin_style]" value='1' <?php echo (isset( $form_design['disable_plugin_style'] ) && $form_design['disable_plugin_style'] == 1) ? 'checked="checked"' : ''; ?>/>
|
13 |
+
<div class="ufbl-side-note"><?php _e( 'Check if you want to disable all the plugin styles in the frontend.', UFBL_TD ); ?></div>
|
14 |
+
</div>
|
15 |
+
</div>
|
16 |
+
<div class="ufbl-field-wrap">
|
17 |
+
<label><?php _e( 'Hide Form Title', UFBL_TD ); ?></label>
|
18 |
+
<div class="ufbl-field">
|
19 |
+
<input type="checkbox" name="form_design[hide_form_title]" value='1' <?php echo (isset( $form_design['hide_form_title'] ) && $form_design['hide_form_title'] == 1) ? 'checked="checked"' : ''; ?>/>
|
20 |
+
<div class="ufbl-side-note"><?php _e( 'Check to hide the form title in frontend form.', UFBL_TD ); ?></div>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
<div class="ufbl-field-wrap">
|
24 |
+
<label><?php _e( 'Form Width', UFBL_TD ); ?></label>
|
25 |
+
<div class="ufbl-field">
|
26 |
+
<input type="text" name="form_design[form_width]" placeholder="500px or 100%" value="<?php echo esc_attr( $form_design['form_width'] ); ?>"/>
|
27 |
+
<div class="ufbl-field-note"><?php _e( 'Please provide the width of form either in px or %.Default width is 100%.', UFBL_TD ); ?></div>
|
28 |
+
</div>
|
29 |
+
</div>
|
30 |
+
<div class="ufbl-field-wrap">
|
31 |
+
<label><?php _e( 'Form Submission Message', UFBL_TD ); ?></label>
|
32 |
+
<div class="ufbl-field">
|
33 |
+
<textarea name="form_design[form_submission_message]" placeholder="<?php _e( 'Form submitted successfully.', UFBL_TD ); ?>"><?php echo isset( $form_design['form_submission_message'] ) ? esc_attr( $form_design['form_submission_message'] ) : ''; ?></textarea>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
<div class="ufbl-field-wrap">
|
37 |
+
<label><?php _e( 'Form Error Message', UFBL_TD ); ?></label>
|
38 |
+
<div class="ufbl-field">
|
39 |
+
<textarea name="form_design[form_error_message]" placeholder="<?php _e( 'Validation errors occurred in the form.', UFBL_TD ); ?>" ><?php echo isset( $form_design['form_error_message'] ) ? esc_attr( $form_design['form_error_message'] ) : ''; ?></textarea>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
<div class="ufbl-field-wrap">
|
43 |
+
<label><?php _e( 'Form Template', UFBL_TD ); ?></label>
|
44 |
+
<div class="ufbl-field">
|
45 |
+
|
46 |
+
<select name="form_design[form_template]" class="ufbl-form-template-dropdown">
|
47 |
+
<option value="ufbl-default-template" <?php selected( $form_design['form_template'], 'ufbl-default-template' ); ?>>Default Template</option>
|
48 |
+
<option value="ufbl-template-1" <?php selected( $form_design['form_template'], 'ufbl-template-1' ); ?>>Template 1</option>
|
49 |
+
<option value="ufbl-template-2" <?php selected( $form_design['form_template'], 'ufbl-template-2' ); ?>>Template 2</option>
|
50 |
+
<option value="ufbl-template-3" <?php selected( $form_design['form_template'], 'ufbl-template-3' ); ?>>Template 3</option>
|
51 |
+
<option value="ufbl-template-4" <?php selected( $form_design['form_template'], 'ufbl-template-4' ); ?>>Template 4</option>
|
52 |
+
|
53 |
+
</select>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
<div class="ufbl-form-controls">
|
57 |
+
<input type="button" class="button-primary ufbl-save-form" value="<?php _e( 'Save Form', UFBL_TD ); ?>"/>
|
58 |
+
<a href="<?php echo site_url( '?ufbl_form_preview=true&ufbl_form_id=' . $form_row['form_id'] ); ?>" target="_blank"><input type="button" class="button-primary" value="<?php _e( 'Preview', UFBL_TD ); ?>"/></a>
|
59 |
+
<div class="ufbl-field-note"><?php _e( 'Note: Please save form before preview.', UFBL_TD ); ?></div>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
<div class="ufbl-template-preview">
|
63 |
+
<h3><?php _e( 'Template Preview', UFBL_TD ); ?></h3>
|
64 |
+
<img src="<?php echo UFBL_IMG_DIR . '/previews/default-template.jpg' ?>" alt="Default Template" id="preview-ufbl-default-template" <?php if ( $form_design['form_template'] != 'ufbl-default-template' ) { ?>style="display:none"<?php } ?>/>
|
65 |
+
<img src="<?php echo UFBL_IMG_DIR . '/previews/template-1.jpg' ?>" alt="Template 1" id="preview-ufbl-template-1" <?php if ( $form_design['form_template'] != 'ufbl-template-1' ) { ?>style="display:none"<?php } ?>/>
|
66 |
+
<img src="<?php echo UFBL_IMG_DIR . '/previews/template-2.jpg' ?>" alt="Template 2" id="preview-ufbl-template-2" <?php if ( $form_design['form_template'] != 'ufbl-template-2' ) { ?>style="display:none"<?php } ?>/>
|
67 |
+
<img src="<?php echo UFBL_IMG_DIR . '/previews/template-3.jpg' ?>" alt="Template 3" id="preview-ufbl-template-3" <?php if ( $form_design['form_template'] != 'ufbl-template-3' ) { ?>style="display:none"<?php } ?>/>
|
68 |
+
<img src="<?php echo UFBL_IMG_DIR . '/previews/template-4.png' ?>" alt="Template 4" id="preview-ufbl-template-4" <?php if ( $form_design['form_template'] != 'ufbl-template-4' ) { ?>style="display:none"<?php } ?>/>
|
69 |
+
|
70 |
+
</div>
|
71 |
+
<div class="ufbl-clear"></div>
|
72 |
+
</div>
|
73 |
+
|
inc/views/backend/boxes/email-settings.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
global $library_obj;
|
3 |
+
$form_detail = maybe_unserialize( $form_row['form_detail'] );
|
4 |
+
$form_detail = empty( $form_detail ) ? $library_obj->get_default_detail() : $form_detail;
|
5 |
+
$email_settings = $form_detail['email_settings'];
|
6 |
+
?>
|
7 |
+
<div class="ufbl-tab-content" id="ufbl-email-tab" style="display: none;">
|
8 |
+
<div class="ufbl-email-wrap">
|
9 |
+
<label><?php _e( 'Email Reciever', UFBL_TD ); ?></label>
|
10 |
+
<div class="ufbl-emails">
|
11 |
+
<input type="button" value="<?php _e( 'Add email', UFBL_TD ); ?>" class="button-primary ufbl-email-adder"/>
|
12 |
+
<?php
|
13 |
+
$count = 0;
|
14 |
+
foreach ( $email_settings['email_reciever'] as $email ) {
|
15 |
+
$count++;
|
16 |
+
?>
|
17 |
+
<div class="ufbl-email-fields">
|
18 |
+
<input type="text" name="email_settings[email_reciever][]" placeholder="test@abc.com" value="<?php echo esc_attr( $email ); ?>"/>
|
19 |
+
<?php if ( $count != 1 ) {
|
20 |
+
?>
|
21 |
+
<span class="ufbl-email-remove">X</span>
|
22 |
+
<?php
|
23 |
+
}
|
24 |
+
?>
|
25 |
+
</div>
|
26 |
+
<?php
|
27 |
+
}
|
28 |
+
?>
|
29 |
+
</div>
|
30 |
+
</div>
|
31 |
+
<div class="ufbl-field-wrap">
|
32 |
+
<label class="ufbl-field"><?php _e( 'From Email', UFBL_TD ); ?></label>
|
33 |
+
<div class="ufbl-field">
|
34 |
+
<input type="text" name="email_settings[from_email]" placeholder='test@xyz.com' value="<?php echo esc_attr( $email_settings['from_email'] ); ?>"/>
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
<div class="ufbl-field-wrap">
|
38 |
+
<label class="ufbl-field"><?php _e( 'From Name', UFBL_TD ); ?></label>
|
39 |
+
<div class="ufbl-field">
|
40 |
+
<input type="text" name="email_settings[from_name]" placeholder='John Corner' value="<?php echo esc_attr( $email_settings['from_name'] ); ?>"/>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
<div class="ufbl-field-wrap">
|
44 |
+
<label class="ufbl-field"><?php _e( 'Email Subject', UFBL_TD ); ?></label>
|
45 |
+
<div class="ufbl-field">
|
46 |
+
<input type="text" name="email_settings[from_subject]" placeholder='<?php _e( 'New Form Submission', UFBL_TD ); ?>' value="<?php echo esc_attr( $email_settings['from_subject'] ); ?>"/>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<div class="ufbl-form-controls">
|
50 |
+
<input type="button" class="button-primary ufbl-save-form" value="<?php _e( 'Save Form', UFBL_TD ); ?>"/>
|
51 |
+
<a href="<?php echo site_url( '?ufbl_form_preview=true&ufbl_form_id=' . $form_row['form_id'] ); ?>" target="_blank"><input type="button" class="button-primary" value="<?php _e( 'Preview', UFBL_TD ); ?>"/></a>
|
52 |
+
<div class="ufbl-field-note"><?php _e( 'Note: Please save form before preview.', UFBL_TD ); ?></div>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
|
inc/views/backend/boxes/form-builder-main.php
ADDED
@@ -0,0 +1,887 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="ufbl-tab-content" id="ufbl-form-builder-tab">
|
2 |
+
<div class="ufbl-form-element-outerwrap">
|
3 |
+
<div class="ufbl-form-elements-wrap">
|
4 |
+
<div class="ufbl-form-elements-inner-wrap ufbl-relative">
|
5 |
+
<span class="ufbl-form-element-title">Form Elements</span>
|
6 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Single Line Textfield', UFBL_TD ); ?>" data-field-type="textfield">
|
7 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Multiple Line Textfield', UFBL_TD ); ?>" data-field-type="textarea">
|
8 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Email Address', UFBL_TD ); ?>" data-field-type="email">
|
9 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Dropdown Menu', UFBL_TD ); ?>" data-field-type="dropdown">
|
10 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Radio Button', UFBL_TD ); ?>" data-field-type="radio">
|
11 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Checkbox', UFBL_TD ); ?>" data-field-type="checkbox">
|
12 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Password', UFBL_TD ); ?>" data-field-type="password">
|
13 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Hidden Field', UFBL_TD ); ?>" data-field-type="hidden">
|
14 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Number Field', UFBL_TD ); ?>" data-field-type="number">
|
15 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Submit Button', UFBL_TD ); ?>" data-field-type="submit">
|
16 |
+
<input type="button" class="button-primary ufbl-form-element" value="<?php _e( 'Captcha', UFBL_TD ); ?>" data-field-type="captcha">
|
17 |
+
|
18 |
+
</div>
|
19 |
+
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<input type="hidden" name="action" value="ufbl_form_action"/>
|
24 |
+
<div class="ufbl-form-wrap">
|
25 |
+
<div class="ufbl-form-innner-wrap ufbl-relative">
|
26 |
+
<span class="ufbl-form-title"><?php echo esc_attr( $form_row['form_title'] ); ?></span>
|
27 |
+
<div class="ufbl-form-field-holder">
|
28 |
+
<?php
|
29 |
+
global $library_obj;
|
30 |
+
//$library_obj->print_array( $form_row );
|
31 |
+
$form_detail = maybe_unserialize( $form_row['form_detail'] );
|
32 |
+
//$library_obj->print_array( $form_detail );
|
33 |
+
if ( !empty( $form_detail ) ) {
|
34 |
+
//$library_obj->print_array( $form_detail );
|
35 |
+
foreach ( $form_detail['field_data'] as $key => $val ) {
|
36 |
+
// $library_obj->print_array($val);
|
37 |
+
switch ( $val['field_type'] ) {
|
38 |
+
case 'textfield':
|
39 |
+
?>
|
40 |
+
<!--Text Field Reference Field --->
|
41 |
+
|
42 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
43 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
44 |
+
<div class="ufbl-form-field-wrap">
|
45 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Texfield', UFBL_TD ); ?></label>
|
46 |
+
<div class="ufbl-form-field">
|
47 |
+
<input type="text" disabled="disabled"/>
|
48 |
+
</div>
|
49 |
+
</div><!--ufbl-form-field-wrap-->
|
50 |
+
<div class="ufbl-field-controls">
|
51 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
52 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
53 |
+
</div>
|
54 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
55 |
+
<span class="ufbl-up-arrow"></span>
|
56 |
+
<div class="ufbl-form-field-wrap">
|
57 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
58 |
+
<div class="ufbl-form-field">
|
59 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" placeholder="<?php _e( 'Your Name', UFBL_TD ); ?>" class="ufbl-field-label-field ufbl-field" data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : ''; ?>"/>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
<div class="ufbl-form-field-wrap">
|
63 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
64 |
+
<div class="ufbl-form-field">
|
65 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][required]" value="1" data-field-name="<?php echo $key; ?>" data-field-type="required" <?php echo (isset( $val['required'] ) && $val['required'] == 1) ? 'checked="checked"' : ''; ?>/>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
<div class="ufbl-form-field-wrap">
|
69 |
+
<label><?php _e( 'Max Characters', UFBL_TD ); ?></label>
|
70 |
+
<div class="ufbl-form-field">
|
71 |
+
<input type="text" name="field_data[<?php echo $key; ?>][max_chars]" placeholder='50' data-field-name="<?php echo $key; ?>" data-field-type="max_chars" value="<?php echo (isset( $val['max_chars'] )) ? esc_attr( $val['max_chars'] ) : ''; ?>"/>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
<div class="ufbl-form-field-wrap">
|
75 |
+
<label><?php _e( 'Min Characters', UFBL_TD ); ?></label>
|
76 |
+
<div class="ufbl-form-field">
|
77 |
+
<input type="text" name="field_data[<?php echo $key; ?>][min_chars]" placeholder='20' data-field-name="<?php echo $key; ?>" data-field-type="min_chars" value="<?php echo (isset( $val['min_chars'] )) ? esc_attr( $val['min_chars'] ) : ''; ?>"/>
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
<div class="ufbl-form-field-wrap">
|
81 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
82 |
+
<div class="ufbl-form-field">
|
83 |
+
<input type="text" name="field_data[<?php echo $key; ?>][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="<?php echo $key; ?>" data-field-type="error_message" value="<?php echo (isset( $val['error_message'] )) ? esc_attr( $val['error_message'] ) : ''; ?>"/>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
<div class="ufbl-form-field-wrap">
|
87 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
88 |
+
<div class="ufbl-form-field">
|
89 |
+
<input type="text" name="field_data[<?php echo $key; ?>][placeholder]" placeholder='<?php _e( 'Your Name here', UFBL_TD ); ?>' data-field-name="<?php echo $key; ?>" data-field-type="placeholder" value="<?php echo (isset( $val['placeholder'] )) ? esc_attr( $val['placeholder'] ) : ''; ?>"/>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
<div class="ufbl-form-field-wrap">
|
93 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
94 |
+
<div class="ufbl-form-field">
|
95 |
+
<input type="text" name="field_data[<?php echo $key; ?>][pre_filled_value]" data-field-name="<?php echo $key; ?>" data-field-type="pre_filled_value" value="<?php echo (isset( $val['pre_filled_value'] )) ? esc_attr( $val['pre_filled_value'] ) : ''; ?>"/>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
<div class="ufbl-form-field-wrap">
|
99 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
100 |
+
<div class="ufbl-form-field">
|
101 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_id" value="<?php echo (isset( $val['field_id'] )) ? esc_attr( $val['field_id'] ) : ''; ?>"/>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
<div class="ufbl-form-field-wrap">
|
105 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
106 |
+
<div class="ufbl-form-field">
|
107 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_class" value="<?php echo (isset( $val['field_class'] )) ? esc_attr( $val['field_class'] ) : ''; ?>"/>
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="textfield" data-field-name="<?php echo $key; ?>" data-field-type="field_type" value="<?php echo (isset( $val['field_type'] )) ? esc_attr( $val['field_type'] ) : ''; ?>"/>
|
111 |
+
</div>
|
112 |
+
</div><!--ufbl-each-form-field-->
|
113 |
+
|
114 |
+
<!--Text Field Reference Field --->
|
115 |
+
<?php
|
116 |
+
break;
|
117 |
+
case 'textarea':
|
118 |
+
?>
|
119 |
+
<!--Text Area Reference Field --->
|
120 |
+
|
121 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
122 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
123 |
+
<div class="ufbl-form-field-wrap">
|
124 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Texfield', UFBL_TD ); ?></label>
|
125 |
+
<div class="ufbl-form-field">
|
126 |
+
<textarea disabled="disabled"></textarea>
|
127 |
+
</div>
|
128 |
+
</div><!--ufbl-form-field-wrap-->
|
129 |
+
<div class="ufbl-field-controls">
|
130 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
131 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
132 |
+
</div>
|
133 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
134 |
+
<span class="ufbl-up-arrow"></span>
|
135 |
+
<div class="ufbl-form-field-wrap">
|
136 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
137 |
+
<div class="ufbl-form-field">
|
138 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" placeholder="<?php _e( 'Your Message', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="<?php echo $key; ?>" data-field-type="field_type" value="<?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : ''; ?>"/>
|
139 |
+
</div>
|
140 |
+
</div>
|
141 |
+
<div class="ufbl-form-field-wrap">
|
142 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
143 |
+
<div class="ufbl-form-field">
|
144 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][required]" value="1" data-field-name="<?php echo $key; ?>" data-field-type="field_type" <?php echo (isset( $val['required'] ) && $val['required'] == 1) ? 'checked="checked"' : ''; ?>/>
|
145 |
+
</div>
|
146 |
+
</div>
|
147 |
+
<div class="ufbl-form-field-wrap">
|
148 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
149 |
+
<div class="ufbl-form-field">
|
150 |
+
<input type="text" name="field_data[<?php echo $key; ?>][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="<?php echo $key; ?>" data-field-type="error_message" value="<?php echo (isset( $val['error_message'] )) ? esc_attr( $val['error_message'] ) : ''; ?>"/>
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
+
<div class="ufbl-form-field-wrap">
|
154 |
+
<label><?php _e( 'Textarea Rows', UFBL_TD ); ?></label>
|
155 |
+
<div class="ufbl-form-field">
|
156 |
+
<input type="text" name="field_data[<?php echo $key; ?>][textarea_rows]" placeholder='5' data-field-name="<?php echo $key; ?>" data-field-type="textarea_rows" value="<?php echo (isset( $val['textarea_rows'] )) ? esc_attr( $val['textarea_rows'] ) : ''; ?>"/>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
<div class="ufbl-form-field-wrap">
|
160 |
+
<label><?php _e( 'Textarea Columns', UFBL_TD ); ?></label>
|
161 |
+
<div class="ufbl-form-field">
|
162 |
+
<input type="text" name="field_data[<?php echo $key; ?>][textarea_columns]" placeholder='20' data-field-name="<?php echo $key; ?>" data-field-type="textarea_columns" value="<?php echo (isset( $val['textarea_columns'] )) ? esc_attr( $val['textarea_columns'] ) : ''; ?>"/>
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
<div class="ufbl-form-field-wrap">
|
166 |
+
<label><?php _e( 'Max Characters', UFBL_TD ); ?></label>
|
167 |
+
<div class="ufbl-form-field">
|
168 |
+
<input type="text" name="field_data[<?php echo $key; ?>][max_chars]" placeholder='50' data-field-name="<?php echo $key; ?>" data-field-type="max_chars" value="<?php echo (isset( $val['max_chars'] )) ? esc_attr( $val['max_chars'] ) : ''; ?>"/>
|
169 |
+
</div>
|
170 |
+
</div>
|
171 |
+
<div class="ufbl-form-field-wrap">
|
172 |
+
<label><?php _e( 'Min Characters', UFBL_TD ); ?></label>
|
173 |
+
<div class="ufbl-form-field">
|
174 |
+
<input type="text" name="field_data[<?php echo $key; ?>][min_chars]" placeholder='20' data-field-name="<?php echo $key; ?>" data-field-type="min_chars" value="<?php echo (isset( $val['min_chars'] )) ? esc_attr( $val['min_chars'] ) : ''; ?>"/>
|
175 |
+
</div>
|
176 |
+
</div>
|
177 |
+
<div class="ufbl-form-field-wrap">
|
178 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
179 |
+
<div class="ufbl-form-field">
|
180 |
+
<input type="text" name="field_data[<?php echo $key; ?>][placeholder]" placeholder='<?php _e( 'Your message here', UFBL_TD ); ?>' data-field-name="<?php echo $key; ?>" data-field-type="placeholder" value="<?php echo (isset( $val['placeholder'] )) ? esc_attr( $val['placeholder'] ) : ''; ?>"/>
|
181 |
+
</div>
|
182 |
+
</div>
|
183 |
+
<div class="ufbl-form-field-wrap">
|
184 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
185 |
+
<div class="ufbl-form-field">
|
186 |
+
<input type="text" name="field_data[<?php echo $key; ?>][pre_filled_value]" data-field-name="<?php echo $key; ?>" data-field-type="pre_filled_value" value="<?php echo (isset( $val['pre_filled_value'] )) ? esc_attr( $val['pre_filled_value'] ) : ''; ?>"/>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
<div class="ufbl-form-field-wrap">
|
190 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
191 |
+
<div class="ufbl-form-field">
|
192 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_id" value="<?php echo (isset( $val['field_id'] )) ? esc_attr( $val['field_id'] ) : ''; ?>"/>
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
+
<div class="ufbl-form-field-wrap">
|
196 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
197 |
+
<div class="ufbl-form-field">
|
198 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_class" value="<?php echo (isset( $val['field_class'] )) ? esc_attr( $val['field_class'] ) : ''; ?>"/>
|
199 |
+
</div>
|
200 |
+
</div>
|
201 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="textarea" data-field-name="<?php echo $key; ?>" data-field-type="field_type" value="<?php echo (isset( $val['field_type'] )) ? esc_attr( $val['field_type'] ) : ''; ?>"/>
|
202 |
+
</div>
|
203 |
+
</div><!--ufbl-each-form-field-->
|
204 |
+
|
205 |
+
<!--Text area reference -->
|
206 |
+
<?php
|
207 |
+
break;
|
208 |
+
case 'email':
|
209 |
+
?>
|
210 |
+
<!--Email Reference Field --->
|
211 |
+
|
212 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
213 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
214 |
+
<div class="ufbl-form-field-wrap">
|
215 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Email', UFBL_TD ); ?></label>
|
216 |
+
<div class="ufbl-form-field">
|
217 |
+
<input type="email" disabled="disabled"/>
|
218 |
+
</div>
|
219 |
+
</div><!--ufbl-form-field-wrap-->
|
220 |
+
<div class="ufbl-field-controls">
|
221 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
222 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
223 |
+
</div>
|
224 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
225 |
+
<span class="ufbl-up-arrow"></span>
|
226 |
+
<div class="ufbl-form-field-wrap">
|
227 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
228 |
+
<div class="ufbl-form-field">
|
229 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" placeholder="<?php _e( 'Your Email', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : ''; ?>"/>
|
230 |
+
</div>
|
231 |
+
</div>
|
232 |
+
<div class="ufbl-form-field-wrap">
|
233 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
234 |
+
<div class="ufbl-form-field">
|
235 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][required]" value="1" data-field-name="<?php echo $key; ?>" data-field-type="required" <?php echo (isset( $val['required'] ) && $val['required'] == 1) ? 'checked="checked"' : ''; ?>/>
|
236 |
+
</div>
|
237 |
+
</div>
|
238 |
+
<div class="ufbl-form-field-wrap">
|
239 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
240 |
+
<div class="ufbl-form-field">
|
241 |
+
<input type="text" name="field_data[<?php echo $key; ?>][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="<?php echo $key; ?>" data-field-type="error_message" value="<?php echo (isset( $val['error_message'] )) ? esc_attr( $val['error_message'] ) : ''; ?>"/>
|
242 |
+
</div>
|
243 |
+
</div>
|
244 |
+
<div class="ufbl-form-field-wrap">
|
245 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
246 |
+
<div class="ufbl-form-field">
|
247 |
+
<input type="text" name="field_data[<?php echo $key; ?>][placeholder]" placeholder='<?php _e( 'Your Email here', UFBL_TD ); ?>' data-field-name="<?php echo $key; ?>" data-field-type="placeholder" value="<?php echo (isset( $val['placeholder'] )) ? esc_attr( $val['placeholder'] ) : ''; ?>"/>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
<div class="ufbl-form-field-wrap">
|
251 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
252 |
+
<div class="ufbl-form-field">
|
253 |
+
<input type="text" name="field_data[<?php echo $key; ?>][pre_filled_value]" data-field-name="<?php echo $key; ?>" data-field-type="pre_filled_value" value="<?php echo (isset( $val['pre_filled_value'] )) ? esc_attr( $val['pre_filled_value'] ) : ''; ?>"/>
|
254 |
+
</div>
|
255 |
+
</div>
|
256 |
+
<div class="ufbl-form-field-wrap">
|
257 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
258 |
+
<div class="ufbl-form-field">
|
259 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_id" value="<?php echo (isset( $val['field_id'] )) ? esc_attr( $val['field_id'] ) : ''; ?>"/>
|
260 |
+
</div>
|
261 |
+
</div>
|
262 |
+
<div class="ufbl-form-field-wrap">
|
263 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
264 |
+
<div class="ufbl-form-field">
|
265 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_type" value="<?php echo (isset( $val['field_type'] )) ? esc_attr( $val['field_type'] ) : ''; ?>"/>
|
266 |
+
</div>
|
267 |
+
</div>
|
268 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="email" data-field-name="<?php echo $key; ?>" data-field-type="field_type" value="<?php echo (isset( $val['field_type'] )) ? esc_attr( $val['field_type'] ) : ''; ?>"/>
|
269 |
+
</div>
|
270 |
+
</div><!--ufbl-each-form-field-->
|
271 |
+
|
272 |
+
<!--Email Field reference-->
|
273 |
+
<?php
|
274 |
+
break;
|
275 |
+
case 'dropdown':
|
276 |
+
?>
|
277 |
+
<!--Dropdown Reference Field --->
|
278 |
+
|
279 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
280 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
281 |
+
<div class="ufbl-form-field-wrap">
|
282 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Dropdown', UFBL_TD ); ?></label>
|
283 |
+
<div class="ufbl-form-field">
|
284 |
+
<select disabled="disabled">
|
285 |
+
<option><?php _e( 'Option 1', UFBL_TD ) ?></option>
|
286 |
+
</select>
|
287 |
+
</div>
|
288 |
+
</div><!--ufbl-form-field-wrap-->
|
289 |
+
<div class="ufbl-field-controls">
|
290 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
291 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
292 |
+
</div>
|
293 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
294 |
+
<span class="ufbl-up-arrow"></span>
|
295 |
+
<div class="ufbl-form-field-wrap">
|
296 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
297 |
+
<div class="ufbl-form-field">
|
298 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" placeholder="<?php _e( 'Your Country', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo (isset( $val['field_label'] )) ? esc_attr( $val['field_label'] ) : ''; ?>"/>
|
299 |
+
</div>
|
300 |
+
</div>
|
301 |
+
<div class="ufbl-form-field-wrap">
|
302 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
303 |
+
<div class="ufbl-form-field">
|
304 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][required]" value="1" data-field-name="<?php echo $key; ?>" data-field-type="field_type" <?php echo (isset( $val['required'] ) && $val['required'] == 1) ? 'checked="checked"' : ''; ?>/>
|
305 |
+
</div>
|
306 |
+
</div>
|
307 |
+
<div class="ufbl-form-field-wrap">
|
308 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
309 |
+
<div class="ufbl-form-field">
|
310 |
+
<input type="text" name="field_data[<?php echo $key; ?>][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="<?php echo $key; ?>" data-field-type="error_message" value="<?php echo isset( $val['error_message'] ) ? esc_attr( $val['error_message'] ) : ''; ?>"/>
|
311 |
+
</div>
|
312 |
+
</div>
|
313 |
+
<div class="ufbl-form-field-wrap ufbl-full-width ufbl-op-wrap">
|
314 |
+
<label><?php _e( 'Options', UFBL_TD ); ?></label>
|
315 |
+
<div class="ufbl-form-field">
|
316 |
+
<input type="button" value="<?php _e( 'Add Option', UFBL_TD ); ?>" class="ufbl-option-value-adder button-primary" data-field-key="<?php echo $key; ?>"/>
|
317 |
+
<div class="ufbl-option-value-wrap">
|
318 |
+
<?php
|
319 |
+
if ( isset( $val['option'], $val['value'] ) ) {
|
320 |
+
$value_index = 0;
|
321 |
+
foreach ( $val['option'] as $option ) {
|
322 |
+
?>
|
323 |
+
<div class="ufbl-each-option">
|
324 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
325 |
+
<input type="text" name="field_data[<?php echo $key; ?>][option][]" placeholder="Option" data-field-name="<?php echo $key; ?>" value="<?php echo $option; ?>"/>
|
326 |
+
<input type="text" name="field_data[<?php echo $key; ?>][value][]" placeholder="Value" data-field-name="<?php echo $key; ?>" value="<?php echo $val['value'][$value_index]; ?>"/>
|
327 |
+
<span class="ufbl-option-remover">X</span>
|
328 |
+
</div>
|
329 |
+
<?php
|
330 |
+
$value_index++;
|
331 |
+
}
|
332 |
+
}
|
333 |
+
?>
|
334 |
+
</div>
|
335 |
+
</div>
|
336 |
+
</div>
|
337 |
+
<div class="ufbl-form-field-wrap">
|
338 |
+
<label><?php _e( 'Multiple', UFBL_TD ); ?></label>
|
339 |
+
<div class="ufbl-form-field">
|
340 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][multiple]" value="1" data-field-name="<?php echo $key; ?>" data-field-type="multiple" <?php checked($val['multiple'],true);?>/>
|
341 |
+
</div>
|
342 |
+
</div>
|
343 |
+
<div class="ufbl-form-field-wrap">
|
344 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
345 |
+
<div class="ufbl-form-field">
|
346 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_id" value="<?php echo isset( $val['field_id'] ) ? esc_attr( $val['field_id'] ) : ''; ?>"/>
|
347 |
+
</div>
|
348 |
+
</div>
|
349 |
+
<div class="ufbl-form-field-wrap">
|
350 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
351 |
+
<div class="ufbl-form-field">
|
352 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_class" value="<?php echo isset( $val['field_id'] ) ? esc_attr( $val['field_id'] ) : ''; ?>"/>
|
353 |
+
</div>
|
354 |
+
</div>
|
355 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="dropdown" data-field-name="<?php echo $key; ?>" data-field-type="field_type"/>
|
356 |
+
</div>
|
357 |
+
</div><!--ufbl-each-form-field-->
|
358 |
+
|
359 |
+
<!--Dropdown Reference Field --->
|
360 |
+
<?php
|
361 |
+
break;
|
362 |
+
case 'radio':
|
363 |
+
?>
|
364 |
+
<!--Radio Button Reference Field --->
|
365 |
+
|
366 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
367 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
368 |
+
<div class="ufbl-form-field-wrap">
|
369 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Radio', UFBL_TD ); ?></label>
|
370 |
+
<div class="ufbl-form-field">
|
371 |
+
<label><input type="radio" checked="checked" disabled="disabled"><?php _e( 'Option 1', UFBL_TD ); ?></label>
|
372 |
+
<label><input type="radio" disabled="disabled"><?php _e( 'Option 2', UFBL_TD ); ?></label>
|
373 |
+
</div>
|
374 |
+
</div><!--ufbl-form-field-wrap-->
|
375 |
+
<div class="ufbl-field-controls">
|
376 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
377 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
378 |
+
</div>
|
379 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
380 |
+
<span class="ufbl-up-arrow"></span>
|
381 |
+
<div class="ufbl-form-field-wrap">
|
382 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
383 |
+
<div class="ufbl-form-field">
|
384 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" placeholder="<?php _e( 'Your Gender', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : ''; ?>"/>
|
385 |
+
</div>
|
386 |
+
</div>
|
387 |
+
<div class="ufbl-form-field-wrap">
|
388 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
389 |
+
<div class="ufbl-form-field">
|
390 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][required]" value="1" <?php echo (isset( $val['required'] ) && $val['required'] == 1) ? 'checked="checked"' : ''; ?>/>
|
391 |
+
</div>
|
392 |
+
</div>
|
393 |
+
<div class="ufbl-form-field-wrap">
|
394 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
395 |
+
<div class="ufbl-form-field">
|
396 |
+
<input type="text" name="field_data[<?php echo $key; ?>][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="<?php echo $key; ?>" data-field-type="error_message" value="<?php echo (isset( $val['error_message'] ) && $val['error_message'] != '') ? esc_attr( $val['error_message'] ) : ''; ?>"/>
|
397 |
+
</div>
|
398 |
+
</div>
|
399 |
+
<div class="ufbl-form-field-wrap ufbl-full-width ufbl-op-wrap">
|
400 |
+
<label><?php _e( 'Options', UFBL_TD ); ?></label>
|
401 |
+
<div class="ufbl-form-field">
|
402 |
+
<input type="button" value="<?php _e( 'Add Option', UFBL_TD ); ?>" class="ufbl-option-value-adder button-primary" data-field-key="<?php echo $key; ?>"/>
|
403 |
+
<div class="ufbl-option-value-wrap">
|
404 |
+
<?php
|
405 |
+
if ( isset( $val['option'], $val['value'] ) ) {
|
406 |
+
$value_index = 0;
|
407 |
+
foreach ( $val['option'] as $option ) {
|
408 |
+
?>
|
409 |
+
<div class="ufbl-each-option">
|
410 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
411 |
+
<input type="text" name="field_data[<?php echo $key; ?>][option][]" placeholder="Option" data-field-name="<?php echo $key; ?>" value="<?php echo $option; ?>"/>
|
412 |
+
<input type="text" name="field_data[<?php echo $key; ?>][value][]" placeholder="Value" data-field-name="<?php echo $key; ?>" value="<?php echo $val['value'][$value_index]; ?>"/>
|
413 |
+
<span class="ufbl-option-remover">X</span>
|
414 |
+
</div>
|
415 |
+
<?php
|
416 |
+
$value_index++;
|
417 |
+
}
|
418 |
+
}
|
419 |
+
?>
|
420 |
+
|
421 |
+
|
422 |
+
|
423 |
+
</div>
|
424 |
+
</div>
|
425 |
+
</div>
|
426 |
+
<div class="ufbl-form-field-wrap">
|
427 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
428 |
+
<div class="ufbl-form-field">
|
429 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_id" value="<?php echo isset( $val['field_id'] ) ? esc_attr( $val['field_id'] ) : ''; ?>"/>
|
430 |
+
</div>
|
431 |
+
</div>
|
432 |
+
<div class="ufbl-form-field-wrap">
|
433 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
434 |
+
<div class="ufbl-form-field">
|
435 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_class" value="<?php echo isset( $val['field_class'] ) ? esc_attr( $val['field_class'] ) : ''; ?>"/>
|
436 |
+
</div>
|
437 |
+
</div>
|
438 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="radio" data-field-name="<?php echo $key; ?>" data-field-type="field_type"/>
|
439 |
+
</div>
|
440 |
+
</div><!--ufbl-each-form-field-->
|
441 |
+
|
442 |
+
<!--Radio Button Reference Field --->
|
443 |
+
<?php
|
444 |
+
break;
|
445 |
+
case 'checkbox':
|
446 |
+
?>
|
447 |
+
<!--Checkbox Reference Field --->
|
448 |
+
|
449 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
450 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
451 |
+
<div class="ufbl-form-field-wrap">
|
452 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Checkbox', UFBL_TD ); ?></label>
|
453 |
+
<div class="ufbl-form-field">
|
454 |
+
<label><input type="checkbox" disabled="disabled"><?php _e( 'Option 1', UFBL_TD ); ?></label>
|
455 |
+
<label><input type="checkbox" disabled="disabled"><?php _e( 'Option 2', UFBL_TD ); ?></label>
|
456 |
+
<label><input type="checkbox" disabled="disabled"><?php _e( 'Option 3', UFBL_TD ); ?></label>
|
457 |
+
</div>
|
458 |
+
</div><!--ufbl-form-field-wrap-->
|
459 |
+
<div class="ufbl-field-controls">
|
460 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
461 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
462 |
+
</div>
|
463 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
464 |
+
<span class="ufbl-up-arrow"></span>
|
465 |
+
<div class="ufbl-form-field-wrap">
|
466 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
467 |
+
<div class="ufbl-form-field">
|
468 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" placeholder="<?php _e( 'Your Hobbies', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo isset( $val['field_label'] ) ? esc_attr( $val['field_label'] ) : ''; ?>"/>
|
469 |
+
</div>
|
470 |
+
</div>
|
471 |
+
<div class="ufbl-form-field-wrap">
|
472 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
473 |
+
<div class="ufbl-form-field">
|
474 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][required]" value="1" data-field-name="<?php echo $key; ?>" data-field-type="field_label" <?php echo (isset( $val['required'] ) && $val['required'] == 1) ? 'checked="checked"' : ''; ?>/>
|
475 |
+
</div>
|
476 |
+
</div>
|
477 |
+
<div class="ufbl-form-field-wrap">
|
478 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
479 |
+
<div class="ufbl-form-field">
|
480 |
+
<input type="text" name="field_data[<?php echo $key; ?>][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="<?php echo $key; ?>" data-field-type="error_message" value="<?php echo isset( $val['field_label'] ) ? esc_attr( $val['error_message'] ) : ''; ?>"/>
|
481 |
+
</div>
|
482 |
+
</div>
|
483 |
+
<div class="ufbl-form-field-wrap ufbl-full-width ufbl-op-wrap">
|
484 |
+
<label><?php _e( 'Options', UFBL_TD ); ?></label>
|
485 |
+
<div class="ufbl-form-field">
|
486 |
+
<input type="button" value="<?php _e( 'Add Option', UFBL_TD ); ?>" class="ufbl-option-value-adder button-primary" data-field-key="<?php echo $key; ?>"/>
|
487 |
+
<div class="ufbl-option-value-wrap">
|
488 |
+
<?php
|
489 |
+
if ( isset( $val['option'], $val['value'] ) ) {
|
490 |
+
$value_index = 0;
|
491 |
+
foreach ( $val['option'] as $option ) {
|
492 |
+
?>
|
493 |
+
<div class="ufbl-each-option">
|
494 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
495 |
+
<input type="text" name="field_data[<?php echo $key; ?>][option][]" placeholder="Option" data-field-name="<?php echo $key; ?>" value="<?php echo $option; ?>"/>
|
496 |
+
<input type="text" name="field_data[<?php echo $key; ?>][value][]" placeholder="Value" data-field-name="<?php echo $key; ?>" value="<?php echo $val['value'][$value_index]; ?>"/>
|
497 |
+
<span class="ufbl-option-remover">X</span>
|
498 |
+
</div>
|
499 |
+
<?php
|
500 |
+
$value_index++;
|
501 |
+
}
|
502 |
+
}
|
503 |
+
?>
|
504 |
+
</div>
|
505 |
+
</div>
|
506 |
+
</div>
|
507 |
+
<div class="ufbl-form-field-wrap">
|
508 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
509 |
+
<div class="ufbl-form-field">
|
510 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_id" value="<?php echo isset( $val['field_id'] ) ? esc_attr( $val['field_id'] ) : ''; ?>"/>
|
511 |
+
</div>
|
512 |
+
</div>
|
513 |
+
<div class="ufbl-form-field-wrap">
|
514 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
515 |
+
<div class="ufbl-form-field">
|
516 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_class" value="<?php echo isset( $val['field_class'] ) ? esc_attr( $val['field_class'] ) : ''; ?>"/>
|
517 |
+
</div>
|
518 |
+
</div>
|
519 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="checkbox" data-field-name="<?php echo $key; ?>" data-field-type="field_type" />
|
520 |
+
</div>
|
521 |
+
</div><!--ufbl-each-form-field-->
|
522 |
+
|
523 |
+
<!--Checkbox Reference Field --->
|
524 |
+
<?php
|
525 |
+
break;
|
526 |
+
case 'password':
|
527 |
+
?>
|
528 |
+
<!--Password Reference Field --->
|
529 |
+
|
530 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
531 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
532 |
+
<div class="ufbl-form-field-wrap">
|
533 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Password', UFBL_TD ); ?></label>
|
534 |
+
<div class="ufbl-form-field">
|
535 |
+
<input type="password" disabled="disabled"/>
|
536 |
+
</div>
|
537 |
+
</div><!--ufbl-form-field-wrap-->
|
538 |
+
<div class="ufbl-field-controls">
|
539 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
540 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
541 |
+
</div>
|
542 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
543 |
+
<span class="ufbl-up-arrow"></span>
|
544 |
+
<div class="ufbl-form-field-wrap">
|
545 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
546 |
+
<div class="ufbl-form-field">
|
547 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" placeholder="<?php _e( 'Your Password', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo isset( $val['field_label'] ) ? esc_attr( $val['field_label'] ) : ''; ?>"/>
|
548 |
+
</div>
|
549 |
+
</div>
|
550 |
+
<div class="ufbl-form-field-wrap">
|
551 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
552 |
+
<div class="ufbl-form-field">
|
553 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][required]" value="1" data-field-name="<?php echo $key; ?>" data-field-type="field_label" <?php echo (isset( $val['required'] ) && $val['required'] == 1) ? 'checked="checked"' : ''; ?>/>
|
554 |
+
</div>
|
555 |
+
</div>
|
556 |
+
<div class="ufbl-form-field-wrap">
|
557 |
+
<label><?php _e( 'Max Characters', UFBL_TD ); ?></label>
|
558 |
+
<div class="ufbl-form-field">
|
559 |
+
<input type="text" name="field_data[<?php echo $key; ?>][max_chars]" placeholder='50' data-field-name="<?php echo $key; ?>" data-field-type="max_chars" value="<?php echo isset( $val['max_chars'] ) ? esc_attr( $val['max_chars'] ) : ''; ?>"/>
|
560 |
+
</div>
|
561 |
+
</div>
|
562 |
+
<div class="ufbl-form-field-wrap">
|
563 |
+
<label><?php _e( 'Min Characters', UFBL_TD ); ?></label>
|
564 |
+
<div class="ufbl-form-field">
|
565 |
+
<input type="text" name="field_data[<?php echo $key; ?>][min_chars]" placeholder='20' data-field-name="<?php echo $key; ?>" data-field-type="min_chars" value="<?php echo isset( $val['min_chars'] ) ? esc_attr( $val['min_chars'] ) : ''; ?>"/>
|
566 |
+
</div>
|
567 |
+
</div>
|
568 |
+
<div class="ufbl-form-field-wrap">
|
569 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
570 |
+
<div class="ufbl-form-field">
|
571 |
+
<input type="text" name="field_data[<?php echo $key; ?>][error_message]" placeholder="<?php _e( 'Please fill number only', UFBL_TD ); ?>" data-field-name="<?php echo $key; ?>" data-field-type="error_message" value="<?php echo isset( $val['error_message'] ) ? esc_attr( $val['error_message'] ) : ''; ?>"/>
|
572 |
+
</div>
|
573 |
+
</div>
|
574 |
+
<div class="ufbl-form-field-wrap">
|
575 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
576 |
+
<div class="ufbl-form-field">
|
577 |
+
<input type="text" name="field_data[<?php echo $key; ?>][placeholder]" placeholder='<?php _e( 'Your Password here', UFBL_TD ); ?>' data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo isset( $val['placeholder'] ) ? esc_attr( $val['placeholder'] ) : ''; ?>"/>
|
578 |
+
</div>
|
579 |
+
</div>
|
580 |
+
<div class="ufbl-form-field-wrap">
|
581 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
582 |
+
<div class="ufbl-form-field">
|
583 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_id" value="<?php echo isset( $val['field_id'] ) ? esc_attr( $val['field_id'] ) : ''; ?>"/>
|
584 |
+
</div>
|
585 |
+
</div>
|
586 |
+
<div class="ufbl-form-field-wrap">
|
587 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
588 |
+
<div class="ufbl-form-field">
|
589 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_class" value="<?php echo isset( $val['field_class'] ) ? esc_attr( $val['field_class'] ) : ''; ?>"/>
|
590 |
+
</div>
|
591 |
+
</div>
|
592 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="password" data-field-name="<?php echo $key; ?>" data-field-type="field_type"/>
|
593 |
+
</div>
|
594 |
+
</div><!--ufbl-each-form-field-->
|
595 |
+
|
596 |
+
<!--Password Reference Field --->
|
597 |
+
<?php
|
598 |
+
break;
|
599 |
+
case 'hidden':
|
600 |
+
?>
|
601 |
+
<!--Hidden Reference Field-->
|
602 |
+
|
603 |
+
<div class="ufbl-each-form-field ufbl-submit-button-wrap ufbl-relative">
|
604 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
605 |
+
<div class="ufbl-form-field-wrap">
|
606 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Hidden', UFBL_TD ); ?></label>
|
607 |
+
<div class="ufbl-form-field">
|
608 |
+
<input type="hidden" disabled="disabled"/>
|
609 |
+
</div>
|
610 |
+
</div><!--ufbl-form-field-wrap-->
|
611 |
+
<div class="ufbl-field-controls">
|
612 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
613 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
614 |
+
</div>
|
615 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
616 |
+
<span class="ufbl-up-arrow"></span>
|
617 |
+
<div class="ufbl-form-field-wrap">
|
618 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
619 |
+
<div class="ufbl-form-field">
|
620 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" class="ufbl-field-label-field" data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo isset( $val['field_label'] ) ? esc_attr( $val['field_label'] ) : '' ?>"/>
|
621 |
+
</div>
|
622 |
+
</div>
|
623 |
+
<div class="ufbl-form-field-wrap">
|
624 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
625 |
+
<div class="ufbl-form-field">
|
626 |
+
<input type="text" name="field_data[<?php echo $key; ?>][pre_filled_value]" data-field-name="<?php echo $key; ?>" data-field-type="pre_filled_value" value="<?php echo isset( $val['pre_filled_value'] ) ? esc_attr( $val['pre_filled_value'] ) : '' ?>"/>
|
627 |
+
</div>
|
628 |
+
</div>
|
629 |
+
<div class="ufbl-form-field-wrap">
|
630 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
631 |
+
<div class="ufbl-form-field">
|
632 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_id" value="<?php echo isset( $val['field_id'] ) ? esc_attr( $val['field_id'] ) : '' ?>"/>
|
633 |
+
</div>
|
634 |
+
</div>
|
635 |
+
<div class="ufbl-form-field-wrap">
|
636 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
637 |
+
<div class="ufbl-form-field">
|
638 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_class" value="<?php echo isset( $val['field_class'] ) ? esc_attr( $val['field_class'] ) : '' ?>"/>
|
639 |
+
</div>
|
640 |
+
</div>
|
641 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="hidden" data-field-name="<?php echo $key; ?>" data-field-type="field_label"/>
|
642 |
+
</div>
|
643 |
+
</div><!--ufbl-each-form-field-->
|
644 |
+
|
645 |
+
<!--Hidden Reference Field-->
|
646 |
+
<?php
|
647 |
+
break;
|
648 |
+
case 'number':
|
649 |
+
?>
|
650 |
+
<!--Number Reference Field-->
|
651 |
+
|
652 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
653 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
654 |
+
<div class="ufbl-form-field-wrap">
|
655 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Number', UFBL_TD ); ?></label>
|
656 |
+
<div class="ufbl-form-field">
|
657 |
+
<input type="number" disabled="disabled"/>
|
658 |
+
</div>
|
659 |
+
</div><!--ufbl-form-field-wrap-->
|
660 |
+
<div class="ufbl-field-controls">
|
661 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
662 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
663 |
+
</div>
|
664 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
665 |
+
<span class="ufbl-up-arrow"></span>
|
666 |
+
<div class="ufbl-form-field-wrap">
|
667 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
668 |
+
<div class="ufbl-form-field">
|
669 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" placeholder="<?php _e( 'Your Number', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo esc_attr( $val['field_label'] ); ?>"/>
|
670 |
+
</div>
|
671 |
+
</div>
|
672 |
+
<div class="ufbl-form-field-wrap">
|
673 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
674 |
+
<div class="ufbl-form-field">
|
675 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][required]" value="1" data-field-name="<?php echo $key; ?>" data-field-type="field_label" <?php echo (isset( $val['required'] ) && $val['required'] == 1) ? 'checked="checked"' : ''; ?>/>
|
676 |
+
</div>
|
677 |
+
</div>
|
678 |
+
<div class="ufbl-form-field-wrap">
|
679 |
+
<label><?php _e( 'Max Value', UFBL_TD ); ?></label>
|
680 |
+
<div class="ufbl-form-field">
|
681 |
+
<input type="text" name="field_data[<?php echo $key; ?>][max_value]" placeholder='50' data-field-name="<?php echo $key; ?>" data-field-type="max_value" value="<?php echo isset( $val['max_value'] ) ? $val['max_value'] : ''; ?>"/>
|
682 |
+
</div>
|
683 |
+
</div>
|
684 |
+
<div class="ufbl-form-field-wrap">
|
685 |
+
<label><?php _e( 'Min Value', UFBL_TD ); ?></label>
|
686 |
+
<div class="ufbl-form-field">
|
687 |
+
<input type="text" name="field_data[<?php echo $key; ?>][min_value]" placeholder='20' data-field-name="<?php echo $key; ?>" data-field-type="min_value" value="<?php echo isset( $val['min_value'] ) ? $val['min_value'] : ''; ?>"/>
|
688 |
+
</div>
|
689 |
+
</div>
|
690 |
+
<div class="ufbl-form-field-wrap">
|
691 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
692 |
+
<div class="ufbl-form-field">
|
693 |
+
<input type="text" name="field_data[<?php echo $key; ?>][error_message]" placeholder="<?php _e( 'Please fill number only', UFBL_TD ); ?>" data-field-name="<?php echo $key; ?>" data-field-type="error_message" value="<?php echo esc_attr( $val['error_message'] ); ?>"/>
|
694 |
+
</div>
|
695 |
+
</div>
|
696 |
+
<div class="ufbl-form-field-wrap">
|
697 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
698 |
+
<div class="ufbl-form-field">
|
699 |
+
<input type="text" name="field_data[<?php echo $key; ?>][placeholder]" placeholder='<?php _e( 'Your age here', UFBL_TD ); ?>' data-field-name="<?php echo $key; ?>" data-field-type="field_label" value="<?php echo esc_attr( $val['placeholder'] ); ?>"/>
|
700 |
+
</div>
|
701 |
+
</div>
|
702 |
+
<div class="ufbl-form-field-wrap">
|
703 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
704 |
+
<div class="ufbl-form-field">
|
705 |
+
<input type="text" name="field_data[<?php echo $key; ?>][pre_filled_value]" data-field-name="<?php echo $key; ?>" data-field-type="pre_filled_value" value="<?php echo (isset( $val['pre_filled_value'] )) ? esc_attr( $val['pre_filled_value'] ) : ''; ?>"/>
|
706 |
+
</div>
|
707 |
+
</div>
|
708 |
+
<div class="ufbl-form-field-wrap">
|
709 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
710 |
+
<div class="ufbl-form-field">
|
711 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_label"/>
|
712 |
+
</div>
|
713 |
+
</div>
|
714 |
+
<div class="ufbl-form-field-wrap">
|
715 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
716 |
+
<div class="ufbl-form-field">
|
717 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_label"/>
|
718 |
+
</div>
|
719 |
+
</div>
|
720 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="number" data-field-name="<?php echo $key; ?>" data-field-type="field_label"/>
|
721 |
+
</div>
|
722 |
+
</div><!--ufbl-each-form-field-->
|
723 |
+
|
724 |
+
<!--Number Reference Field-->
|
725 |
+
<?php
|
726 |
+
break;
|
727 |
+
case 'submit':
|
728 |
+
?>
|
729 |
+
<!--Submit Reference Field-->
|
730 |
+
|
731 |
+
<div class="ufbl-each-form-field ufbl-submit-button-wrap ufbl-relative">
|
732 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
733 |
+
<div class="ufbl-form-field-wrap">
|
734 |
+
<div class="ufbl-form-field">
|
735 |
+
<input type="submit" disabled="disabled" class="button-primary ufbl-submit-reference" value="<?php echo ($val['button_label'] == '') ? __( 'Submit', UFBL_TD ) : esc_attr( $val['button_label'] ); ?>"/>
|
736 |
+
</div>
|
737 |
+
</div><!--ufbl-form-field-wrap-->
|
738 |
+
<div class="ufbl-field-controls">
|
739 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
740 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger" data-confirm-message="<?php _e( 'If you delete this element then data related with this element will also be deleted. Are you sure you want to delete this element?', UFBL_TD ); ?>">Delete</a>
|
741 |
+
</div>
|
742 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
743 |
+
<span class="ufbl-up-arrow"></span>
|
744 |
+
<div class="ufbl-form-field-wrap">
|
745 |
+
<label><?php _e( 'Submit Button label', UFBL_TD ); ?></label>
|
746 |
+
<div class="ufbl-form-field">
|
747 |
+
<input type="text" name="field_data[<?php echo $key; ?>][button_label]" class="ufbl-submit-button" value="<?php echo esc_attr( $val['button_label'] ); ?>"/>
|
748 |
+
</div>
|
749 |
+
</div>
|
750 |
+
<div class="ufbl-form-field-wrap">
|
751 |
+
<label><?php _e( 'Show Reset Button', UFBL_TD ); ?></label>
|
752 |
+
<div class="ufbl-form-field">
|
753 |
+
<?php $show_reset_button = isset($val['show_reset_button'])?1:0;?>
|
754 |
+
<input type="checkbox" name="field_data[<?php echo $key; ?>][show_reset_button]" value="1" <?php checked( $show_reset_button,true);?>/>
|
755 |
+
</div>
|
756 |
+
</div>
|
757 |
+
<div class="ufbl-form-field-wrap">
|
758 |
+
<label><?php _e( 'Reset Button label', UFBL_TD ); ?></label>
|
759 |
+
<div class="ufbl-form-field">
|
760 |
+
<input type="text" name="field_data[<?php echo $key; ?>][reset_label]" value="<?php echo isset($val['reset_label'])?esc_attr($val['reset_label']):'';?>"/>
|
761 |
+
</div>
|
762 |
+
</div>
|
763 |
+
<div class="ufbl-form-field-wrap">
|
764 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
765 |
+
<div class="ufbl-form-field">
|
766 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="<?php echo $key; ?>" data-field-type="field_id" value="<?php echo esc_attr( $val['field_id'] ); ?>"/>
|
767 |
+
</div>
|
768 |
+
</div>
|
769 |
+
<div class="ufbl-form-field-wrap">
|
770 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
771 |
+
<div class="ufbl-form-field">
|
772 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="<?php echo $key; ?>" data-field-type="field_class" value="<?php echo esc_attr( $val['field_class'] ); ?>"/>
|
773 |
+
</div>
|
774 |
+
</div>
|
775 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="submit" data-field-name="<?php echo $key; ?>" data-field-type="field_type"/>
|
776 |
+
</div>
|
777 |
+
</div><!--ufbl-each-form-field-->
|
778 |
+
|
779 |
+
<!--Submit Reference Field-->
|
780 |
+
<?php
|
781 |
+
break;
|
782 |
+
case 'captcha':
|
783 |
+
?>
|
784 |
+
|
785 |
+
<div class="ufbl-each-form-field ufbl-submit-button-wrap ufbl-relative">
|
786 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
787 |
+
<div class="ufbl-form-field-wrap">
|
788 |
+
<label class="ufbl-field-label-ref"><?php echo (isset( $val['field_label'] ) && $val['field_label'] != '') ? esc_attr( $val['field_label'] ) : __( 'Untitled Captcha', UFBL_TD ); ?></label>
|
789 |
+
<div class="ufbl-form-field">
|
790 |
+
|
791 |
+
</div>
|
792 |
+
</div><!--ufbl-form-field-wrap-->
|
793 |
+
<div class="ufbl-field-controls">
|
794 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
795 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
796 |
+
</div>
|
797 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
798 |
+
<span class="ufbl-up-arrow"></span>
|
799 |
+
<div class="ufbl-form-field-wrap">
|
800 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
801 |
+
<div class="ufbl-form-field">
|
802 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_label]" placeholder="<?php _e( 'Human Check', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="ufbl_key" data-field-type="field_label" value="<?php echo esc_attr( $val['field_label'] ); ?>"/>
|
803 |
+
</div>
|
804 |
+
</div>
|
805 |
+
<div class="ufbl-form-field-wrap">
|
806 |
+
<label><?php _e( 'Captcha Type', UFBL_TD ); ?></label>
|
807 |
+
<div class="ufbl-form-field">
|
808 |
+
<select name="field_data[<?php echo $key; ?>][captcha_type]" class="ufbl-captcha-type-dropdown">
|
809 |
+
<option value="mathematical" <?php selected( $val['captcha_type'], 'mathematical' ); ?>><?php _e( 'Mathematical Captcha', UFBL_TD ); ?></option>
|
810 |
+
<option value="google" <?php selected( $val['captcha_type'], 'google' ); ?>><?php _e( 'Google reCaptcha', UFBL_TD ); ?></option>
|
811 |
+
</select>
|
812 |
+
</div>
|
813 |
+
</div>
|
814 |
+
<div class="ufbl-captcha-field-ref" <?php if ( $val['captcha_type'] == 'mathematical' ) { ?>style="display:none;"<?php } ?>>
|
815 |
+
<div class="ufbl-form-field-wrap">
|
816 |
+
<label><?php _e( 'Site Key', UFBL_TD ) ?></label>
|
817 |
+
<div class="ufbl-form-field">
|
818 |
+
<input type="text" name="field_data[<?php echo $key; ?>][site_key]" value="<?php echo isset( $val['site_key'] ) ? esc_attr( $val['site_key'] ) : ''; ?>"/>
|
819 |
+
</div>
|
820 |
+
</div>
|
821 |
+
<div class="ufbl-form-field-wrap">
|
822 |
+
<label><?php _e( 'Secret Key', UFBL_TD ) ?></label>
|
823 |
+
<div class="ufbl-form-field">
|
824 |
+
<input type="text" name="field_data[<?php echo $key; ?>][secret_key]" value="<?php echo isset( $val['secret_key'] ) ? esc_attr( $val['secret_key'] ) : ''; ?>"/>
|
825 |
+
</div>
|
826 |
+
</div>
|
827 |
+
<div class="ufbl-field-extra-note">
|
828 |
+
<?php
|
829 |
+
_e( 'Google Captcha will only show up in form filled the valid google captcha keys.Please visit <a href="https://www.google.com/recaptcha/admin" target="_blank">here</a> to get your site and secret key.', UFBL_TD );
|
830 |
+
?>
|
831 |
+
|
832 |
+
</div>
|
833 |
+
</div>
|
834 |
+
<div class="ufbl-form-field-wrap">
|
835 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
836 |
+
<div class="ufbl-form-field">
|
837 |
+
<input type="text" name="field_data[<?php echo $key; ?>][error_message]" placeholder="<?php _e( 'Please verify you are human.', UFBL_TD ); ?>" value="<?php echo isset( $val['error_message'] ) ? esc_attr( $val['error_message'] ) : ''; ?>"/>
|
838 |
+
</div>
|
839 |
+
</div>
|
840 |
+
<div class="ufbl-form-field-wrap">
|
841 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
842 |
+
<div class="ufbl-form-field">
|
843 |
+
<input type="text" name="field_data[<?php echo $key; ?>][placeholder]" placeholder='<?php _e( 'Enter Sum', UFBL_TD ); ?>' value="<?php echo isset( $val['placeholder'] ) ? esc_attr( $val['placeholder'] ) : ''; ?>"/>
|
844 |
+
<div class="ufbl-field-note"><?php _e( 'Note: Placeholder is only for the mathematical type captcha.' ); ?></div>
|
845 |
+
</div>
|
846 |
+
</div>
|
847 |
+
<div class="ufbl-form-field-wrap">
|
848 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
849 |
+
<div class="ufbl-form-field">
|
850 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_id]" data-field-name="ufbl_key" data-field-type="field_label" value="<?php echo isset( $val['field_id'] ) ? esc_attr( $val['field_id'] ) : ''; ?>"/>
|
851 |
+
</div>
|
852 |
+
</div>
|
853 |
+
<div class="ufbl-form-field-wrap">
|
854 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
855 |
+
<div class="ufbl-form-field">
|
856 |
+
<input type="text" name="field_data[<?php echo $key; ?>][field_class]" data-field-name="ufbl_key" data-field-type="field_class" value="<?php echo isset( $val['field_class'] ) ? esc_attr( $val['field_class'] ) : ''; ?>"/>
|
857 |
+
</div>
|
858 |
+
</div>
|
859 |
+
<input type="hidden" name="field_data[<?php echo $key; ?>][field_type]" value="captcha" data-field-name="ufbl_key" data-field-type="field_label"/>
|
860 |
+
</div>
|
861 |
+
</div><!--ufbl-each-form-field-->
|
862 |
+
|
863 |
+
<?php
|
864 |
+
break;
|
865 |
+
default:
|
866 |
+
break;
|
867 |
+
}
|
868 |
+
}
|
869 |
+
}
|
870 |
+
?>
|
871 |
+
</div>
|
872 |
+
<input type="hidden" name="form_title" value="<?php echo esc_attr( $form_row['form_title'] ); ?>" class="ufbl-form-title-field"/>
|
873 |
+
<input type="hidden" name="form_id" value="<?php echo esc_attr( $form_row['form_id'] ); ?>" class="ufbl-form-id"/>
|
874 |
+
<input type="hidden" name="form_key_count" value="<?php echo (isset( $form_detail['form_key_count'] ) && $form_detail['form_key_count'] != '') ? $form_detail['form_key_count'] : 0; ?>" class="ufbl-form-key-count"/>
|
875 |
+
</div>
|
876 |
+
</div>
|
877 |
+
<?php wp_nonce_field( 'ufbl-form-nonce', 'ufbl_form_nonce_field' ); ?>
|
878 |
+
|
879 |
+
<div class="ufbl-clear"></div>
|
880 |
+
<div class="ufbl-form-controls ufbl-text-align-right">
|
881 |
+
<input type="button" class="button-primary ufbl-save-form" value="<?php _e( 'Save Form', UFBL_TD ); ?>"/>
|
882 |
+
<a href="<?php echo site_url( '?ufbl_form_preview=true&ufbl_form_id=' . $form_row['form_id'] ); ?>" target="_blank"><input type="button" class="button-primary" value="<?php _e( 'Preview', UFBL_TD ); ?>"/></a>
|
883 |
+
<div class="ufbl-field-note"><?php _e( 'Note: Please save form before preview.', UFBL_TD ); ?></div>
|
884 |
+
</div>
|
885 |
+
<div class="ufbl-clear"></div>
|
886 |
+
</div>
|
887 |
+
|
inc/views/backend/boxes/form-fields-html.php
ADDED
@@ -0,0 +1,797 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="ufbl-form-fields-reference" style="display:none;">
|
2 |
+
<!--Text Field Reference Field --->
|
3 |
+
<div class="ufbl-textfield-reference">
|
4 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
5 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
6 |
+
<div class="ufbl-form-field-wrap">
|
7 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Texfield', UFBL_TD ); ?></label>
|
8 |
+
<div class="ufbl-form-field">
|
9 |
+
<input type="text" disabled="disabled"/>
|
10 |
+
</div>
|
11 |
+
</div><!--ufbl-form-field-wrap-->
|
12 |
+
<div class="ufbl-field-controls">
|
13 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
14 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
15 |
+
</div>
|
16 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
17 |
+
<span class="ufbl-up-arrow"></span>
|
18 |
+
<div class="ufbl-form-field-wrap">
|
19 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
20 |
+
<div class="ufbl-form-field">
|
21 |
+
<input type="text" name="field_data[ufbl_key][field_label]" placeholder="<?php _e( 'Your Name', UFBL_TD ); ?>" class="ufbl-field-label-field ufbl-field" data-field-name="ufbl_key" data-field-type="field_label"/>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
<div class="ufbl-form-field-wrap">
|
25 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
26 |
+
<div class="ufbl-form-field">
|
27 |
+
<input type="checkbox" name="field_data[ufbl_key][required]" value="1" data-field-name="ufbl_key" data-field-type="required"/>
|
28 |
+
</div>
|
29 |
+
</div>
|
30 |
+
<div class="ufbl-form-field-wrap">
|
31 |
+
<label><?php _e( 'Max Characters', UFBL_TD ); ?></label>
|
32 |
+
<div class="ufbl-form-field">
|
33 |
+
<input type="text" name="field_data[ufbl_key][max_chars]" placeholder='50' data-field-name="ufbl_key" data-field-type="max_chars"/>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
<div class="ufbl-form-field-wrap">
|
37 |
+
<label><?php _e( 'Min Characters', UFBL_TD ); ?></label>
|
38 |
+
<div class="ufbl-form-field">
|
39 |
+
<input type="text" name="field_data[ufbl_key][min_chars]" placeholder='20' data-field-name="ufbl_key" data-field-type="min_chars"/>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
<div class="ufbl-form-field-wrap">
|
43 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
44 |
+
<div class="ufbl-form-field">
|
45 |
+
<input type="text" name="field_data[ufbl_key][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="ufbl_key" data-field-type="error_message"/>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<div class="ufbl-form-field-wrap">
|
49 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
50 |
+
<div class="ufbl-form-field">
|
51 |
+
<input type="text" name="field_data[ufbl_key][placeholder]" placeholder='<?php _e( 'Your Name here', UFBL_TD ); ?>' data-field-name="ufbl_key" data-field-type="placeholder"/>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
<div class="ufbl-form-field-wrap">
|
55 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
56 |
+
<div class="ufbl-form-field">
|
57 |
+
<input type="text" name="field_data[ufbl_key][pre_filled_value]" data-field-name="ufbl_key" data-field-type="pre_filled_value"/>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
<div class="ufbl-form-field-wrap">
|
61 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
62 |
+
<div class="ufbl-form-field">
|
63 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_id"/>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<div class="ufbl-form-field-wrap">
|
67 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
68 |
+
<div class="ufbl-form-field">
|
69 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_class"/>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="textfield" data-field-name="ufbl_key" data-field-type="field_type"/>
|
73 |
+
</div>
|
74 |
+
</div><!--ufbl-each-form-field-->
|
75 |
+
</div>
|
76 |
+
<!--Text Field Reference Field --->
|
77 |
+
|
78 |
+
<!--Text Area Reference Field --->
|
79 |
+
<div class="ufbl-textarea-reference">
|
80 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
81 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
82 |
+
<div class="ufbl-form-field-wrap">
|
83 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Texarea', UFBL_TD ); ?></label>
|
84 |
+
<div class="ufbl-form-field">
|
85 |
+
<textarea disabled="disabled"></textarea>
|
86 |
+
</div>
|
87 |
+
</div><!--ufbl-form-field-wrap-->
|
88 |
+
<div class="ufbl-field-controls">
|
89 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
90 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
91 |
+
</div>
|
92 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
93 |
+
<span class="ufbl-up-arrow"></span>
|
94 |
+
<div class="ufbl-form-field-wrap">
|
95 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
96 |
+
<div class="ufbl-form-field">
|
97 |
+
<input type="text" name="field_data[ufbl_key][field_label]" placeholder="<?php _e( 'Your Message', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="ufbl_key" data-field-type="field_type"/>
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
<div class="ufbl-form-field-wrap">
|
101 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
102 |
+
<div class="ufbl-form-field">
|
103 |
+
<input type="checkbox" name="field_data[ufbl_key][required]" value="1" data-field-name="ufbl_key" data-field-type="field_type"/>
|
104 |
+
</div>
|
105 |
+
</div>
|
106 |
+
<div class="ufbl-form-field-wrap">
|
107 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
108 |
+
<div class="ufbl-form-field">
|
109 |
+
<input type="text" name="field_data[ufbl_key][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="ufbl_key" data-field-type="field_type"/>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
<div class="ufbl-form-field-wrap">
|
113 |
+
<label><?php _e( 'Textarea Rows', UFBL_TD ); ?></label>
|
114 |
+
<div class="ufbl-form-field">
|
115 |
+
<input type="text" name="field_data[ufbl_key][textarea_rows]" placeholder='5' data-field-name="ufbl_key" data-field-type="field_type"/>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
<div class="ufbl-form-field-wrap">
|
119 |
+
<label><?php _e( 'Textarea Columns', UFBL_TD ); ?></label>
|
120 |
+
<div class="ufbl-form-field">
|
121 |
+
<input type="text" name="field_data[ufbl_key][textarea_columns]" placeholder='20' data-field-name="ufbl_key" data-field-type="textarea_columns"/>
|
122 |
+
</div>
|
123 |
+
</div>
|
124 |
+
<div class="ufbl-form-field-wrap">
|
125 |
+
<label><?php _e( 'Max Characters', UFBL_TD ); ?></label>
|
126 |
+
<div class="ufbl-form-field">
|
127 |
+
<input type="text" name="field_data[ufbl_key][max_chars]" placeholder='50' data-field-name="ufbl_key" data-field-type="max_chars"/>
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
<div class="ufbl-form-field-wrap">
|
131 |
+
<label><?php _e( 'Min Characters', UFBL_TD ); ?></label>
|
132 |
+
<div class="ufbl-form-field">
|
133 |
+
<input type="text" name="field_data[ufbl_key][min_chars]" placeholder='20' data-field-name="ufbl_key" data-field-type="min_chars"/>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
<div class="ufbl-form-field-wrap">
|
137 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
138 |
+
<div class="ufbl-form-field">
|
139 |
+
<input type="text" name="field_data[ufbl_key][placeholder]" placeholder='<?php _e( 'Your message here', UFBL_TD ); ?>' data-field-name="ufbl_key" data-field-type="placeholder"/>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
<div class="ufbl-form-field-wrap">
|
143 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
144 |
+
<div class="ufbl-form-field">
|
145 |
+
<input type="text" name="field_data[ufbl_key][pre_filled_value]" data-field-name="ufbl_key" data-field-type="pre_filled_value"/>
|
146 |
+
</div>
|
147 |
+
</div>
|
148 |
+
<div class="ufbl-form-field-wrap">
|
149 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
150 |
+
<div class="ufbl-form-field">
|
151 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_id"/>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
<div class="ufbl-form-field-wrap">
|
155 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
156 |
+
<div class="ufbl-form-field">
|
157 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_class"/>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="textarea" data-field-name="ufbl_key" data-field-type="field_type"/>
|
161 |
+
</div>
|
162 |
+
</div><!--ufbl-each-form-field-->
|
163 |
+
</div>
|
164 |
+
<!--Text area reference -->
|
165 |
+
|
166 |
+
<!--Email Reference Field --->
|
167 |
+
<div class="ufbl-email-reference">
|
168 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
169 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
170 |
+
<div class="ufbl-form-field-wrap">
|
171 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Email', UFBL_TD ); ?></label>
|
172 |
+
<div class="ufbl-form-field">
|
173 |
+
<input type="email" disabled="disabled"/>
|
174 |
+
</div>
|
175 |
+
</div><!--ufbl-form-field-wrap-->
|
176 |
+
<div class="ufbl-field-controls">
|
177 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
178 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
179 |
+
</div>
|
180 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
181 |
+
<span class="ufbl-up-arrow"></span>
|
182 |
+
<div class="ufbl-form-field-wrap">
|
183 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
184 |
+
<div class="ufbl-form-field">
|
185 |
+
<input type="text" name="field_data[ufbl_key][field_label]" placeholder="<?php _e( 'Your Email', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="ufbl_key" data-field-type="field_label"/>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
<div class="ufbl-form-field-wrap">
|
189 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
190 |
+
<div class="ufbl-form-field">
|
191 |
+
<input type="checkbox" name="field_data[ufbl_key][required]" value="1" data-field-name="ufbl_key" data-field-type="required"/>
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
<div class="ufbl-form-field-wrap">
|
195 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
196 |
+
<div class="ufbl-form-field">
|
197 |
+
<input type="text" name="field_data[ufbl_key][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="ufbl_key" data-field-type="error_message"/>
|
198 |
+
</div>
|
199 |
+
</div>
|
200 |
+
<div class="ufbl-form-field-wrap">
|
201 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
202 |
+
<div class="ufbl-form-field">
|
203 |
+
<input type="text" name="field_data[ufbl_key][placeholder]" placeholder='<?php _e( 'Your Email here', UFBL_TD ); ?>' data-field-name="ufbl_key" data-field-type="placeholder"/>
|
204 |
+
</div>
|
205 |
+
</div>
|
206 |
+
<div class="ufbl-form-field-wrap">
|
207 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
208 |
+
<div class="ufbl-form-field">
|
209 |
+
<input type="text" name="field_data[ufbl_key][pre_filled_value]" data-field-name="ufbl_key" data-field-type="pre_filled_value"/>
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
<div class="ufbl-form-field-wrap">
|
213 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
214 |
+
<div class="ufbl-form-field">
|
215 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_id"/>
|
216 |
+
</div>
|
217 |
+
</div>
|
218 |
+
<div class="ufbl-form-field-wrap">
|
219 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
220 |
+
<div class="ufbl-form-field">
|
221 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_type"/>
|
222 |
+
</div>
|
223 |
+
</div>
|
224 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="email" data-field-name="ufbl_key" data-field-type="field_type"/>
|
225 |
+
</div>
|
226 |
+
</div><!--ufbl-each-form-field-->
|
227 |
+
</div>
|
228 |
+
<!--Email Field reference-->
|
229 |
+
|
230 |
+
<!--Dropdown Reference Field --->
|
231 |
+
<div class="ufbl-dropdown-reference">
|
232 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
233 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
234 |
+
<div class="ufbl-form-field-wrap">
|
235 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Dropdown', UFBL_TD ); ?></label>
|
236 |
+
<div class="ufbl-form-field">
|
237 |
+
<select disabled="disabled">
|
238 |
+
<option><?php _e( 'Option 1', UFBL_TD ) ?></option>
|
239 |
+
</select>
|
240 |
+
</div>
|
241 |
+
</div><!--ufbl-form-field-wrap-->
|
242 |
+
<div class="ufbl-field-controls">
|
243 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
244 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
245 |
+
</div>
|
246 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
247 |
+
<span class="ufbl-up-arrow"></span>
|
248 |
+
<div class="ufbl-form-field-wrap">
|
249 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
250 |
+
<div class="ufbl-form-field">
|
251 |
+
<input type="text" name="field_data[ufbl_key][field_label]" placeholder="<?php _e( 'Your Country', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="ufbl_key" data-field-type="field_type"/>
|
252 |
+
</div>
|
253 |
+
</div>
|
254 |
+
<div class="ufbl-form-field-wrap">
|
255 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
256 |
+
<div class="ufbl-form-field">
|
257 |
+
<input type="checkbox" name="field_data[ufbl_key][required]" value="1" data-field-name="ufbl_key" data-field-type="field_type"/>
|
258 |
+
</div>
|
259 |
+
</div>
|
260 |
+
<div class="ufbl-form-field-wrap">
|
261 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
262 |
+
<div class="ufbl-form-field">
|
263 |
+
<input type="text" name="field_data[ufbl_key][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="ufbl_key" data-field-type="field_type"/>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
<div class="ufbl-form-field-wrap ufbl-full-width ufbl-op-wrap">
|
267 |
+
<label><?php _e( 'Options', UFBL_TD ); ?></label>
|
268 |
+
<div class="ufbl-form-field">
|
269 |
+
<input type="button" value="<?php _e( 'Add Option', UFBL_TD ); ?>" class="ufbl-option-value-adder button-primary" data-field-key="ufbl_key"/>
|
270 |
+
<div class="ufbl-option-value-wrap">
|
271 |
+
<div class="ufbl-each-option">
|
272 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
273 |
+
<input type="text" name="field_data[ufbl_key][option][]" value="<?php _e( 'Option 1', UFBL_TD ); ?>" placeholder="Option" data-field-name="ufbl_key" data-field-type="option"/>
|
274 |
+
<input type="text" name="field_data[ufbl_key][value][]" value="<?php _e( 'Option 1', UFBL_TD ); ?>" placeholder="Value" data-field-name="ufbl_key" data-field-type="value"/>
|
275 |
+
<span class="ufbl-option-remover">X</span>
|
276 |
+
</div>
|
277 |
+
<div class="ufbl-each-option">
|
278 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
279 |
+
<input type="text" name="field_data[ufbl_key][option][]" value="<?php _e( 'Option 2', UFBL_TD ); ?>" placeholder="Option" data-field-name="ufbl_key" data-field-type="option"/>
|
280 |
+
<input type="text" name="field_data[ufbl_key][value][]" value="<?php _e( 'Option 2', UFBL_TD ); ?>" placeholder="Value" data-field-name="ufbl_key" data-field-type="value"/>
|
281 |
+
<span class="ufbl-option-remover">X</span>
|
282 |
+
</div>
|
283 |
+
<div class="ufbl-each-option">
|
284 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
285 |
+
<input type="text" name="field_data[ufbl_key][option][]" value="<?php _e( 'Option 3', UFBL_TD ); ?>" placeholder="Option" data-field-name="ufbl_key" data-field-type="option"/>
|
286 |
+
<input type="text" name="field_data[ufbl_key][value][]" value="<?php _e( 'Option 3', UFBL_TD ); ?>" placeholder="Value" data-field-name="ufbl_key" data-field-type="value"/>
|
287 |
+
<span class="ufbl-option-remover">X</span>
|
288 |
+
</div>
|
289 |
+
</div>
|
290 |
+
</div>
|
291 |
+
</div>
|
292 |
+
<div class="ufbl-form-field-wrap">
|
293 |
+
<label><?php _e( 'Multiple', UFBL_TD ); ?></label>
|
294 |
+
<div class="ufbl-form-field">
|
295 |
+
<input type="checkbox" name="field_data[ufbl_key][multiple]" value="1" data-field-name="ufbl_key" data-field-type="multiple"/>
|
296 |
+
</div>
|
297 |
+
</div>
|
298 |
+
<div class="ufbl-form-field-wrap">
|
299 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
300 |
+
<div class="ufbl-form-field">
|
301 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_id"/>
|
302 |
+
</div>
|
303 |
+
</div>
|
304 |
+
<div class="ufbl-form-field-wrap">
|
305 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
306 |
+
<div class="ufbl-form-field">
|
307 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_class"/>
|
308 |
+
</div>
|
309 |
+
</div>
|
310 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="dropdown" data-field-name="ufbl_key" data-field-type="field_type"/>
|
311 |
+
</div>
|
312 |
+
</div><!--ufbl-each-form-field-->
|
313 |
+
</div>
|
314 |
+
<!--Dropdown Reference Field --->
|
315 |
+
|
316 |
+
<!--Radio Button Reference Field --->
|
317 |
+
<div class="ufbl-radio-reference">
|
318 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
319 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
320 |
+
<div class="ufbl-form-field-wrap">
|
321 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Radio', UFBL_TD ); ?></label>
|
322 |
+
<div class="ufbl-form-field">
|
323 |
+
<label><input type="radio" checked="checked" disabled="disabled"><?php _e( 'Option 1', UFBL_TD ); ?></label>
|
324 |
+
<label><input type="radio" disabled="disabled"><?php _e( 'Option 2', UFBL_TD ); ?></label>
|
325 |
+
</div>
|
326 |
+
</div><!--ufbl-form-field-wrap-->
|
327 |
+
<div class="ufbl-field-controls">
|
328 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
329 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
330 |
+
</div>
|
331 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
332 |
+
<span class="ufbl-up-arrow"></span>
|
333 |
+
<div class="ufbl-form-field-wrap">
|
334 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
335 |
+
<div class="ufbl-form-field">
|
336 |
+
<input type="text" name="field_data[ufbl_key][field_label]" placeholder="<?php _e( 'Your Gender', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="ufbl_key" data-field-type="field_label"/>
|
337 |
+
</div>
|
338 |
+
</div>
|
339 |
+
<div class="ufbl-form-field-wrap">
|
340 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
341 |
+
<div class="ufbl-form-field">
|
342 |
+
<input type="checkbox" name="field_data[ufbl_key][required]" value="1"/>
|
343 |
+
</div>
|
344 |
+
</div>
|
345 |
+
<div class="ufbl-form-field-wrap">
|
346 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
347 |
+
<div class="ufbl-form-field">
|
348 |
+
<input type="text" name="field_data[ufbl_key][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="ufbl_key" data-field-type="field_label"/>
|
349 |
+
</div>
|
350 |
+
</div>
|
351 |
+
<div class="ufbl-form-field-wrap ufbl-full-width ufbl-op-wrap">
|
352 |
+
<label><?php _e( 'Options', UFBL_TD ); ?></label>
|
353 |
+
<div class="ufbl-form-field">
|
354 |
+
<input type="button" value="<?php _e( 'Add Option', UFBL_TD ); ?>" class="ufbl-option-value-adder button-primary" data-field-key="ufbl_key"/>
|
355 |
+
<div class="ufbl-option-value-wrap">
|
356 |
+
<div class="ufbl-each-option">
|
357 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
358 |
+
<input type="text" name="field_data[ufbl_key][option][]" value="<?php _e( 'Option 1', UFBL_TD ); ?>" placeholder="Option" data-field-name="ufbl_key" data-field-type="field_label"/>
|
359 |
+
<input type="text" name="field_data[ufbl_key][value][]" value="<?php _e( 'Option 1', UFBL_TD ); ?>" placeholder="Value" data-field-name="ufbl_key" data-field-type="field_label"/>
|
360 |
+
<span class="ufbl-option-remover">X</span>
|
361 |
+
</div>
|
362 |
+
<div class="ufbl-each-option">
|
363 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
364 |
+
<input type="text" name="field_data[ufbl_key][option][]" value="<?php _e( 'Option 2', UFBL_TD ); ?>" placeholder="Option" data-field-name="ufbl_key" data-field-type="field_label"/>
|
365 |
+
<input type="text" name="field_data[ufbl_key][value][]" value="<?php _e( 'Option 2', UFBL_TD ); ?>" placeholder="Value" data-field-name="ufbl_key" data-field-type="field_label"/>
|
366 |
+
<span class="ufbl-option-remover">X</span>
|
367 |
+
</div>
|
368 |
+
|
369 |
+
</div>
|
370 |
+
</div>
|
371 |
+
</div>
|
372 |
+
<div class="ufbl-form-field-wrap">
|
373 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
374 |
+
<div class="ufbl-form-field">
|
375 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
376 |
+
</div>
|
377 |
+
</div>
|
378 |
+
<div class="ufbl-form-field-wrap">
|
379 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
380 |
+
<div class="ufbl-form-field">
|
381 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
382 |
+
</div>
|
383 |
+
</div>
|
384 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="radio" data-field-name="ufbl_key" data-field-type="field_label"/>
|
385 |
+
</div>
|
386 |
+
</div><!--ufbl-each-form-field-->
|
387 |
+
</div>
|
388 |
+
<!--Radio Button Reference Field --->
|
389 |
+
|
390 |
+
<!--Checkbox Reference Field --->
|
391 |
+
<div class="ufbl-checkbox-reference">
|
392 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
393 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
394 |
+
<div class="ufbl-form-field-wrap">
|
395 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Checkbox', UFBL_TD ); ?></label>
|
396 |
+
<div class="ufbl-form-field">
|
397 |
+
<label><input type="checkbox" disabled="disabled"><?php _e( 'Option 1', UFBL_TD ); ?></label>
|
398 |
+
<label><input type="checkbox" disabled="disabled"><?php _e( 'Option 2', UFBL_TD ); ?></label>
|
399 |
+
<label><input type="checkbox" disabled="disabled"><?php _e( 'Option 3', UFBL_TD ); ?></label>
|
400 |
+
</div>
|
401 |
+
</div><!--ufbl-form-field-wrap-->
|
402 |
+
<div class="ufbl-field-controls">
|
403 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
404 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
405 |
+
</div>
|
406 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
407 |
+
<span class="ufbl-up-arrow"></span>
|
408 |
+
<div class="ufbl-form-field-wrap">
|
409 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
410 |
+
<div class="ufbl-form-field">
|
411 |
+
<input type="text" name="field_data[ufbl_key][field_label]" placeholder="<?php _e( 'Your Hobbies', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="ufbl_key" data-field-type="field_label"/>
|
412 |
+
</div>
|
413 |
+
</div>
|
414 |
+
<div class="ufbl-form-field-wrap">
|
415 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
416 |
+
<div class="ufbl-form-field">
|
417 |
+
<input type="checkbox" name="field_data[ufbl_key][required]" value="1" data-field-name="ufbl_key" data-field-type="field_label"/>
|
418 |
+
</div>
|
419 |
+
</div>
|
420 |
+
<div class="ufbl-form-field-wrap">
|
421 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
422 |
+
<div class="ufbl-form-field">
|
423 |
+
<input type="text" name="field_data[ufbl_key][error_message]" placeholder="<?php _e( 'Please fill your name', UFBL_TD ); ?>" data-field-name="ufbl_key" data-field-type="field_label"/>
|
424 |
+
</div>
|
425 |
+
</div>
|
426 |
+
<div class="ufbl-form-field-wrap ufbl-full-width ufbl-op-wrap">
|
427 |
+
<label><?php _e( 'Options', UFBL_TD ); ?></label>
|
428 |
+
<div class="ufbl-form-field">
|
429 |
+
<input type="button" value="<?php _e( 'Add Option', UFBL_TD ); ?>" class="ufbl-option-value-adder button-primary" data-field-key="ufbl_key"/>
|
430 |
+
<div class="ufbl-option-value-wrap">
|
431 |
+
<div class="ufbl-each-option">
|
432 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
433 |
+
<input type="text" name="field_data[ufbl_key][option][]" value="<?php _e( 'Option 1', UFBL_TD ); ?>" placeholder="Option" data-field-name="ufbl_key" data-field-type="field_label"/>
|
434 |
+
<input type="text" name="field_data[ufbl_key][value][]" value="<?php _e( 'Option 1', UFBL_TD ); ?>" placeholder="Value" data-field-name="ufbl_key" data-field-type="field_label"/>
|
435 |
+
<span class="ufbl-option-remover">X</span>
|
436 |
+
</div>
|
437 |
+
<div class="ufbl-each-option">
|
438 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
439 |
+
<input type="text" name="field_data[ufbl_key][option][]" value="<?php _e( 'Option 2', UFBL_TD ); ?>" placeholder="Option" data-field-name="ufbl_key" data-field-type="field_label"/>
|
440 |
+
<input type="text" name="field_data[ufbl_key][value][]" value="<?php _e( 'Option 2', UFBL_TD ); ?>" placeholder="Value" data-field-name="ufbl_key" data-field-type="field_label"/>
|
441 |
+
<span class="ufbl-option-remover">X</span>
|
442 |
+
</div>
|
443 |
+
<div class="ufbl-each-option">
|
444 |
+
<span class="ufbl-option-drag-arrow"><i class="fa fa-arrows"></i></span>
|
445 |
+
<input type="text" name="field_data[ufbl_key][option][]" value="<?php _e( 'Option 3', UFBL_TD ); ?>" placeholder="Option" data-field-name="ufbl_key" data-field-type="field_label"/>
|
446 |
+
<input type="text" name="field_data[ufbl_key][value][]" value="<?php _e( 'Option 3', UFBL_TD ); ?>" placeholder="Value" data-field-name="ufbl_key" data-field-type="field_label"/>
|
447 |
+
<span class="ufbl-option-remover">X</span>
|
448 |
+
</div>
|
449 |
+
</div>
|
450 |
+
</div>
|
451 |
+
</div>
|
452 |
+
<div class="ufbl-form-field-wrap">
|
453 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
454 |
+
<div class="ufbl-form-field">
|
455 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
456 |
+
</div>
|
457 |
+
</div>
|
458 |
+
<div class="ufbl-form-field-wrap">
|
459 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
460 |
+
<div class="ufbl-form-field">
|
461 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
462 |
+
</div>
|
463 |
+
</div>
|
464 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="checkbox" data-field-name="ufbl_key" data-field-type="field_label"/>
|
465 |
+
</div>
|
466 |
+
</div><!--ufbl-each-form-field-->
|
467 |
+
</div>
|
468 |
+
<!--Checkbox Reference Field --->
|
469 |
+
|
470 |
+
<!--Password Reference Field --->
|
471 |
+
<div class="ufbl-password-reference">
|
472 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
473 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
474 |
+
<div class="ufbl-form-field-wrap">
|
475 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Password', UFBL_TD ); ?></label>
|
476 |
+
<div class="ufbl-form-field">
|
477 |
+
<input type="password" disabled="disabled"/>
|
478 |
+
</div>
|
479 |
+
</div><!--ufbl-form-field-wrap-->
|
480 |
+
<div class="ufbl-field-controls">
|
481 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
482 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
483 |
+
</div>
|
484 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
485 |
+
<span class="ufbl-up-arrow"></span>
|
486 |
+
<div class="ufbl-form-field-wrap">
|
487 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
488 |
+
<div class="ufbl-form-field">
|
489 |
+
<input type="text" name="field_data[ufbl_key][field_label]" placeholder="<?php _e( 'Your Password', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="ufbl_key" data-field-type="field_label"/>
|
490 |
+
</div>
|
491 |
+
</div>
|
492 |
+
<div class="ufbl-form-field-wrap">
|
493 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
494 |
+
<div class="ufbl-form-field">
|
495 |
+
<input type="checkbox" name="field_data[ufbl_key][required]" value="1" data-field-name="ufbl_key" data-field-type="field_label"/>
|
496 |
+
</div>
|
497 |
+
</div>
|
498 |
+
<div class="ufbl-form-field-wrap">
|
499 |
+
<label><?php _e( 'Max Characters', UFBL_TD ); ?></label>
|
500 |
+
<div class="ufbl-form-field">
|
501 |
+
<input type="text" name="field_data[ufbl_key][max_chars]" placeholder='50' data-field-name="ufbl_key" data-field-type="field_label"/>
|
502 |
+
</div>
|
503 |
+
</div>
|
504 |
+
<div class="ufbl-form-field-wrap">
|
505 |
+
<label><?php _e( 'Min Characters', UFBL_TD ); ?></label>
|
506 |
+
<div class="ufbl-form-field">
|
507 |
+
<input type="text" name="field_data[ufbl_key][min_chars]" placeholder='20' data-field-name="ufbl_key" data-field-type="field_label"/>
|
508 |
+
</div>
|
509 |
+
</div>
|
510 |
+
<div class="ufbl-form-field-wrap">
|
511 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
512 |
+
<div class="ufbl-form-field">
|
513 |
+
<input type="text" name="field_data[ufbl_key][error_message]" placeholder="<?php _e( 'Please fill number only', UFBL_TD ); ?>" data-field-name="ufbl_key" data-field-type="field_label"/>
|
514 |
+
</div>
|
515 |
+
</div>
|
516 |
+
<div class="ufbl-form-field-wrap">
|
517 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
518 |
+
<div class="ufbl-form-field">
|
519 |
+
<input type="text" name="field_data[ufbl_key][placeholder]" placeholder='<?php _e( 'Your Password here', UFBL_TD ); ?>' data-field-name="ufbl_key" data-field-type="field_label"/>
|
520 |
+
</div>
|
521 |
+
</div>
|
522 |
+
<div class="ufbl-form-field-wrap">
|
523 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
524 |
+
<div class="ufbl-form-field">
|
525 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
526 |
+
</div>
|
527 |
+
</div>
|
528 |
+
<div class="ufbl-form-field-wrap">
|
529 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
530 |
+
<div class="ufbl-form-field">
|
531 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
532 |
+
</div>
|
533 |
+
</div>
|
534 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="password" data-field-name="ufbl_key" data-field-type="field_label"/>
|
535 |
+
</div>
|
536 |
+
</div><!--ufbl-each-form-field-->
|
537 |
+
</div>
|
538 |
+
<!--Password Reference Field --->
|
539 |
+
|
540 |
+
<!--Hidden Reference Field-->
|
541 |
+
<div class="ufbl-hidden-reference">
|
542 |
+
<div class="ufbl-each-form-field ufbl-submit-button-wrap ufbl-relative">
|
543 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
544 |
+
<div class="ufbl-form-field-wrap">
|
545 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Hidden', UFBL_TD ); ?></label>
|
546 |
+
<div class="ufbl-form-field">
|
547 |
+
<input type="hidden" disabled="disabled"/>
|
548 |
+
</div>
|
549 |
+
</div><!--ufbl-form-field-wrap-->
|
550 |
+
<div class="ufbl-field-controls">
|
551 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
552 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
553 |
+
</div>
|
554 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
555 |
+
<span class="ufbl-up-arrow"></span>
|
556 |
+
<div class="ufbl-form-field-wrap">
|
557 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
558 |
+
<div class="ufbl-form-field">
|
559 |
+
<input type="text" name="field_data[ufbl_key][field_label]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
560 |
+
</div>
|
561 |
+
</div>
|
562 |
+
<div class="ufbl-form-field-wrap">
|
563 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
564 |
+
<div class="ufbl-form-field">
|
565 |
+
<input type="text" name="field_data[ufbl_key][pre_filled_value]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
566 |
+
</div>
|
567 |
+
</div>
|
568 |
+
<div class="ufbl-form-field-wrap">
|
569 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
570 |
+
<div class="ufbl-form-field">
|
571 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
572 |
+
</div>
|
573 |
+
</div>
|
574 |
+
<div class="ufbl-form-field-wrap">
|
575 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
576 |
+
<div class="ufbl-form-field">
|
577 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
578 |
+
</div>
|
579 |
+
</div>
|
580 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="hidden" data-field-name="ufbl_key" data-field-type="field_label"/>
|
581 |
+
</div>
|
582 |
+
</div><!--ufbl-each-form-field-->
|
583 |
+
</div>
|
584 |
+
<!--Hidden Reference Field-->
|
585 |
+
|
586 |
+
<!--Number Reference Field-->
|
587 |
+
<div class="ufbl-number-reference">
|
588 |
+
<div class="ufbl-each-form-field ufbl-relative">
|
589 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
590 |
+
<div class="ufbl-form-field-wrap">
|
591 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Number', UFBL_TD ); ?></label>
|
592 |
+
<div class="ufbl-form-field">
|
593 |
+
<input type="number" disabled="disabled"/>
|
594 |
+
</div>
|
595 |
+
</div><!--ufbl-form-field-wrap-->
|
596 |
+
<div class="ufbl-field-controls">
|
597 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
598 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
599 |
+
</div>
|
600 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
601 |
+
<span class="ufbl-up-arrow"></span>
|
602 |
+
<div class="ufbl-form-field-wrap">
|
603 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
604 |
+
<div class="ufbl-form-field">
|
605 |
+
<input type="text" name="field_data[ufbl_key][field_label]" placeholder="<?php _e( 'Your Number', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="ufbl_key" data-field-type="field_label"/>
|
606 |
+
</div>
|
607 |
+
</div>
|
608 |
+
<div class="ufbl-form-field-wrap">
|
609 |
+
<label><?php _e( 'Required', UFBL_TD ); ?></label>
|
610 |
+
<div class="ufbl-form-field">
|
611 |
+
<input type="checkbox" name="field_data[ufbl_key][required]" value="1" data-field-name="ufbl_key" data-field-type="field_label"/>
|
612 |
+
</div>
|
613 |
+
</div>
|
614 |
+
<div class="ufbl-form-field-wrap">
|
615 |
+
<label><?php _e( 'Max Value', UFBL_TD ); ?></label>
|
616 |
+
<div class="ufbl-form-field">
|
617 |
+
<input type="text" name="field_data[ufbl_key][max_value]" placeholder='50' data-field-name="ufbl_key" data-field-type="max_value"/>
|
618 |
+
</div>
|
619 |
+
</div>
|
620 |
+
<div class="ufbl-form-field-wrap">
|
621 |
+
<label><?php _e( 'Min Value', UFBL_TD ); ?></label>
|
622 |
+
<div class="ufbl-form-field">
|
623 |
+
<input type="text" name="field_data[ufbl_key][min_value]" placeholder='20' data-field-name="ufbl_key" data-field-type="min_value"/>
|
624 |
+
</div>
|
625 |
+
</div>
|
626 |
+
<div class="ufbl-form-field-wrap">
|
627 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
628 |
+
<div class="ufbl-form-field">
|
629 |
+
<input type="text" name="field_data[ufbl_key][error_message]" placeholder="<?php _e( 'Please fill number only', UFBL_TD ); ?>" data-field-name="ufbl_key" data-field-type="field_label"/>
|
630 |
+
</div>
|
631 |
+
</div>
|
632 |
+
<div class="ufbl-form-field-wrap">
|
633 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
634 |
+
<div class="ufbl-form-field">
|
635 |
+
<input type="text" name="field_data[ufbl_key][placeholder]" placeholder='<?php _e( 'Your Password here', UFBL_TD ); ?>' data-field-name="ufbl_key" data-field-type="field_label"/>
|
636 |
+
</div>
|
637 |
+
</div>
|
638 |
+
<div class="ufbl-form-field-wrap">
|
639 |
+
<label><?php _e( 'Pre filled value', UFBL_TD ); ?></label>
|
640 |
+
<div class="ufbl-form-field">
|
641 |
+
<input type="text" name="field_data[ufbl_key][pre_filled_value]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
642 |
+
</div>
|
643 |
+
</div>
|
644 |
+
<div class="ufbl-form-field-wrap">
|
645 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
646 |
+
<div class="ufbl-form-field">
|
647 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
648 |
+
</div>
|
649 |
+
</div>
|
650 |
+
<div class="ufbl-form-field-wrap">
|
651 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
652 |
+
<div class="ufbl-form-field">
|
653 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
654 |
+
</div>
|
655 |
+
</div>
|
656 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="number" data-field-name="ufbl_key" data-field-type="field_label"/>
|
657 |
+
</div>
|
658 |
+
</div><!--ufbl-each-form-field-->
|
659 |
+
</div>
|
660 |
+
<!--Number Reference Field-->
|
661 |
+
|
662 |
+
<!--Captcha Reference Field-->
|
663 |
+
<div class="ufbl-captcha-reference">
|
664 |
+
<div class="ufbl-each-form-field ufbl-submit-button-wrap ufbl-relative">
|
665 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
666 |
+
<div class="ufbl-form-field-wrap">
|
667 |
+
<label class="ufbl-field-label-ref"><?php _e( 'Untitled Captcha', UFBL_TD ); ?></label>
|
668 |
+
<div class="ufbl-form-field">
|
669 |
+
|
670 |
+
</div>
|
671 |
+
</div><!--ufbl-form-field-wrap-->
|
672 |
+
<div class="ufbl-field-controls">
|
673 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
674 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger">Delete</a>
|
675 |
+
</div>
|
676 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
677 |
+
<span class="ufbl-up-arrow"></span>
|
678 |
+
<div class="ufbl-form-field-wrap">
|
679 |
+
<label><?php _e( 'Field Label', UFBL_TD ); ?></label>
|
680 |
+
<div class="ufbl-form-field">
|
681 |
+
<input type="text" name="field_data[ufbl_key][field_label]" placeholder="<?php _e( 'Human Check', UFBL_TD ); ?>" class="ufbl-field-label-field" data-field-name="ufbl_key" data-field-type="field_label"/>
|
682 |
+
</div>
|
683 |
+
</div>
|
684 |
+
<div class="ufbl-form-field-wrap">
|
685 |
+
<label><?php _e( 'Captcha Type', UFBL_TD ); ?></label>
|
686 |
+
<div class="ufbl-form-field">
|
687 |
+
<select name="field_data[ufbl_key][captcha_type]" class="ufbl-captcha-type-dropdown">
|
688 |
+
<option value="mathematical"><?php _e( 'Mathematical Captcha', UFBL_TD ); ?></option>
|
689 |
+
<option value="google"><?php _e( 'Google reCaptcha', UFBL_TD ); ?></option>
|
690 |
+
</select>
|
691 |
+
</div>
|
692 |
+
</div>
|
693 |
+
<div class="ufbl-captcha-field-ref" style="display:none;">
|
694 |
+
<div class="ufbl-form-field-wrap">
|
695 |
+
<label><?php _e( 'Site Key', UFBL_TD ) ?></label>
|
696 |
+
<div class="ufbl-form-field">
|
697 |
+
<input type="text" name="field_data[ufbl_key][site_key]" data-field-name="ufbl_key"/>
|
698 |
+
</div>
|
699 |
+
</div>
|
700 |
+
<div class="ufbl-form-field-wrap">
|
701 |
+
<label><?php _e( 'Secret Key', UFBL_TD ) ?></label>
|
702 |
+
<div class="ufbl-form-field">
|
703 |
+
<input type="text" name="field_data[ufbl_key][secret_key]" data-field-name="ufbl_key"/>
|
704 |
+
</div>
|
705 |
+
</div>
|
706 |
+
<div class="ufbl-field-extra-note">
|
707 |
+
<?php
|
708 |
+
_e( 'Google Captcha will only show up in form filled the valid google captcha keys.Please visit <a href="https://www.google.com/recaptcha/admin" target="_blank">here</a> to get your site and secret key.', UFBL_TD );
|
709 |
+
?>
|
710 |
+
|
711 |
+
</div>
|
712 |
+
</div>
|
713 |
+
<div class="ufbl-form-field-wrap">
|
714 |
+
<label><?php _e( 'Error Message', UFBL_TD ); ?></label>
|
715 |
+
<div class="ufbl-form-field">
|
716 |
+
<input type="text" name="field_data[ufbl_key][error_message]" placeholder="<?php _e( 'Please verify you are human.', UFBL_TD ); ?>" data-field-name="ufbl_key" data-field-type="field_label"/>
|
717 |
+
</div>
|
718 |
+
</div>
|
719 |
+
<div class="ufbl-form-field-wrap">
|
720 |
+
<label><?php _e( 'Placeholder', UFBL_TD ); ?></label>
|
721 |
+
<div class="ufbl-form-field">
|
722 |
+
<input type="text" name="field_data[ufbl_key][placeholder]" placeholder='<?php _e( 'Enter Sum', UFBL_TD ); ?>' data-field-name="ufbl_key" data-field-type="placeholder"/>
|
723 |
+
</div>
|
724 |
+
</div>
|
725 |
+
<div class="ufbl-form-field-wrap">
|
726 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
727 |
+
<div class="ufbl-form-field">
|
728 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
729 |
+
</div>
|
730 |
+
</div>
|
731 |
+
<div class="ufbl-form-field-wrap">
|
732 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
733 |
+
<div class="ufbl-form-field">
|
734 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_label"/>
|
735 |
+
</div>
|
736 |
+
</div>
|
737 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="captcha" data-field-name="ufbl_key" data-field-type="field_label"/>
|
738 |
+
</div>
|
739 |
+
</div><!--ufbl-each-form-field-->
|
740 |
+
</div>
|
741 |
+
<!--Captcha Reference Field-->
|
742 |
+
|
743 |
+
<!--Submit Reference Field-->
|
744 |
+
<div class="ufbl-submit-reference">
|
745 |
+
<div class="ufbl-each-form-field ufbl-submit-button-wrap ufbl-relative">
|
746 |
+
<span class="ufbl-drag-arrow"><i class="fa fa-arrows"></i></span>
|
747 |
+
<div class="ufbl-form-field-wrap">
|
748 |
+
<div class="ufbl-form-field">
|
749 |
+
<input type="submit" disabled="disabled" class="button-primary ufbl-submit-reference" value="<?php _e( 'Submit', UFBL_TD ); ?>"/>
|
750 |
+
</div>
|
751 |
+
</div><!--ufbl-form-field-wrap-->
|
752 |
+
<div class="ufbl-field-controls">
|
753 |
+
<a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary"><?php _e( 'Settings', UFBL_TD ); ?></a><span>+</span>
|
754 |
+
<a href="javascript:void(0)" class="ufbl-field-delete-trigger" data-confirm-message="<?php _e( 'If you delete this element then data related with this element will also be deleted. Are you sure you want to delete this element?', UFBL_TD ); ?>">Delete</a>
|
755 |
+
</div>
|
756 |
+
<div class="ufbl-field-settings-wrap" style="display:none;">
|
757 |
+
<span class="ufbl-up-arrow"></span>
|
758 |
+
<div class="ufbl-form-field-wrap">
|
759 |
+
<label><?php _e( 'Submit Button label', UFBL_TD ); ?></label>
|
760 |
+
<div class="ufbl-form-field">
|
761 |
+
<input type="text" name="field_data[ufbl_key][button_label]" class="ufbl-submit-button" data-field-name="ufbl_key" data-field-type="button_label"/>
|
762 |
+
</div>
|
763 |
+
</div>
|
764 |
+
<div class="ufbl-form-field-wrap">
|
765 |
+
<label><?php _e( 'Show Reset Button', UFBL_TD ); ?></label>
|
766 |
+
<div class="ufbl-form-field">
|
767 |
+
<input type="checkbox" name="field_data[ufbl_key][show_reset_button]" value="1" data-field-name="ufbl_key" data-field-type="field_label"/>
|
768 |
+
</div>
|
769 |
+
</div>
|
770 |
+
<div class="ufbl-form-field-wrap">
|
771 |
+
<label><?php _e( 'Reset Button label', UFBL_TD ); ?></label>
|
772 |
+
<div class="ufbl-form-field">
|
773 |
+
<input type="text" name="field_data[ufbl_key][reset_label]" data-field-name="ufbl_key" data-field-type="button_label"/>
|
774 |
+
</div>
|
775 |
+
</div>
|
776 |
+
<div class="ufbl-form-field-wrap">
|
777 |
+
<label><?php _e( 'ID of the field', UFBL_TD ); ?></label>
|
778 |
+
<div class="ufbl-form-field">
|
779 |
+
<input type="text" name="field_data[ufbl_key][field_id]" data-field-name="ufbl_key" data-field-type="field_id"/>
|
780 |
+
</div>
|
781 |
+
</div>
|
782 |
+
<div class="ufbl-form-field-wrap">
|
783 |
+
<label><?php _e( 'Class of the field', UFBL_TD ); ?></label>
|
784 |
+
<div class="ufbl-form-field">
|
785 |
+
<input type="text" name="field_data[ufbl_key][field_class]" data-field-name="ufbl_key" data-field-type="field_class"/>
|
786 |
+
</div>
|
787 |
+
</div>
|
788 |
+
<input type="hidden" name="field_data[ufbl_key][field_type]" value="submit" data-field-name="ufbl_key" data-field-type="field_type"/>
|
789 |
+
</div>
|
790 |
+
</div><!--ufbl-each-form-field-->
|
791 |
+
</div>
|
792 |
+
<!--Submit Reference Field-->
|
793 |
+
|
794 |
+
</div>
|
795 |
+
<div class="ufbl-form-temp-holder" style="display:none;">
|
796 |
+
|
797 |
+
</div>
|
inc/views/backend/entry-detail.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="ufbl-entry-detail-wrap">
|
2 |
+
<div class="ufbl-relative">
|
3 |
+
<span class="ufbl-entry-detail-close">X</span>
|
4 |
+
<?php
|
5 |
+
if ( $entry_row != NULL && !empty( $entry_row ) ) {
|
6 |
+
?>
|
7 |
+
<h3><?php echo esc_attr( $entry_row['form_title'] ); ?></h3>
|
8 |
+
<div class="ufbl-entry-inner-wrap">
|
9 |
+
<?php
|
10 |
+
$form_detail = maybe_unserialize( $entry_row['form_detail'] );
|
11 |
+
if ( !empty( $form_detail ) ) {
|
12 |
+
$field_data = $form_detail['field_data'];
|
13 |
+
$entry_detail = maybe_unserialize( $entry_row['entry_detail'] );
|
14 |
+
$except_field_types = array( 'submit', 'captcha' );
|
15 |
+
$field_count = 0;
|
16 |
+
?>
|
17 |
+
<div class="ufbl-entry-field-wrap <?php echo ($field_count % 2 == 0) ? 'ufbl-entry-even' : ''; ?>">
|
18 |
+
<label><?php _e( 'Entry Posted Date', UFBL_TD ); ?></label>
|
19 |
+
<div class="ufbl-entry-value"><?php echo esc_attr( $entry_row['entry_created'] ); ?></div>
|
20 |
+
</div>
|
21 |
+
<?php
|
22 |
+
foreach ( $field_data as $field_key => $field_settings ) {
|
23 |
+
$field_count++;
|
24 |
+
if ( !in_array( $field_settings['field_type'], $except_field_types ) ) {
|
25 |
+
$field_label = ($field_settings['field_label'] != '') ? esc_attr( $field_settings['field_label'] ) : __( 'Untitled', UFBL_TD ) . ' ' . $field_settings['field_type'];
|
26 |
+
if ( isset( $entry_detail[$field_key] ) ) {
|
27 |
+
if ( is_array( $entry_detail[$field_key] ) ) {
|
28 |
+
$entry_detail[$field_key] = array_map( 'esc_attr', $entry_detail[$field_key] );
|
29 |
+
$entry_value = implode( ', ', $entry_detail[$field_key] );
|
30 |
+
} else {
|
31 |
+
$entry_value = ($entry_detail[$field_key] != '') ? esc_attr( $entry_detail[$field_key] ) : '';
|
32 |
+
}
|
33 |
+
} else {
|
34 |
+
$entry_value = '';
|
35 |
+
}
|
36 |
+
?>
|
37 |
+
<div class="ufbl-entry-field-wrap <?php echo ($field_count % 2 == 0) ? 'ufbl-entry-even' : ''; ?>">
|
38 |
+
<label><?php echo $field_label; ?></label>
|
39 |
+
<div class="ufbl-entry-value"><?php echo $entry_value; ?></div>
|
40 |
+
</div>
|
41 |
+
<?php
|
42 |
+
}
|
43 |
+
}
|
44 |
+
//self::print_array( $field_data );
|
45 |
+
//self::print_array( $entry_detail );
|
46 |
+
}
|
47 |
+
} else {
|
48 |
+
?>
|
49 |
+
<p><?php _e( "It seems that you have deleted the form of this entry.Entry not found in database!", UFBL_TD ); ?></p>
|
50 |
+
<?php
|
51 |
+
}
|
52 |
+
?>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
|
inc/views/backend/form-builder.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<?php
|
3 |
+
/**
|
4 |
+
* Always use self::load_view to load view inside a view
|
5 |
+
* Header view loaded
|
6 |
+
*/
|
7 |
+
$data['form_row'] = $form_row;
|
8 |
+
self::load_view( 'backend/header' );
|
9 |
+
?>
|
10 |
+
<div class="ufbl-shortcode-display-wrap">Shortcode: <input type="text" onfocus="this.select();" readonly="readonly" value="[ufbl form_id="<?php echo $_GET['form_id']?>"]" class="shortcode-in-list-table wp-ui-text-highlight code"></div>
|
11 |
+
<h2 class="nav-tab-wrapper">
|
12 |
+
<a href="javascript:void(0);" class="nav-tab nav-tab-active ufbl-tab-trigger" data-id="form-builder"><?php _e( 'Form Builder', UFBL_TD ); ?></a>
|
13 |
+
<a href="javascript:void(0);" class="nav-tab ufbl-tab-trigger" data-id="display"><?php _e( 'Display Settings', UFBL_TD ); ?></a>
|
14 |
+
<a href="javascript:void(0);" class="nav-tab ufbl-tab-trigger" data-id='email'><?php _e( 'Email Settings', UFBL_TD ); ?></a>
|
15 |
+
|
16 |
+
</h2>
|
17 |
+
<?php if ( isset( $_SESSION['ufbl_message'] ) ) { ?>
|
18 |
+
<div class="ufbl-message">
|
19 |
+
<p>
|
20 |
+
<?php
|
21 |
+
echo $_SESSION['ufbl_message'];
|
22 |
+
unset( $_SESSION['ufbl_message'] );
|
23 |
+
?>
|
24 |
+
</p>
|
25 |
+
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
|
26 |
+
</div>
|
27 |
+
<?php } ?>
|
28 |
+
<div class="ufbl-form-controls ufbl-text-align-right">
|
29 |
+
<input type="button" class="button-primary ufbl-save-form" value="<?php _e( 'Save Form', UFBL_TD ); ?>"/>
|
30 |
+
<a href="<?php echo site_url('?ufbl_form_preview=true&ufbl_form_id='.$form_row['form_id']);?>" target="_blank"><input type="button" class="button-primary" value="<?php _e( 'Preview', UFBL_TD ); ?>"/></a>
|
31 |
+
<div class="ufbl-field-note"><?php _e( 'Note: Please save form before preview.', UFBL_TD ); ?></div>
|
32 |
+
</div>
|
33 |
+
<div class="ufbl-clear"></div>
|
34 |
+
<div class="ufbl-tab-content-wrapper">
|
35 |
+
<!--form builder reference fields-->
|
36 |
+
<?php self::load_view( 'backend/boxes/form-fields-html' ); ?>
|
37 |
+
<!--form builder reference fields-->
|
38 |
+
|
39 |
+
<form class="ufbl-form" method="post" action="<?php echo admin_url( 'admin-post.php' ); ?>" data-changed="false">
|
40 |
+
<!--Form Builder Section -->
|
41 |
+
<?php self::load_view( 'backend/boxes/form-builder-main', $data ); ?>
|
42 |
+
<!--Form Builder Section -->
|
43 |
+
|
44 |
+
<!--Display Settings Section -->
|
45 |
+
<?php self::load_view( 'backend/boxes/display-settings', $data ); ?>
|
46 |
+
<!--Display Settings Section -->
|
47 |
+
|
48 |
+
<!--Email Settings Section -->
|
49 |
+
<?php self::load_view( 'backend/boxes/email-settings', $data ); ?>
|
50 |
+
<!--Email Settings Section -->
|
51 |
+
</form>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
|
inc/views/backend/form-entries-list.php
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<?php
|
3 |
+
/**
|
4 |
+
* Always use self::load_view to load view inside a view
|
5 |
+
* Header view loaded
|
6 |
+
*/
|
7 |
+
self::load_view( 'backend/header' );
|
8 |
+
?>
|
9 |
+
<div class="ufbl-entry-filter-wrap">
|
10 |
+
<h3><?php _e( 'Form Entries', UFBL_TD ); ?></h3>
|
11 |
+
|
12 |
+
<select class="ufbl-entry-filter-select" data-admin-url="<?php echo admin_url(); ?>">
|
13 |
+
<option value=""><?php _e( 'All Form entries', UFBL_TD ); ?></option>
|
14 |
+
<?php
|
15 |
+
$form_id = isset( $_GET['form_id'] ) ? $_GET['form_id'] : '';
|
16 |
+
if ( count( $form_rows ) > 0 ) {
|
17 |
+
foreach ( $form_rows as $form_row ) {
|
18 |
+
?>
|
19 |
+
<option value="<?php echo $form_row['form_id'] ?>" <?php selected( $form_id, $form_row['form_id'] ); ?>><?php echo $form_row['form_title']; ?></option>
|
20 |
+
<?php
|
21 |
+
}
|
22 |
+
}
|
23 |
+
?>
|
24 |
+
</select>
|
25 |
+
<?php $csv_nonce = wp_create_nonce( 'ufbl-csv-nonce' ); ?>
|
26 |
+
<?php if ( $form_id != '' ) { ?>
|
27 |
+
<a href="<?php echo admin_url( 'admin-post.php?action=ufbl_csv_export&form_id=' . $form_id . '&_wpnonce=' . $csv_nonce ); ?>"><input type="button" class="ufbl-csv-export-trigger" value="<?php _e( 'Export to CSV', UFBL_TD ); ?>" data-admin-url="<?php echo admin_url(); ?>" data-form-id="<?php echo $form_id; ?>"/></a>
|
28 |
+
<?php
|
29 |
+
}
|
30 |
+
|
31 |
+
$current_page = isset( $_GET['page_num'] ) ? $_GET['page_num'] : 1;
|
32 |
+
$upper_page_limit = $current_page + 2;
|
33 |
+
$upper_page_limit = ($upper_page_limit > $total_pages) ? $total_pages : $upper_page_limit;
|
34 |
+
$lower_page_limit = $current_page - 2;
|
35 |
+
$lower_page_limit = ($lower_page_limit <= 0) ? 1 : $lower_page_limit;
|
36 |
+
if ( $total_pages > 1 ) {
|
37 |
+
?>
|
38 |
+
<div class="ufbl-entries-pagination-outerwrap">
|
39 |
+
<div class="ufbl-entries-pagination-wrap">
|
40 |
+
<?php
|
41 |
+
$previous_page = $current_page - 1;
|
42 |
+
$next_page = $current_page + 1;
|
43 |
+
if ( $previous_page > 0 ) {
|
44 |
+
if ( isset( $_GET['form_id'] ) ) {
|
45 |
+
$page_link = admin_url( 'admin.php?page=ufbl-form-entries&form_id=' . $_GET['form_id'] . '&page_num=' . $previous_page );
|
46 |
+
} else {
|
47 |
+
$page_link = admin_url( 'admin.php?page=ufbl-form-entries&page_num=' . $previous_page );
|
48 |
+
}
|
49 |
+
?>
|
50 |
+
<a class="ufbl-entry-previous-page ufbl-entry-page-link" href="<?php echo $page_link; ?>"><?php _e( 'Previous', UFBL_TD ); ?></a>
|
51 |
+
<?php
|
52 |
+
}
|
53 |
+
for ( $page = $lower_page_limit; $page <= $upper_page_limit; $page++ ) {
|
54 |
+
if ( isset( $_GET['form_id'] ) ) {
|
55 |
+
$page_link = admin_url( 'admin.php?page=ufbl-form-entries&form_id=' . $_GET['form_id'] . '&page_num=' . $page );
|
56 |
+
} else {
|
57 |
+
$page_link = admin_url( 'admin.php?page=ufbl-form-entries&page_num=' . $page );
|
58 |
+
}
|
59 |
+
?>
|
60 |
+
<a href="<?php echo $page_link; ?>" class="ufbl-entry-page-link <?php echo ($current_page == $page) ? 'ufbl-entry-current-page' : ''; ?>"><?php echo $page; ?></a>
|
61 |
+
<?php
|
62 |
+
}
|
63 |
+
if ( $next_page <= $total_pages ) {
|
64 |
+
if ( isset( $_GET['form_id'] ) ) {
|
65 |
+
$page_link = admin_url( 'admin.php?page=ufbl-form-entries&form_id=' . $_GET['form_id'] . '&page_num=' . $next_page );
|
66 |
+
} else {
|
67 |
+
$page_link = admin_url( 'admin.php?page=ufbl-form-entries&page_num=' . $next_page );
|
68 |
+
}
|
69 |
+
?>
|
70 |
+
<a class="ufbl-entry-next-page ufbl-entry-page-link" href="<?php echo $page_link; ?>"><?php _e( 'Next', UFBL_TD ); ?></a>
|
71 |
+
<?php
|
72 |
+
}
|
73 |
+
?>
|
74 |
+
</div>
|
75 |
+
</div><?php
|
76 |
+
}
|
77 |
+
?>
|
78 |
+
</div>
|
79 |
+
<table class="wp-list-table widefat fixed posts">
|
80 |
+
<thead>
|
81 |
+
<tr>
|
82 |
+
<th scope="col" id="title" class="manage-column column-shortcode">
|
83 |
+
<?php _e( 'Form Title', UFBL_TD ); ?>
|
84 |
+
</th>
|
85 |
+
<th scope="col" id="shortcode" class="manage-column column-shortcode">
|
86 |
+
<?php _e( 'Entry Recieved', UFBL_TD ); ?>
|
87 |
+
</th>
|
88 |
+
|
89 |
+
</tr>
|
90 |
+
</thead>
|
91 |
+
<tfoot>
|
92 |
+
<tr>
|
93 |
+
<th scope="col" id="title" class="manage-column column-shortcode">
|
94 |
+
<?php _e( 'Form Title', UFBL_TD ); ?>
|
95 |
+
</th>
|
96 |
+
<th scope="col" id="shortcode" class="manage-column column-shortcode">
|
97 |
+
<?php _e( 'Entry Recieved', UFBL_TD ); ?>
|
98 |
+
</th>
|
99 |
+
|
100 |
+
</tr>
|
101 |
+
</tfoot>
|
102 |
+
|
103 |
+
<tbody id="the-list" data-wp-lists="list:post">
|
104 |
+
<?php
|
105 |
+
if ( count( $form_entry_rows ) > 0 ) {
|
106 |
+
$form_counter = 1;
|
107 |
+
foreach ( $form_entry_rows as $form_entry_row ) {
|
108 |
+
$delete_nonce = wp_create_nonce( 'ufbl-delete-nonce' );
|
109 |
+
$copy_nonce = wp_create_nonce( 'ufbl-copy-nonce' );
|
110 |
+
?>
|
111 |
+
<tr class="<?php if ( $form_counter % 2 != 0 ) { ?>alternate<?php } ?>">
|
112 |
+
<td class="title column-title">
|
113 |
+
<strong>
|
114 |
+
|
115 |
+
<a class="row-title" href="<?php echo admin_url('admin.php?page=ufbl&action=edit-form&form_id='.$form_entry_row['form_id']);?>" title="Edit" data-entry-id="<?php echo $form_entry_row['entry_id']; ?>" target="_blank">
|
116 |
+
<?php echo esc_attr( $form_entry_row['form_title'] ); ?>
|
117 |
+
</a>
|
118 |
+
|
119 |
+
</strong>
|
120 |
+
<div class="row-actions ufbl-relative">
|
121 |
+
<span class="delete ufbl-delete"><a href="javascript:void(0);">Delete</a> | </span>
|
122 |
+
<span class="ufbl-view-entry"><a href="javascript:void(0);" data-entry-id="<?php echo $form_entry_row['entry_id']; ?>"><?php _e( 'View Entry', UFBL_TD ); ?></a></span>
|
123 |
+
<div class="ufbl-delete-confirmation" style="display:none">
|
124 |
+
<p><?php _e( 'Are you sure you want to delete this entry?', UFBL_TD ); ?></p>
|
125 |
+
<input type="button" value="<?php _e( 'Yes', UFBL_TD ); ?>" data-entry-id="<?php echo $form_entry_row['entry_id']; ?>" class="ufbl-delete-yes ufbl-delete-entry-yes"/>
|
126 |
+
<input type="button" value="<?php _e( 'Cancel', UFBL_TD ); ?>" class="ufbl-delete-cancel"/>
|
127 |
+
<span class="ufbl-ajax-loader" style="display:none;"></span>
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
</td>
|
131 |
+
<td class="shortcode column-shortcode"><?php echo $form_entry_row['entry_created']; ?></td>
|
132 |
+
</tr>
|
133 |
+
<?php
|
134 |
+
$form_counter++;
|
135 |
+
}
|
136 |
+
} else {
|
137 |
+
?>
|
138 |
+
<tr><td colspan="2"><div class="ufbl-noresult"><?php _e( 'Entries not found for this form.', UFBL_TD ); ?></div></td></tr>
|
139 |
+
<?php
|
140 |
+
}
|
141 |
+
?>
|
142 |
+
</tbody>
|
143 |
+
</table>
|
144 |
+
|
145 |
+
</div>
|
146 |
+
<div class="ufbl-entry-overlay" style="display:none"></div>
|
147 |
+
<div class="ufbl-entry-wrap" style="display:none"><span class="ufbl-entry-ajax-loader"></span></div>
|
148 |
+
|
inc/views/backend/form-list.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
+
?>
|
4 |
+
<div class="wrap">
|
5 |
+
<?php
|
6 |
+
/**
|
7 |
+
* Always use self::load_view to load view inside a view
|
8 |
+
*/
|
9 |
+
self::load_view( 'backend/header' );
|
10 |
+
?>
|
11 |
+
|
12 |
+
|
13 |
+
<div class="ufbl-form-list">
|
14 |
+
<h2><?php _e( 'Forms', UFBL_TD ); ?><a href="javascript:void(0);" class="ufbl-add-form-trigger add-new-h2"><?php _e( 'Add New Form' ); ?></a></h2>
|
15 |
+
|
16 |
+
<table class="wp-list-table widefat fixed posts">
|
17 |
+
<thead>
|
18 |
+
<tr>
|
19 |
+
<th scope="col" id="title" class="manage-column column-shortcode">
|
20 |
+
<?php _e( 'Form Title', UFBL_TD ); ?>
|
21 |
+
</th>
|
22 |
+
<th scope="col" id="shortcode" class="manage-column column-shortcode">
|
23 |
+
<?php _e( 'Shortcode', UFBL_TD ); ?>
|
24 |
+
</th>
|
25 |
+
<th scope="col" id="last-modified" class="manage-column column-shortcode">
|
26 |
+
<?php _e( 'Last Modified', UFBL_TD ); ?>
|
27 |
+
</th>
|
28 |
+
<th scope="col" id="status" class="manage-column column-shortcode">
|
29 |
+
<?php _e( 'Status', UFBL_TD ); ?>
|
30 |
+
</th>
|
31 |
+
</tr>
|
32 |
+
</thead>
|
33 |
+
<tfoot>
|
34 |
+
<tr>
|
35 |
+
<th scope="col" id="title" class="manage-column column-shortcode" >
|
36 |
+
<span><?php _e( 'Form Title', UFBL_TD ); ?>
|
37 |
+
</th>
|
38 |
+
<th scope="col" id="shortcode" class="manage-column column-shortcode">
|
39 |
+
<?php _e( 'Shortcode', UFBL_TD ); ?>
|
40 |
+
</th>
|
41 |
+
<th scope="col" id="last-modified" class="manage-column column-shortcode">
|
42 |
+
<?php _e( 'Last Modified', UFBL_TD ); ?>
|
43 |
+
</th>
|
44 |
+
<th scope="col" id="status" class="manage-column column-shortcode">
|
45 |
+
<?php _e( 'Status', UFBL_TD ); ?>
|
46 |
+
</th>
|
47 |
+
</tr>
|
48 |
+
</tfoot>
|
49 |
+
<tbody id="the-list" data-wp-lists="list:post">
|
50 |
+
<?php
|
51 |
+
if ( count( $forms ) > 0 ) {
|
52 |
+
$form_counter = 1;
|
53 |
+
foreach ( $forms as $form ) {
|
54 |
+
$delete_nonce = wp_create_nonce( 'ufbl-delete-nonce' );
|
55 |
+
$copy_nonce = wp_create_nonce( 'ufbl-copy-nonce' );
|
56 |
+
?>
|
57 |
+
<tr class="<?php if ( $form_counter % 2 != 0 ) { ?>alternate<?php } ?>">
|
58 |
+
<td class="title column-title">
|
59 |
+
<strong>
|
60 |
+
<a class="row-title" href="<?php echo admin_url('admin.php?page=ufbl&action=edit-form&form_id=' . $form->form_id); ?>" title="Edit">
|
61 |
+
<?php echo esc_attr( $form->form_title ); ?>
|
62 |
+
</a>
|
63 |
+
</strong>
|
64 |
+
<div class="row-actions ufbl-relative">
|
65 |
+
<span class="edit"><a href="<?php echo admin_url() . 'admin.php?page=ufbl&action=edit-form&form_id=' . $form->form_id; ?>">Edit</a> | </span>
|
66 |
+
<span class="ufbl-copy" data-form-id="<?php echo $form->form_id; ?>"><a href="javascript:void(0);">Copy</a> | </span>
|
67 |
+
<span class="delete ufbl-delete"><a href="javascript:void(0);">Delete</a> | </span>
|
68 |
+
<span class="ufbl-preview"><a href="<?php echo site_url( '?ufbl_form_preview=true&ufbl_form_id=' . $form->form_id ); ?>" target="_blank"><?php _e( 'Preview', UFBL_TD ); ?></a> | </span>
|
69 |
+
<span class="ufbl-entries"><a href="<?php echo admin_url( 'admin.php?page=ufbl-form-entries&form_id=' . $form->form_id ); ?>"><?php _e( 'Entries', UFBL_TD ); ?></a></span>
|
70 |
+
<div class="ufbl-delete-confirmation" style="display:none">
|
71 |
+
<p><?php _e( 'Are you sure you want to delete this form?', UFBL_TD ); ?></p>
|
72 |
+
<input type="button" value="<?php _e( 'Yes', UFBL_TD ); ?>" data-form-id="<?php echo $form->form_id; ?>" class="ufbl-delete-yes ufbl-form-delete-yes"/>
|
73 |
+
<input type="button" value="<?php _e( 'Cancel', UFBL_TD ); ?>" data-form-id="<?php echo $form->form_id; ?>" class="ufbl-delete-cancel ufbl-form-cancel"/>
|
74 |
+
<span class="ufbl-ajax-loader" style="display:none;"></span>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
+
</td>
|
78 |
+
<td class="shortcode column-shortcode"><input type="text" onFocus="this.select();" readonly="readonly" value="[ufbl form_id="<?php echo $form->form_id; ?>"]" class="shortcode-in-list-table wp-ui-text-highlight code"></td>
|
79 |
+
<td class="shortcode column-shortcode"><?php echo $form->form_modified; ?></td>
|
80 |
+
<td class="shortcode column-shortcode ufbl-relative">
|
81 |
+
<div class="onoffswitch">
|
82 |
+
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch-<?php echo $form->form_id; ?>" <?php checked( $form->form_status, true ); ?> style="display:none;">
|
83 |
+
<label class="onoffswitch-label" for="myonoffswitch-<?php echo $form->form_id; ?>" data-form-id="<?php echo $form->form_id; ?>">
|
84 |
+
<span class="onoffswitch-inner"></span>
|
85 |
+
<span class="onoffswitch-switch"></span>
|
86 |
+
</label>
|
87 |
+
|
88 |
+
</div>
|
89 |
+
<span class="ufbl-ajax-loader ufbl-status-loader" style="display:none;"></span>
|
90 |
+
<span class="ufbl-status-message" style="display:none;"></span>
|
91 |
+
</td>
|
92 |
+
|
93 |
+
</tr>
|
94 |
+
<?php
|
95 |
+
$form_counter++;
|
96 |
+
}
|
97 |
+
} else {
|
98 |
+
?>
|
99 |
+
<tr><td colspan="4"><div class="ufbl-noresult"><?php _e( 'Forms not added yet', UFBL_TD ); ?></div></td></tr>
|
100 |
+
<?php
|
101 |
+
}
|
102 |
+
?>
|
103 |
+
</tbody>
|
104 |
+
</table>
|
105 |
+
|
106 |
+
</div>
|
107 |
+
</div>
|
108 |
+
<div class="ufbl-popup-wrap" style="display: none">
|
109 |
+
<div class="ufbl-overlay"></div>
|
110 |
+
<div class="ufbl-add-form-wrap">
|
111 |
+
<div class="ufbl-add-field-wrap">
|
112 |
+
<label><?php _e( 'Form Title', UFBL_TD ); ?></label>
|
113 |
+
<div class="ufbl-field"><input type="text" class="ufbl-form-title" placeholder="<?php _e( 'Contact Form', UFBL_TD ); ?>"/></div>
|
114 |
+
<div class="ufbl-field-note"><?php _e( 'Please enter the form title', UFBL_TD ); ?></div>
|
115 |
+
</div>
|
116 |
+
<div class="ufbl-add-field-wrap">
|
117 |
+
<input type="button" class="ufbl-form-add-btn button-primary" value="<?php _e( 'Add Form', UFBL_TD ); ?>"/><span class="ufbl-ajax-loader" style="display: none"></span><span class="ufbl-msg" style="display:none;"><?php _e( 'Form Created.Redirecting...' ); ?></span>
|
118 |
+
<div class="ufbl-add-error ufbl-error" style="display: none;"></div>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
</div>
|
122 |
+
<div class="ufbl-copy-popup-wrap" style="display: none">
|
123 |
+
<div class="ufbl-overlay"></div>
|
124 |
+
<div class="ufbl-add-form-wrap">
|
125 |
+
<div class="ufbl-add-field-wrap">
|
126 |
+
<label><?php _e( 'Copy Form Title', UFBL_TD ); ?></label>
|
127 |
+
<div class="ufbl-field"><input type="text" class="ufbl-form-title" placeholder="<?php _e( 'Contact Form', UFBL_TD ); ?>"/></div>
|
128 |
+
<div class="ufbl-field-note"><?php _e( 'Please enter the form title', UFBL_TD ); ?></div>
|
129 |
+
</div>
|
130 |
+
<div class="ufbl-add-field-wrap">
|
131 |
+
<div class="ufbl-field">
|
132 |
+
<select class="ufbl-copy-form-id"><?php foreach ( $forms as $form ) {
|
133 |
+
?>
|
134 |
+
<option value="<?php echo $form->form_id; ?>"><?php echo esc_attr( $form->form_title ); ?></option>
|
135 |
+
<?php
|
136 |
+
}
|
137 |
+
?></select>
|
138 |
+
</div>
|
139 |
+
<div class="ufbl-field-note"><?php _e( 'Please choose a form to copy.', UFBL_TD ); ?></div>
|
140 |
+
</div>
|
141 |
+
<div class="ufbl-add-field-wrap">
|
142 |
+
<input type="button" class="ufbl-form-copy-btn button-primary" value="<?php _e( 'Copy Form', UFBL_TD ); ?>"/><span class="ufbl-ajax-loader" style="display: none"></span><span class="ufbl-msg" style="display:none;"><?php _e( 'Form Copied.Redirecting...' ); ?></span>
|
143 |
+
<div class="ufbl-add-error ufbl-error" style="display: none;"></div>
|
144 |
+
</div>
|
145 |
+
</div>
|
146 |
+
</div>
|
inc/views/backend/header.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<div class="ufbl-header">
|
2 |
+
<h1>Ultimate Form Builder Lite</h1>
|
3 |
+
</div>
|
4 |
+
|
inc/views/backend/how-to-use.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<?php self::load_view( 'backend/header' ); ?>
|
3 |
+
<h3><?php _e( 'How to use', UFBL_TD ); ?></h3>
|
4 |
+
|
5 |
+
<div class="ufbl-content-wrap">
|
6 |
+
<div class="ufbl-content-section">
|
7 |
+
<h4 class="ufbl-content-title">New Form</h4>
|
8 |
+
<p>You can click on "New Form" sub menu to create a new form.Once you create a new form, you will be redirected to the main <strong>Form Builder</strong> page where you can add various fields to build the form.</p>
|
9 |
+
</div>
|
10 |
+
<div class="ufbl-content-section">
|
11 |
+
<h4 class="ufbl-content-title">Form Builder</h4>
|
12 |
+
<p>Currently, available fields are :</p>
|
13 |
+
<ul>
|
14 |
+
<li>Text Field</li>
|
15 |
+
<li>Textarea</li>
|
16 |
+
<li>Email</li>
|
17 |
+
<li>Dropdown</li>
|
18 |
+
<li>Checkbox</li>
|
19 |
+
<li>Password</li>
|
20 |
+
<li>Hidden Field</li>
|
21 |
+
<li>Number</li>
|
22 |
+
<li>Submit & Reset Button</li>
|
23 |
+
<li>Captcha</li>
|
24 |
+
</ul>
|
25 |
+
<p class="ufbl-field-note">Note: Please use only one Captcha Field in the form.Using multiple Captcha may create conflict in the form and may not work properly.</p>
|
26 |
+
</div>
|
27 |
+
<div class="ufbl-content-section">
|
28 |
+
<h4 class="ufbl-content-title">Display Settings</h4>
|
29 |
+
<p>In this tab you can configure all the necessary display and layout setting for the form.You can choose the pre designed templates for the form.Altogether there are 4 form templates including Default Template.</p>
|
30 |
+
<p>You can configure the <strong>Form Width</strong> in this section.Please provide the form width in % for the <strong>Mobile Device Compatibility</strong>.</p>
|
31 |
+
<p>You can also disable all the CSS styles provided the plugin so that you can custom design by simply checking "Disable Plugin Styles".</p>
|
32 |
+
</div>
|
33 |
+
<div class="ufbl-content-section">
|
34 |
+
<h4 class="ufbl-content-title">Email Settings</h4>
|
35 |
+
<p>You can configure all the email related settings from this section.You can add as many receiver's email address as you want from this section.You can also configure <strong>From Email</strong>, <strong>From Name</strong> & <strong>Email Subject</strong></p>
|
36 |
+
</div>
|
37 |
+
<div class="ufbl-content-section">
|
38 |
+
<h4 class="ufbl-content-title">Form Entries</h4>
|
39 |
+
<p>You can view all the form entries in the <strong>Form Entries</strong> section.You can filter the form entries as per the Forms and also export to <strong>CSV</strong> after the filter.</p>
|
40 |
+
</div>
|
41 |
+
<div class="ufbl-content-section">
|
42 |
+
<h4 class="ufbl-content-title">Shortcode</h4>
|
43 |
+
<p>As soon as you create a form you will be able to view the <strong>shortcode</strong> in the Form Builder page which you can paste in post or page content area to display the form in the frontend.</p>
|
44 |
+
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
|
inc/views/backend/new-form.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<?php self::load_view( 'backend/header' ); ?>
|
3 |
+
<h3><?php _e( 'New Form', UFBL_TD ); ?></h3>
|
4 |
+
<div class="ufbl-new-form-wrap">
|
5 |
+
<div class="ufbl-add-field-wrap">
|
6 |
+
<label><?php _e( 'Form Title', UFBL_TD ); ?></label>
|
7 |
+
<div class="ufbl-field"><input type="text" class="ufbl-form-title" placeholder="<?php _e( 'Contact Form', UFBL_TD ); ?>"></div>
|
8 |
+
<div class="ufbl-field-note"><?php _e( 'Please enter the form title', UFBL_TD ); ?></div>
|
9 |
+
</div>
|
10 |
+
<div class="ufbl-add-field-wrap ufbl-add-submit-wrap">
|
11 |
+
<input type="button" class="ufbl-form-add-btn button-primary" value="Add Form"><span class="ufbl-ajax-loader" style="display: none"></span><span class="ufbl-msg" style="display:none;">Form Created.Redirecting...</span>
|
12 |
+
<div class="ufbl-add-error ufbl-error" style="display: none;"></div>
|
13 |
+
</div>
|
14 |
+
</div>
|
15 |
+
|
16 |
+
</div>
|
17 |
+
|
inc/views/frontend/front-form.php
ADDED
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$form_detail = maybe_unserialize( $form_row['form_detail'] );
|
3 |
+
$form_design = $form_detail['form_design'];
|
4 |
+
$form_template_class = (!isset( $form_design['disable_plugin_style'] )) ? $form_design['form_template'] : 'ufbl-no-design-template';
|
5 |
+
$form_width = (isset( $form_design['form_width'] ) && $form_design['form_width'] != '') ? esc_attr( $form_design['form_width'] ) : '100%';
|
6 |
+
//self::print_array( $form_design );
|
7 |
+
?>
|
8 |
+
<div class="ufbl-form-wrapper <?php echo $form_template_class; ?>" style="width:<?php echo $form_width; ?>;">
|
9 |
+
<form method="post" action="" class="ufbl-front-form">
|
10 |
+
<?php if ( !isset( $form_design['hide_form_title'] ) ) { ?><div class="ufbl-form-title"><?php echo (isset( $form_row['form_title'] ) && $form_row['form_title'] != '') ? esc_attr( $form_row['form_title'] ) : __( 'Contact Form', UFBL_TD ); ?></div><?php } ?>
|
11 |
+
<?php do_action( 'ufbl_form_start' ); ?>
|
12 |
+
<input type="hidden" name="form_id" value="<?php echo $form_row['form_id']; ?>" class="form-id"/>
|
13 |
+
<?php
|
14 |
+
foreach ( $form_detail['field_data'] as $key => $val ) {
|
15 |
+
if ( isset( $val['field_type'] ) ) {
|
16 |
+
$class = (isset( $val['required'] ) && $val['required'] == 1) ? 'ufbl-required' : '';
|
17 |
+
switch ( $val['field_type'] ) {
|
18 |
+
case 'textfield':
|
19 |
+
?>
|
20 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
21 |
+
<label><?php echo esc_attr( $val['field_label'] ); ?></label>
|
22 |
+
<div class="ufbl-form-field">
|
23 |
+
<input type="text" name="<?php echo $key; ?>" class="ufbl-form-textfield <?php echo $class; ?>" data-max-chars="<?php echo esc_attr( $val['max_chars'] ); ?>" data-min-chars="<?php echo esc_attr( $val['min_chars'] ); ?>" data-error-message="<?php echo esc_attr( $val['error_message'] ); ?>" placeholder="<?php echo esc_attr( $val['placeholder'] ); ?>" value="<?php echo esc_attr( $val['pre_filled_value'] ); ?>"/>
|
24 |
+
<div class="ufbl-error" data-error-key="<?php echo $key; ?>"></div>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
<?php
|
28 |
+
break;
|
29 |
+
case 'textarea':
|
30 |
+
$rows = ($val['textarea_rows'] == '') ? 5 : $val['textarea_rows'];
|
31 |
+
$cols = ($val['textarea_columns'] == '') ? 10 : $val['textarea_columns'];
|
32 |
+
?>
|
33 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
34 |
+
<label><?php echo esc_attr( $val['field_label'] ); ?></label>
|
35 |
+
<div class="ufbl-form-field">
|
36 |
+
<textarea name="<?php echo $key; ?>" class="ufbl-form-textarea <?php echo $class; ?>" data-max-chars="<?php echo esc_attr( $val['max_chars'] ); ?>" data-min-chars="<?php echo esc_attr( $val['min_chars'] ); ?>" data-error-message="<?php echo esc_attr( $val['error_message'] ); ?>" rows="<?php echo $rows; ?>" cols="<?php echo $cols; ?>" placeholder="<?php echo $val['placeholder']; ?>"><?php echo esc_attr( $val['pre_filled_value'] ); ?></textarea>
|
37 |
+
<div class="ufbl-error" data-error-key="<?php echo $key; ?>"></div>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
<?php
|
41 |
+
break;
|
42 |
+
case 'email':
|
43 |
+
?>
|
44 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
45 |
+
<label><?php echo esc_attr( $val['field_label'] ); ?></label>
|
46 |
+
<div class="ufbl-form-field">
|
47 |
+
<input type="email" name="<?php echo $key; ?>" class="ufbl-email-field <?php echo $class; ?>" data-error-message="<?php esc_attr( $val['error_message'] ); ?>" placeholder="<?php echo esc_attr( $val['placeholder'] ); ?>" value="<?php echo esc_attr( $val['pre_filled_value'] ); ?>"/>
|
48 |
+
<div class="ufbl-error" data-error-key="<?php echo $key; ?>"></div>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
<?php
|
52 |
+
break;
|
53 |
+
case 'dropdown':
|
54 |
+
$multiple = (isset( $val['multiple'] ) && $val['multiple'] == 1) ? 'multiple' : '';
|
55 |
+
$name = (isset( $val['multiple'] ) && $val['multiple'] == 1) ? $key . '[]' : $key;
|
56 |
+
?>
|
57 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
58 |
+
<label><?php echo esc_attr( $val['field_label'] ); ?></label>
|
59 |
+
<div class="ufbl-form-field">
|
60 |
+
<select name="<?php echo $name; ?>" class="ufbl-form-dropdown <?php echo $class; ?>" <?php echo $multiple;?>>
|
61 |
+
<?php
|
62 |
+
if ( isset( $val['option'] ) && count( $val['option'] ) > 0 ) {
|
63 |
+
$count = 0;
|
64 |
+
foreach ( $val['option'] as $option ) {
|
65 |
+
?>
|
66 |
+
<option value="<?php echo $val['value'][$count] ?>"><?php echo $option; ?></option>
|
67 |
+
<?php
|
68 |
+
$count++;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
?>
|
72 |
+
</select>
|
73 |
+
|
74 |
+
<div class="ufbl-error" data-error-key="<?php echo $key; ?>"></div>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
+
<?php
|
78 |
+
break;
|
79 |
+
case 'radio':
|
80 |
+
?>
|
81 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
82 |
+
<label><?php echo esc_attr( $val['field_label'] ); ?></label>
|
83 |
+
<div class="ufbl-form-field">
|
84 |
+
<?php
|
85 |
+
if ( isset( $val['option'] ) && count( $val['option'] ) > 0 ) {
|
86 |
+
$count = 0;
|
87 |
+
foreach ( $val['option'] as $option ) {
|
88 |
+
$for_id = $form_row['form_id'] . '-' . $key . '-' . $count;
|
89 |
+
?>
|
90 |
+
<div class="ufbl-sub-field-wrap"><input type="radio" value="<?php echo $val['value'][$count] ?>" name="<?php echo $key ?>" class="ufbl-form-radio <?php echo $class; ?>" id="<?php echo $for_id; ?>"/><label for="<?php echo $for_id; ?>"><?php echo $option; ?></label></div>
|
91 |
+
<?php
|
92 |
+
$count++;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
?>
|
96 |
+
<div class="ufbl-error" data-error-key="<?php echo $key; ?>"></div>
|
97 |
+
</div>
|
98 |
+
</div>
|
99 |
+
<?php
|
100 |
+
break;
|
101 |
+
case 'checkbox':
|
102 |
+
?>
|
103 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
104 |
+
<label><?php echo esc_attr( $val['field_label'] ); ?></label>
|
105 |
+
<div class="ufbl-form-field">
|
106 |
+
<?php
|
107 |
+
if ( isset( $val['option'] ) && count( $val['option'] ) > 0 ) {
|
108 |
+
$count = 0;
|
109 |
+
foreach ( $val['option'] as $option ) {
|
110 |
+
$for_id = $form_row['form_id'] . '-' . $key . '-' . $count;
|
111 |
+
?>
|
112 |
+
<div class="ufbl-sub-field-wrap"><input type="checkbox" value="<?php echo $val['value'][$count] ?>" name="<?php echo $key ?>[]" class="ufbl-form-checkbox <?php echo $class; ?>" id="<?php echo $for_id; ?>"/><label for="<?php echo $for_id; ?>"><?php echo $option; ?></label></div>
|
113 |
+
<?php
|
114 |
+
$count++;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
?>
|
118 |
+
<div class="ufbl-error" data-error-key="<?php echo $key; ?>"></div>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
<?php
|
122 |
+
break;
|
123 |
+
case 'password':
|
124 |
+
?>
|
125 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
126 |
+
<label><?php echo esc_attr( $val['field_label'] ); ?></label>
|
127 |
+
<div class="ufbl-form-field">
|
128 |
+
<input type="password" name="<?php echo $key; ?>" class="ufbl-form-password <?php echo $class; ?>" data-max-chars="<?php echo esc_attr( $val['max_chars'] ); ?>" data-min-chars="<?php echo esc_attr( $val['min_chars'] ); ?>" data-error-message="<?php echo esc_attr( $val['error_message'] ); ?>" placeholder="<?php echo esc_attr( $val['placeholder'] ); ?>"/>
|
129 |
+
<div class="ufbl-error" data-error-key="<?php echo $key; ?>"></div>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
<?php
|
133 |
+
break;
|
134 |
+
case 'hidden':
|
135 |
+
?>
|
136 |
+
<input type="hidden" name="<?php echo $key ?>" value="<?php echo esc_attr( $val['pre_filled_value'] ); ?>" id="<?php echo esc_attr( $val['field_id'] ); ?>" class="<?php echo esc_attr( $val['field_class'] ); ?>"/>
|
137 |
+
<?php
|
138 |
+
break;
|
139 |
+
case 'number':
|
140 |
+
?>
|
141 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
142 |
+
<label><?php echo esc_attr( $val['field_label'] ); ?></label>
|
143 |
+
<div class="ufbl-form-field">
|
144 |
+
<input type="number" name="<?php echo $key; ?>" class="ufbl-number-field <?php echo $class; ?>" data-error-message="<?php echo esc_attr( $val['error_message'] ); ?>" placeholder="<?php echo esc_attr( $val['placeholder'] ); ?>" value="<?php echo esc_attr( $val['pre_filled_value'] ); ?>" data-max-chars="<?php echo esc_attr( $val['max_value'] ); ?>" data-min-chars="<?php echo esc_attr( $val['min_value'] ); ?>"/>
|
145 |
+
<div class="ufbl-error" data-error-key="<?php echo $key; ?>"></div>
|
146 |
+
</div>
|
147 |
+
</div>
|
148 |
+
<?php
|
149 |
+
break;
|
150 |
+
case 'submit':
|
151 |
+
?>
|
152 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
153 |
+
<div class="ufbl-form-field">
|
154 |
+
<input type="submit" class="ufbl-form-submit" name="<?php echo $key; ?>" value="<?php echo (isset( $val['button_label'] ) && $val['button_label'] != '') ? esc_attr( $val['button_label'] ) : __( 'Submit', UFBL_TD ); ?>"/>
|
155 |
+
<?php if(isset($val['show_reset_button'])){?>
|
156 |
+
<input type="reset" class="ufbl-form-reset" value="<?php echo (isset( $val['reset_label'] ) && $val['reset_label'] != '') ? esc_attr( $val['reset_label'] ) : __( 'Reset', UFBL_TD ); ?>"/>
|
157 |
+
<?php }?>
|
158 |
+
<span class="ufbl-form-loader" style="display:none"></span>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
<?php
|
162 |
+
break;
|
163 |
+
case 'captcha':
|
164 |
+
?>
|
165 |
+
<div class="ufbl-form-field-wrap <?php echo ($val['field_class'] != '') ? esc_attr( $val['field_class'] ) : ''; ?>" <?php echo ($val['field_id'] != '') ? 'id="' . esc_attr( $val['field_id'] ) . '"' : ''; ?>>
|
166 |
+
<label><?php echo esc_attr( $val['field_label'] ); ?></label>
|
167 |
+
<div class="ufbl-form-field">
|
168 |
+
<?php
|
169 |
+
if ( $val['captcha_type'] == 'mathematical' ) {
|
170 |
+
$num1 = rand( 0, 9 );
|
171 |
+
$num2 = rand( 0, 9 );
|
172 |
+
?>
|
173 |
+
<div class="ufbl-math-captcha-wrap">
|
174 |
+
<span class="ufbl-captcha-num"><?php echo $num1; ?></span> + <span><?php echo $num2; ?></span> = <input type="text" name="<?php echo $key; ?>" class="ufbl-math-captcha-ans" placeholder="<?php echo (isset( $val['placeholder'] ) && $val['placeholder'] != '') ? esc_attr( $val['placeholder'] ) : __( 'Enter Sum', UFBL_TD ); ?>"/>
|
175 |
+
<input type="hidden" name="<?php echo $key ?>_num_1" value="<?php echo $num1 ?>"/>
|
176 |
+
<input type="hidden" name="<?php echo $key ?>_num_2" value="<?php echo $num2 ?>"/>
|
177 |
+
</div>
|
178 |
+
<?php } else {
|
179 |
+
?>
|
180 |
+
<script src="https://www.google.com/recaptcha/api.js"></script>
|
181 |
+
<div class="g-recaptcha" data-sitekey="<?php echo esc_attr( $val['site_key'] ); ?>"></div>
|
182 |
+
<input type="hidden" name="<?php echo $key ?>"/>
|
183 |
+
<?php }
|
184 |
+
?>
|
185 |
+
|
186 |
+
<div class="ufbl-error" data-error-key="<?php echo $key; ?>"></div>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
<?php
|
190 |
+
break;
|
191 |
+
default:
|
192 |
+
break;
|
193 |
+
} //switch close
|
194 |
+
}//foreach close
|
195 |
+
}
|
196 |
+
?>
|
197 |
+
<div class="ufbl-form-message" style="display: none;"></div>
|
198 |
+
|
199 |
+
<?php do_action( 'ufbl_form_end' ); ?>
|
200 |
+
</form>
|
201 |
+
|
202 |
+
</div>
|
203 |
+
|
inc/views/frontend/preview-form.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html>
|
2 |
+
<head>
|
3 |
+
<title><?php _e( 'Form Preview', UFBL_TD ); ?></title>
|
4 |
+
<?php wp_head(); ?>
|
5 |
+
<style>
|
6 |
+
body:before{display:none !important;}
|
7 |
+
body:after{display:none !important;}
|
8 |
+
body{background:#F1F1F1 !important;}
|
9 |
+
</style>
|
10 |
+
|
11 |
+
</head>
|
12 |
+
<body>
|
13 |
+
<div class="ufbl-preview-title-wrap">
|
14 |
+
<div class="ufbl-preview-title"><?php _e( 'Preview Mode', UFBL_TD ); ?></div>
|
15 |
+
</div>
|
16 |
+
<div class="ufbl-preview-note"><?php _e( 'This is just the basic preview and it may look different when used in frontend as per your theme\'s styles.', UFBL_TD ); ?></div>
|
17 |
+
<div class="ufbl-form-preview-wrap">
|
18 |
+
<?php
|
19 |
+
$form_id = sanitize_text_field( $_GET['ufbl_form_id'] );
|
20 |
+
echo do_shortcode( '[ufbl form_id="' . $form_id . '"]' );
|
21 |
+
?>
|
22 |
+
</div>
|
23 |
+
|
24 |
+
</body>
|
25 |
+
|
26 |
+
</html>
|
27 |
+
|
js/backend.js
ADDED
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
/**
|
3 |
+
* Function to capture field type html
|
4 |
+
* @param {string} field_type
|
5 |
+
* @returns {string}
|
6 |
+
*/
|
7 |
+
function get_field_html(field_type) {
|
8 |
+
var form_key_count = $('.ufbl-form-key-count').val();
|
9 |
+
form_key_count++;
|
10 |
+
var field_key = 'ufbl_field_' + form_key_count;
|
11 |
+
$('.ufbl-form-key-count').val(form_key_count);
|
12 |
+
var html = $('.ufbl-' + field_type + '-reference').html();
|
13 |
+
$('.ufbl-form-temp-holder').html(html);
|
14 |
+
$('.ufbl-form-temp-holder input').each(function () {
|
15 |
+
var name_attr = $(this).attr('name');
|
16 |
+
if (name_attr) {
|
17 |
+
name_attr = name_attr.replace('ufbl_key', field_key);
|
18 |
+
$(this).attr('name', name_attr);
|
19 |
+
//alert(name_attr);
|
20 |
+
}
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
});
|
25 |
+
$('.ufbl-form-temp-holder select').each(function () {
|
26 |
+
var name_attr = $(this).attr('name');
|
27 |
+
if (name_attr) {
|
28 |
+
name_attr = name_attr.replace('ufbl_key', field_key);
|
29 |
+
$(this).attr('name', name_attr);
|
30 |
+
//alert(name_attr);
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
});
|
36 |
+
var html = $('.ufbl-form-temp-holder').html();
|
37 |
+
$('.ufbl-form-temp-holder').html('');
|
38 |
+
return html;
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
$(function () {
|
43 |
+
/**
|
44 |
+
* Add Form Popup Hide Show
|
45 |
+
*/
|
46 |
+
$('.ufbl-add-form-trigger').click(function () {
|
47 |
+
$('.ufbl-popup-wrap').fadeIn(400);
|
48 |
+
$('.ufbl-form-title').focus();
|
49 |
+
});
|
50 |
+
|
51 |
+
$('.ufbl-overlay').click(function () {
|
52 |
+
$('.ufbl-popup-wrap').fadeOut(200);
|
53 |
+
});
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Form ajax add
|
57 |
+
*/
|
58 |
+
$('.ufbl-form-add-btn').click(function () {
|
59 |
+
var selector = $(this);
|
60 |
+
$.ajax({
|
61 |
+
type: 'post',
|
62 |
+
url: ufbl_ajax_obj.ajax_url,
|
63 |
+
data: {_wpnonce: ufbl_ajax_obj.ajax_nonce,
|
64 |
+
action: 'add_form_action',
|
65 |
+
form_title: $('.ufbl-form-title').val()
|
66 |
+
},
|
67 |
+
beforeSend: function () {
|
68 |
+
selector.parent().find('.ufbl-ajax-loader').show();
|
69 |
+
},
|
70 |
+
success: function (res) {
|
71 |
+
$('.ufbl-ajax-loader').hide();
|
72 |
+
res = $.parseJSON(res);
|
73 |
+
if (res.success == 1) {
|
74 |
+
$('.ufbl-msg').show();
|
75 |
+
window.location = res.redirect_url;
|
76 |
+
return false;
|
77 |
+
} else {
|
78 |
+
$('.ufbl-add-error').html(res.error_msg).show();
|
79 |
+
}
|
80 |
+
|
81 |
+
}
|
82 |
+
});
|
83 |
+
});
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Form on and off toggle
|
87 |
+
*/
|
88 |
+
$('.onoffswitch-label').click(function () {
|
89 |
+
var selector = $(this);
|
90 |
+
var form_id = $(this).data('form-id');
|
91 |
+
if ($(this).parent().find('.onoffswitch-checkbox').is(':checked')) {
|
92 |
+
var status = 0;
|
93 |
+
} else {
|
94 |
+
var status = 1;
|
95 |
+
}
|
96 |
+
$.ajax({
|
97 |
+
type: 'post',
|
98 |
+
url: ufbl_ajax_obj.ajax_url,
|
99 |
+
data: {
|
100 |
+
_wpnonce: ufbl_ajax_obj.ajax_nonce,
|
101 |
+
status: status,
|
102 |
+
form_id: form_id,
|
103 |
+
action: 'ufbl_form_status_action'
|
104 |
+
},
|
105 |
+
beforeSend: function () {
|
106 |
+
selector.closest('.shortcode').find('.ufbl-ajax-loader').show();
|
107 |
+
},
|
108 |
+
success: function (res) {
|
109 |
+
selector.closest('.shortcode').find('.ufbl-ajax-loader').hide();
|
110 |
+
selector.closest('.shortcode').find('.ufbl-status-message').html(res).show().fadeOut(3500);
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
});
|
115 |
+
});
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Tabs Trigger show hide
|
119 |
+
*/
|
120 |
+
$('.ufbl-tab-trigger').click(function () {
|
121 |
+
var attr_id = $(this).data('id');
|
122 |
+
$('.ufbl-tab-trigger').removeClass('nav-tab-active');
|
123 |
+
$(this).addClass('nav-tab-active');
|
124 |
+
$('.ufbl-tab-content').hide();
|
125 |
+
$('#ufbl-' + attr_id + '-tab').show();
|
126 |
+
});
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Form Title edit trigger
|
130 |
+
*/
|
131 |
+
$('.ufbl-form-title').click(function () {
|
132 |
+
if ($('.ufbl-form-title #ufbl-form-title').length == 0) {
|
133 |
+
var form_title = $(this).html();
|
134 |
+
$(this).html('<input type="text" id="ufbl-form-title" value="' + form_title + '"/>');
|
135 |
+
$('.ufbl-form-title #ufbl-form-title').focus();
|
136 |
+
}
|
137 |
+
|
138 |
+
});
|
139 |
+
|
140 |
+
$('body').on('blur', '.ufbl-form-title #ufbl-form-title', function () {
|
141 |
+
var form_title = $(this).val();
|
142 |
+
form_title = (form_title == '') ? 'Untitled Form' : form_title;
|
143 |
+
$('.ufbl-form-title').html(form_title);
|
144 |
+
$('.ufbl-form-title-field').val(form_title);
|
145 |
+
});
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Form Builder functionality
|
149 |
+
*/
|
150 |
+
$('.ufbl-form-element').click(function () {
|
151 |
+
var field_type = $(this).data('field-type');
|
152 |
+
var field_html = get_field_html(field_type);
|
153 |
+
//field_html = '<div class="ufbl-each-form-field">' + field_html + '<div class="ufbl-field-controls"><a href="javascript:void(0)" class="ufbl-field-settings-trigger button-primary">Settings</a><a href="javascript:void(0)" class="ufbl-field-delete-trigger" onclick="return confirm(\'If you delete this element then data related with this element will also be deleted. Are you sure you want to delete this element?\')">Delete</a></div></div>';
|
154 |
+
$('.ufbl-form-field-holder').append(field_html);
|
155 |
+
|
156 |
+
});
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Form Element Delete
|
160 |
+
*/
|
161 |
+
$('body').on('click', '.ufbl-field-delete-trigger', function () {
|
162 |
+
if (confirm('If you delete this element then data related with this element will also be deleted. Are you sure you want to delete this element?')) {
|
163 |
+
$(this).closest('.ufbl-each-form-field').fadeOut(500, function () {
|
164 |
+
$(this).remove();
|
165 |
+
});
|
166 |
+
}
|
167 |
+
|
168 |
+
});
|
169 |
+
|
170 |
+
$('.ufbl-form-field-holder').sortable({
|
171 |
+
handle: '.ufbl-drag-arrow'
|
172 |
+
});
|
173 |
+
$('.ufbl-option-value-wrap').sortable({
|
174 |
+
containment: "parent",
|
175 |
+
handle: '.ufbl-option-drag-arrow'
|
176 |
+
});
|
177 |
+
|
178 |
+
$('body').on('click', '.ufbl-field-settings-trigger', function () {
|
179 |
+
if ($(this).next('span').html() == '+') {
|
180 |
+
var selector = $(this);
|
181 |
+
$(this).closest('.ufbl-each-form-field').find('.ufbl-field-settings-wrap').slideDown(500, function () {
|
182 |
+
|
183 |
+
selector.next('span').html('-');
|
184 |
+
});
|
185 |
+
} else {
|
186 |
+
var selector = $(this);
|
187 |
+
$(this).closest('.ufbl-each-form-field').find('.ufbl-field-settings-wrap').slideUp(500, function () {
|
188 |
+
selector.next('span').html('+');
|
189 |
+
|
190 |
+
});
|
191 |
+
}
|
192 |
+
|
193 |
+
});
|
194 |
+
|
195 |
+
$('body').on('keyup', '.ufbl-field-label-field', function () {
|
196 |
+
var label_text = $(this).val();
|
197 |
+
label_text = (label_text != '') ? label_text : 'Untitled Field';
|
198 |
+
$(this).closest('.ufbl-each-form-field').find('.ufbl-field-label-ref').html(label_text);
|
199 |
+
});
|
200 |
+
$('body').on('keyup', '.ufbl-submit-button', function () {
|
201 |
+
var label_text = $(this).val();
|
202 |
+
label_text = (label_text != '') ? label_text : 'Submit';
|
203 |
+
$(this).closest('.ufbl-each-form-field').find('.ufbl-submit-reference').val(label_text);
|
204 |
+
});
|
205 |
+
|
206 |
+
$('body').on('click', '.ufbl-option-remover', function () {
|
207 |
+
$(this).closest('.ufbl-each-option').fadeOut(500, function () {
|
208 |
+
$(this).remove();
|
209 |
+
});
|
210 |
+
});
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Add Option for radio button, checkbox, dropdown
|
214 |
+
*/
|
215 |
+
$('body').on('click', '.ufbl-option-value-adder', function () {
|
216 |
+
var html = $(this).closest('.ufbl-form-field').find('.ufbl-each-option').first().html();
|
217 |
+
html = '<div class="ufbl-each-option" style="display:none;">' + html + '</div>';
|
218 |
+
$(this).closest('.ufbl-form-field').find('.ufbl-option-value-wrap').append(html);
|
219 |
+
$(this).closest('.ufbl-form-field').find('.ufbl-option-value-wrap').find('.ufbl-each-option').last().find('input[type="text"]').val('');
|
220 |
+
$('.ufbl-each-option').show();
|
221 |
+
$(this).closest('.ufbl-form-field').find('.ufbl-option-value-wrap').find('.ufbl-each-option').last().find('input[type="text"]').first().focus();
|
222 |
+
});
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Form Post
|
228 |
+
*/
|
229 |
+
$('.ufbl-save-form').click(function () {
|
230 |
+
$('.ufbl-form').submit();
|
231 |
+
});
|
232 |
+
|
233 |
+
$('.ufbl-message button').click(function () {
|
234 |
+
$(this).parent().remove();
|
235 |
+
});
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Email Reciever add trigger
|
239 |
+
*/
|
240 |
+
$('.ufbl-email-adder').click(function () {
|
241 |
+
var html = '<div class="ufbl-email-fields"><input type="text" name="email_settings[email_reciever][]" placeholder="test@abc.com"/><span class="ufbl-email-remove">X</span></div>';
|
242 |
+
$(this).parent().append(html);
|
243 |
+
$('.ufbl-email-fields').last().find('input').focus();
|
244 |
+
});
|
245 |
+
|
246 |
+
$('body').on('click', '.ufbl-email-remove', function () {
|
247 |
+
$(this).parent().fadeOut(300, function () {
|
248 |
+
$(this).remove();
|
249 |
+
});
|
250 |
+
});
|
251 |
+
|
252 |
+
$('.ufbl-delete').click(function () {
|
253 |
+
$(this).parent().find('.ufbl-delete-confirmation').slideToggle(500);
|
254 |
+
});
|
255 |
+
$('.ufbl-delete-cancel').click(function () {
|
256 |
+
$(this).parent().slideUp(500);
|
257 |
+
});
|
258 |
+
|
259 |
+
/* $('.row-actions').mouseleave(function () {
|
260 |
+
$(this).find('.ufbl-delete-confirmation').slideUp(500);
|
261 |
+
});
|
262 |
+
*/
|
263 |
+
$('.ufbl-form-delete-yes').click(function () {
|
264 |
+
var form_id = $(this).data('form-id');
|
265 |
+
var selector = $(this);
|
266 |
+
$.ajax({
|
267 |
+
url: ufbl_ajax_obj.ajax_url,
|
268 |
+
type: 'post',
|
269 |
+
data: {
|
270 |
+
form_id: form_id,
|
271 |
+
_wpnonce: ufbl_ajax_obj.ajax_nonce,
|
272 |
+
action: 'ufbl_form_delete_action'
|
273 |
+
},
|
274 |
+
beforeSend: function () {
|
275 |
+
selector.parent().find('.ufbl-ajax-loader').show();
|
276 |
+
},
|
277 |
+
success: function (res) {
|
278 |
+
if (res == 'success') {
|
279 |
+
selector.closest('tr').fadeOut(500, function () {
|
280 |
+
$(this).remove();
|
281 |
+
});
|
282 |
+
console.log(res);
|
283 |
+
} else {
|
284 |
+
alert(res);
|
285 |
+
}
|
286 |
+
|
287 |
+
|
288 |
+
|
289 |
+
}
|
290 |
+
});
|
291 |
+
});
|
292 |
+
|
293 |
+
$('.ufbl-add-form-wrap .ufbl-form-title').keypress(function (e) {
|
294 |
+
if (e.which == 13) {
|
295 |
+
$(this).closest('.ufbl-add-form-wrap').find('.ufbl-form-add-btn').click();
|
296 |
+
}
|
297 |
+
});
|
298 |
+
$('.ufbl-new-form-wrap .ufbl-form-title').keypress(function (e) {
|
299 |
+
if (e.which == 13) {
|
300 |
+
$(this).closest('.ufbl-new-form-wrap').find('.ufbl-form-add-btn').click();
|
301 |
+
}
|
302 |
+
});
|
303 |
+
$('.ufbl-copy-popup-wrap .ufbl-form-title').keypress(function (e) {
|
304 |
+
if (e.which == 13) {
|
305 |
+
$(this).closest('.ufbl-add-form-wrap').find('.ufbl-form-copy-btn').click();
|
306 |
+
}
|
307 |
+
});
|
308 |
+
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Delete Entry
|
312 |
+
*/
|
313 |
+
$('.ufbl-delete-entry-yes').click(function () {
|
314 |
+
var entry_id = $(this).data('entry-id');
|
315 |
+
var selector = $(this);
|
316 |
+
$.ajax({
|
317 |
+
url: ufbl_ajax_obj.ajax_url,
|
318 |
+
type: 'post',
|
319 |
+
data: {
|
320 |
+
entry_id: entry_id,
|
321 |
+
_wpnonce: ufbl_ajax_obj.ajax_nonce,
|
322 |
+
action: 'ufbl_entry_delete_action'
|
323 |
+
},
|
324 |
+
beforeSend: function () {
|
325 |
+
selector.parent().find('.ufbl-ajax-loader').show();
|
326 |
+
},
|
327 |
+
success: function (res) {
|
328 |
+
selector.parent().find('.ufbl-ajax-loader').hide();
|
329 |
+
if (res == 'success') {
|
330 |
+
selector.closest('tr').fadeOut(500, function () {
|
331 |
+
$(this).remove();
|
332 |
+
});
|
333 |
+
console.log(res);
|
334 |
+
} else {
|
335 |
+
alert(res);
|
336 |
+
}
|
337 |
+
|
338 |
+
|
339 |
+
|
340 |
+
}
|
341 |
+
});
|
342 |
+
});
|
343 |
+
|
344 |
+
/**
|
345 |
+
* View Entry Popup
|
346 |
+
*/
|
347 |
+
$('.ufbl-view-entry > a').click(function () {
|
348 |
+
var entry_id = $(this).data('entry-id');
|
349 |
+
$.ajax({
|
350 |
+
url: ufbl_ajax_obj.ajax_url,
|
351 |
+
data: {
|
352 |
+
entry_id: entry_id,
|
353 |
+
_wpnonce: ufbl_ajax_obj.ajax_nonce,
|
354 |
+
action: 'ufbl_get_entry_detail_action'
|
355 |
+
},
|
356 |
+
type: 'post',
|
357 |
+
beforeSend: function () {
|
358 |
+
$('.ufbl-entry-overlay').fadeIn(300, function () {
|
359 |
+
$('.ufbl-entry-wrap').show();
|
360 |
+
});
|
361 |
+
},
|
362 |
+
success: function (res) {
|
363 |
+
height = $(window).height();
|
364 |
+
var entry_inner_wrap_height = 0.70 * height;
|
365 |
+
$('.ufbl-entry-wrap').html(res);
|
366 |
+
$('.ufbl-entry-wrap .ufbl-entry-inner-wrap').height(entry_inner_wrap_height);
|
367 |
+
}
|
368 |
+
});
|
369 |
+
|
370 |
+
});
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Entry Popup Close
|
374 |
+
*/
|
375 |
+
$('body').on('click', '.ufbl-entry-overlay,.ufbl-entry-detail-close', function () {
|
376 |
+
$('.ufbl-entry-overlay').fadeOut(300, function () {
|
377 |
+
$('.ufbl-entry-wrap').html('<span class="ufbl-entry-ajax-loader"></span>');
|
378 |
+
|
379 |
+
});
|
380 |
+
$('.ufbl-entry-wrap').fadeOut(300);
|
381 |
+
|
382 |
+
|
383 |
+
});
|
384 |
+
|
385 |
+
/**
|
386 |
+
* Entry Filter
|
387 |
+
*/
|
388 |
+
$('.ufbl-entry-filter-select').change(function () {
|
389 |
+
var form_id = $(this).val();
|
390 |
+
var admin_url = $(this).data('admin-url');
|
391 |
+
var redirect_url = (form_id == '') ? admin_url + 'admin.php?page=ufbl-form-entries' : admin_url + 'admin.php?page=ufbl-form-entries&form_id=' + form_id;
|
392 |
+
window.location = redirect_url;
|
393 |
+
return false;
|
394 |
+
});
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Form copy popup open
|
398 |
+
*/
|
399 |
+
$('body').on('click', '.ufbl-copy', function () {
|
400 |
+
var form_id = $(this).data('form-id');
|
401 |
+
$('.ufbl-copy-form-id option[value="' + form_id + '"]').attr('selected', 'selected');
|
402 |
+
$('.ufbl-copy-popup-wrap').fadeIn(300);
|
403 |
+
$('.ufbl-copy-popup-wrap .ufbl-form-title').focus();
|
404 |
+
});
|
405 |
+
|
406 |
+
$('.ufbl-overlay').click(function () {
|
407 |
+
$('.ufbl-copy-popup-wrap').fadeOut(300);
|
408 |
+
});
|
409 |
+
|
410 |
+
/**
|
411 |
+
* Form Copy
|
412 |
+
*/
|
413 |
+
$('.ufbl-form-copy-btn').click(function () {
|
414 |
+
var selector = $(this);
|
415 |
+
$.ajax({
|
416 |
+
type: 'post',
|
417 |
+
url: ufbl_ajax_obj.ajax_url,
|
418 |
+
data: {_wpnonce: ufbl_ajax_obj.ajax_nonce,
|
419 |
+
action: 'copy_form_action',
|
420 |
+
form_title: selector.closest('.ufbl-copy-popup-wrap').find('.ufbl-form-title').val(),
|
421 |
+
form_id: selector.closest('.ufbl-copy-popup-wrap').find('.ufbl-copy-form-id').val()
|
422 |
+
},
|
423 |
+
beforeSend: function () {
|
424 |
+
selector.closest('.ufbl-add-form-wrap').find('.ufbl-ajax-loader').show();
|
425 |
+
},
|
426 |
+
success: function (res) {
|
427 |
+
$('.ufbl-ajax-loader').hide();
|
428 |
+
res = $.parseJSON(res);
|
429 |
+
if (res.success == 1) {
|
430 |
+
$('.ufbl-msg').show();
|
431 |
+
window.location = res.redirect_url;
|
432 |
+
return false;
|
433 |
+
} else {
|
434 |
+
$('.ufbl-add-error').html(res.error_msg).show();
|
435 |
+
}
|
436 |
+
|
437 |
+
}
|
438 |
+
});
|
439 |
+
});
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Captcha Type Dropdown on Change
|
443 |
+
*/
|
444 |
+
$('body').on('change', '.ufbl-captcha-type-dropdown', function () {
|
445 |
+
var captcha_type = $(this).val();
|
446 |
+
if (captcha_type == 'google') {
|
447 |
+
$(this).closest('.ufbl-field-settings-wrap').find('.ufbl-captcha-field-ref').show();
|
448 |
+
} else {
|
449 |
+
$(this).closest('.ufbl-field-settings-wrap').find('.ufbl-captcha-field-ref').hide();
|
450 |
+
|
451 |
+
}
|
452 |
+
});
|
453 |
+
|
454 |
+
/**
|
455 |
+
* Backend template change
|
456 |
+
*/
|
457 |
+
$('.ufbl-form-template-dropdown').change(function () {
|
458 |
+
var template_name = $(this).val();
|
459 |
+
$('.ufbl-template-preview img').hide();
|
460 |
+
$('.ufbl-template-preview #preview-' + template_name).show();
|
461 |
+
});
|
462 |
+
|
463 |
+
/**
|
464 |
+
* Page Leave Message
|
465 |
+
*/
|
466 |
+
$(".ufbl-form :input").change(function () {
|
467 |
+
$('.ufbl-form').data("changed", true);
|
468 |
+
});
|
469 |
+
|
470 |
+
$(window).bind('beforeunload',function(){
|
471 |
+
if ($('.ufbl-form').data('changed') == true) {
|
472 |
+
|
473 |
+
return 'The changes you made will be lost if you navigate away from this page.';
|
474 |
+
}
|
475 |
+
})
|
476 |
+
|
477 |
+
$(".ufbl-form").submit(function () {
|
478 |
+
$(window).unbind("beforeunload");
|
479 |
+
});
|
480 |
+
|
481 |
+
|
482 |
+
});//document.ready close
|
483 |
+
}(jQuery));
|
484 |
+
|
js/frontend.js
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
|
3 |
+
function reset_form(selector) {
|
4 |
+
|
5 |
+
selector.find('input[type="text"]').val('');
|
6 |
+
selector.find('input[type="email"]').val('');
|
7 |
+
selector.find('input[type="password"]').val('');
|
8 |
+
selector.find('input[type="number"]').val('');
|
9 |
+
selector.find('textarea').val('');
|
10 |
+
selector.find('input[type="checkbox"]').removeAttr('checked');
|
11 |
+
selector.find('option').removeAttr('selected');
|
12 |
+
selector.find('.sbHolder > a:nth-child(2)').each(function () {
|
13 |
+
var replace_html = $(this).parent().find('ul > li > a').html();
|
14 |
+
$(this).html(replace_html);
|
15 |
+
});
|
16 |
+
if ($(selector).find('#g-recaptcha-response').length > 0) {
|
17 |
+
grecaptcha.reset();
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
$(function () {
|
22 |
+
$('.ufbl-front-form').submit(function (e) {
|
23 |
+
e.preventDefault();
|
24 |
+
var selector = $(this);
|
25 |
+
var form_data = selector.serializeArray();
|
26 |
+
var captchaResponse = $(this).find('#g-recaptcha-response').val();
|
27 |
+
$.ajax({
|
28 |
+
url: frontend_js_obj.ajax_url,
|
29 |
+
type: 'post',
|
30 |
+
data: {
|
31 |
+
_wpnonce: frontend_js_obj.ajax_nonce,
|
32 |
+
form_data: form_data,
|
33 |
+
captchaResponse: captchaResponse,
|
34 |
+
action: 'ufbl_front_form_action'
|
35 |
+
|
36 |
+
},
|
37 |
+
beforeSend: function () {
|
38 |
+
selector.find('.ufbl-form-loader').show();
|
39 |
+
selector.find('.ufbl-error').html('');
|
40 |
+
$('.ufbl-form-message').slideUp(300);
|
41 |
+
},
|
42 |
+
success: function (res) {
|
43 |
+
selector.find('.ufbl-form-loader').hide();
|
44 |
+
console.log(res);
|
45 |
+
res = $.parseJSON(res);
|
46 |
+
if (res.error_flag == 1) {
|
47 |
+
for (error_key in res.error_keys) {
|
48 |
+
selector.find('div[data-error-key="' + error_key + '"]').html(res.error_keys[error_key]);
|
49 |
+
}
|
50 |
+
selector.find('.ufbl-form-message').html(res.response_message).removeClass('ufbl-success-message').addClass('ufbl-error-message').slideDown(300);
|
51 |
+
if ($(selector).find('#g-recaptcha-response').length > 0) {
|
52 |
+
grecaptcha.reset();
|
53 |
+
}
|
54 |
+
} else {
|
55 |
+
selector.find('.ufbl-form-message').html(res.response_message).removeClass('ufbl-error-message').addClass('ufbl-success-message').slideDown(300);
|
56 |
+
selector.find('.ufbl-error').html('');
|
57 |
+
reset_form(selector);
|
58 |
+
|
59 |
+
}
|
60 |
+
}
|
61 |
+
});
|
62 |
+
|
63 |
+
});
|
64 |
+
|
65 |
+
$('.ufbl-front-form input[type="text"],.ufbl-front-form input[type="email"],.ufbl-front-form input[type="email"],.ufbl-front-form textarea,.ufbl-front-form input[type="password"]').keyup(function () {
|
66 |
+
$(this).next('.ufbl-error').html('');
|
67 |
+
});
|
68 |
+
$('.ufbl-front-form input[type="radio"],.ufbl-front-form input[type="checkbox"]').click(function () {
|
69 |
+
$(this).closest('.ufbl-form-field').find('.ufbl-error').html('');
|
70 |
+
});
|
71 |
+
$('.ufbl-front-form select').change(function () {
|
72 |
+
$(this).closest('.ufbl-form-field').find('.ufbl-error').html('');
|
73 |
+
});
|
74 |
+
|
75 |
+
$('.ufbl-math-captcha-ans').keyup(function () {
|
76 |
+
$(this).closest('.ufbl-form-field-wrap').find('.ufbl-error').html('');
|
77 |
+
});
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Custom dropdown
|
81 |
+
*/
|
82 |
+
$(".ufbl-template-1 .ufbl-form-dropdown,.ufbl-template-2 .ufbl-form-dropdown,.ufbl-template-3 .ufbl-form-dropdown,.ufbl-template-4 .ufbl-form-dropdown,.ufbl-template-5 .ufbl-form-dropdown").selectbox();
|
83 |
+
|
84 |
+
$('.ufbl-form-reset').click(function (e) {
|
85 |
+
//e.preventDefault();
|
86 |
+
var selector = $(this).closest('form');
|
87 |
+
reset_form(selector);
|
88 |
+
});
|
89 |
+
|
90 |
+
|
91 |
+
});//document.ready close
|
92 |
+
}(jQuery));
|
js/jquery.selectbox-0.2.min.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery Selectbox plugin 0.2
|
3 |
+
*
|
4 |
+
* Copyright 2011-2012, Dimitar Ivanov (http://www.bulgaria-web-developers.com/projects/javascript/selectbox/)
|
5 |
+
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
|
6 |
+
*
|
7 |
+
* Date: Tue Jul 17 19:58:36 2012 +0300
|
8 |
+
*/
|
9 |
+
(function($,undefined){var PROP_NAME="selectbox",FALSE=false,TRUE=true;function Selectbox(){this._state=[];this._defaults={classHolder:"sbHolder",classHolderDisabled:"sbHolderDisabled",classSelector:"sbSelector",classOptions:"sbOptions",classGroup:"sbGroup",classSub:"sbSub",classDisabled:"sbDisabled",classToggleOpen:"sbToggleOpen",classToggle:"sbToggle",classFocus:"sbFocus",speed:200,effect:"slide",onChange:null,onOpen:null,onClose:null}}$.extend(Selectbox.prototype,{_isOpenSelectbox:function(target){if(!target){return FALSE}var inst=this._getInst(target);return inst.isOpen},_isDisabledSelectbox:function(target){if(!target){return FALSE}var inst=this._getInst(target);return inst.isDisabled},_attachSelectbox:function(target,settings){if(this._getInst(target)){return FALSE}var $target=$(target),self=this,inst=self._newInst($target),sbHolder,sbSelector,sbToggle,sbOptions,s=FALSE,optGroup=$target.find("optgroup"),opts=$target.find("option"),olen=opts.length;$target.attr("sb",inst.uid);$.extend(inst.settings,self._defaults,settings);self._state[inst.uid]=FALSE;$target.hide();function closeOthers(){var key,sel,uid=this.attr("id").split("_")[1];for(key in self._state){if(key!==uid){if(self._state.hasOwnProperty(key)){sel=$("select[sb='"+key+"']")[0];if(sel){self._closeSelectbox(sel)}}}}}sbHolder=$("<div>",{id:"sbHolder_"+inst.uid,"class":inst.settings.classHolder,tabindex:$target.attr("tabindex")});sbSelector=$("<a>",{id:"sbSelector_"+inst.uid,href:"#","class":inst.settings.classSelector,click:function(e){e.preventDefault();closeOthers.apply($(this),[]);var uid=$(this).attr("id").split("_")[1];if(self._state[uid]){self._closeSelectbox(target)}else{self._openSelectbox(target)}}});sbToggle=$("<a>",{id:"sbToggle_"+inst.uid,href:"#","class":inst.settings.classToggle,click:function(e){e.preventDefault();closeOthers.apply($(this),[]);var uid=$(this).attr("id").split("_")[1];if(self._state[uid]){self._closeSelectbox(target)}else{self._openSelectbox(target)}}});sbToggle.appendTo(sbHolder);sbOptions=$("<ul>",{id:"sbOptions_"+inst.uid,"class":inst.settings.classOptions,css:{display:"none"}});$target.children().each(function(i){var that=$(this),li,config={};if(that.is("option")){getOptions(that)}else{if(that.is("optgroup")){li=$("<li>");$("<span>",{text:that.attr("label")}).addClass(inst.settings.classGroup).appendTo(li);li.appendTo(sbOptions);if(that.is(":disabled")){config.disabled=true}config.sub=true;getOptions(that.find("option"),config)}}});function getOptions(){var sub=arguments[1]&&arguments[1].sub?true:false,disabled=arguments[1]&&arguments[1].disabled?true:false;arguments[0].each(function(i){var that=$(this),li=$("<li>"),child;if(that.is(":selected")){sbSelector.text(that.text());s=TRUE}if(i===olen-1){li.addClass("last")}if(!that.is(":disabled")&&!disabled){child=$("<a>",{href:"#"+that.val(),rel:that.val()}).text(that.text()).bind("click.sb",function(e){if(e&&e.preventDefault){e.preventDefault()}var t=sbToggle,$this=$(this),uid=t.attr("id").split("_")[1];self._changeSelectbox(target,$this.attr("rel"),$this.text());self._closeSelectbox(target)}).bind("mouseover.sb",function(){var $this=$(this);$this.parent().siblings().find("a").removeClass(inst.settings.classFocus);$this.addClass(inst.settings.classFocus)}).bind("mouseout.sb",function(){$(this).removeClass(inst.settings.classFocus)});if(sub){child.addClass(inst.settings.classSub)}if(that.is(":selected")){child.addClass(inst.settings.classFocus)}child.appendTo(li)}else{child=$("<span>",{text:that.text()}).addClass(inst.settings.classDisabled);if(sub){child.addClass(inst.settings.classSub)}child.appendTo(li)}li.appendTo(sbOptions)})}if(!s){sbSelector.text(opts.first().text())}$.data(target,PROP_NAME,inst);sbHolder.data("uid",inst.uid).bind("keydown.sb",function(e){var key=e.charCode?e.charCode:e.keyCode?e.keyCode:0,$this=$(this),uid=$this.data("uid"),inst=$this.siblings("select[sb='"+uid+"']").data(PROP_NAME),trgt=$this.siblings(["select[sb='",uid,"']"].join("")).get(0),$f=$this.find("ul").find("a."+inst.settings.classFocus);switch(key){case 37:case 38:if($f.length>0){var $next;$("a",$this).removeClass(inst.settings.classFocus);$next=$f.parent().prevAll("li:has(a)").eq(0).find("a");if($next.length>0){$next.addClass(inst.settings.classFocus).focus();$("#sbSelector_"+uid).text($next.text())}}break;case 39:case 40:var $next;$("a",$this).removeClass(inst.settings.classFocus);if($f.length>0){$next=$f.parent().nextAll("li:has(a)").eq(0).find("a")}else{$next=$this.find("ul").find("a").eq(0)}if($next.length>0){$next.addClass(inst.settings.classFocus).focus();$("#sbSelector_"+uid).text($next.text())}break;case 13:if($f.length>0){self._changeSelectbox(trgt,$f.attr("rel"),$f.text())}self._closeSelectbox(trgt);break;case 9:if(trgt){var inst=self._getInst(trgt);if(inst){if($f.length>0){self._changeSelectbox(trgt,$f.attr("rel"),$f.text())}self._closeSelectbox(trgt)}}var i=parseInt($this.attr("tabindex"),10);if(!e.shiftKey){i++}else{i--}$("*[tabindex='"+i+"']").focus();break;case 27:self._closeSelectbox(trgt);break}e.stopPropagation();return false}).delegate("a","mouseover",function(e){$(this).addClass(inst.settings.classFocus)}).delegate("a","mouseout",function(e){$(this).removeClass(inst.settings.classFocus)});sbSelector.appendTo(sbHolder);sbOptions.appendTo(sbHolder);sbHolder.insertAfter($target);$("html").live("mousedown",function(e){e.stopPropagation();$("select").selectbox("close")});$([".",inst.settings.classHolder,", .",inst.settings.classSelector].join("")).mousedown(function(e){e.stopPropagation()})},_detachSelectbox:function(target){var inst=this._getInst(target);if(!inst){return FALSE}$("#sbHolder_"+inst.uid).remove();$.data(target,PROP_NAME,null);$(target).show()},_changeSelectbox:function(target,value,text){var onChange,inst=this._getInst(target);if(inst){onChange=this._get(inst,"onChange");$("#sbSelector_"+inst.uid).text(text)}value=value.replace(/\'/g,"\\'");$(target).find("option[value='"+value+"']").attr("selected",TRUE);if(inst&&onChange){onChange.apply((inst.input?inst.input[0]:null),[value,inst])}else{if(inst&&inst.input){inst.input.trigger("change")}}},_enableSelectbox:function(target){var inst=this._getInst(target);if(!inst||!inst.isDisabled){return FALSE}$("#sbHolder_"+inst.uid).removeClass(inst.settings.classHolderDisabled);inst.isDisabled=FALSE;$.data(target,PROP_NAME,inst)},_disableSelectbox:function(target){var inst=this._getInst(target);if(!inst||inst.isDisabled){return FALSE}$("#sbHolder_"+inst.uid).addClass(inst.settings.classHolderDisabled);inst.isDisabled=TRUE;$.data(target,PROP_NAME,inst)},_optionSelectbox:function(target,name,value){var inst=this._getInst(target);if(!inst){return FALSE}inst[name]=value;$.data(target,PROP_NAME,inst)},_openSelectbox:function(target){var inst=this._getInst(target);if(!inst||inst.isOpen||inst.isDisabled){return }var el=$("#sbOptions_"+inst.uid),viewportHeight=parseInt($(window).height(),10),offset=$("#sbHolder_"+inst.uid).offset(),scrollTop=$(window).scrollTop(),height=el.prev().height(),diff=viewportHeight-(offset.top-scrollTop)-height/2,onOpen=this._get(inst,"onOpen");el.css({top:height+"px",maxHeight:(diff-height)+"px"});inst.settings.effect==="fade"?el.fadeIn(inst.settings.speed):el.slideDown(inst.settings.speed);$("#sbToggle_"+inst.uid).addClass(inst.settings.classToggleOpen);this._state[inst.uid]=TRUE;inst.isOpen=TRUE;if(onOpen){onOpen.apply((inst.input?inst.input[0]:null),[inst])}$.data(target,PROP_NAME,inst)},_closeSelectbox:function(target){var inst=this._getInst(target);if(!inst||!inst.isOpen){return }var onClose=this._get(inst,"onClose");inst.settings.effect==="fade"?$("#sbOptions_"+inst.uid).fadeOut(inst.settings.speed):$("#sbOptions_"+inst.uid).slideUp(inst.settings.speed);$("#sbToggle_"+inst.uid).removeClass(inst.settings.classToggleOpen);this._state[inst.uid]=FALSE;inst.isOpen=FALSE;if(onClose){onClose.apply((inst.input?inst.input[0]:null),[inst])}$.data(target,PROP_NAME,inst)},_newInst:function(target){var id=target[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:id,input:target,uid:Math.floor(Math.random()*99999999),isOpen:FALSE,isDisabled:FALSE,settings:{}}},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this selectbox"}},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]}});$.fn.selectbox=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&options=="isDisabled"){return $.selectbox["_"+options+"Selectbox"].apply($.selectbox,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.selectbox["_"+options+"Selectbox"].apply($.selectbox,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.selectbox["_"+options+"Selectbox"].apply($.selectbox,[this].concat(otherArgs)):$.selectbox._attachSelectbox(this,options)})};$.selectbox=new Selectbox();$.selectbox.version="0.2"})(jQuery);
|
readme.txt
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Ultimate Form Builder Lite ===
|
2 |
+
Contributors: Access Keys
|
3 |
+
Tags: contact form, form builder, form, forms, contact forms, enquiry forms, form manager, email form, lead form, email, database store form, form entry, form entries, email forms
|
4 |
+
Donate link: http://accesspressthemes.com/donation/
|
5 |
+
Requires at least: 3.8
|
6 |
+
Tested up to: 4.3
|
7 |
+
Stable tag: 1.0.0
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Contact Forms | Subscription Forms | Enquiry/quote Forms - build any type of unlimited forms with ultimate form builder
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
<strong>Ultimate Form Builder Lite</strong> is a <strong>FREE WordPress Plugin</strong> which allows you to create various contact forms with drag and drop form builder. Its fun because - you can create, customize and build the beautiful forms for your site on your own, receive contact email on any desired email address and store the form entries in your database which can be exported to CSV for your use via plugin's backend.
|
16 |
+
|
17 |
+
<strong>You can select choose the layout of the form from 5 beautiful pre designed form templates.</strong>You can also preview the form before using it in the site.
|
18 |
+
|
19 |
+
= Features: =
|
20 |
+
|
21 |
+
* <strong>Unlimited Forms</strong>
|
22 |
+
* <strong>Pre Designed 5 Form Templates</strong>
|
23 |
+
* <strong>Available Fields</strong>
|
24 |
+
- Textfield
|
25 |
+
- Textarea
|
26 |
+
- Email
|
27 |
+
- Dropdown
|
28 |
+
- Radio Button
|
29 |
+
- Checkbox
|
30 |
+
- Password
|
31 |
+
- Number
|
32 |
+
- Captcha(Mathematical & Google Captcha)
|
33 |
+
- Submit & Reset button
|
34 |
+
* <strong>Drag and Drop Field Ordering</strong>
|
35 |
+
* <strong>Form Entries Store in Database</strong>
|
36 |
+
- List Form Entries in backend
|
37 |
+
- Filter form entries as per the forms
|
38 |
+
- Form Entries export to CSV
|
39 |
+
* <strong>Form Preview</strong>
|
40 |
+
* <strong>Fully Responsive - compatible with mobile devices</strong>
|
41 |
+
* <strong>User friendly and very interactive user interface</strong>
|
42 |
+
- Anyone can use it, its as easy as drag and drop.
|
43 |
+
* <strong>SPAM Prevention from inbuilt captcha system</strong>
|
44 |
+
* <strong>Support</strong>
|
45 |
+
- Dedicated email, forum support
|
46 |
+
* <strong>Free updates</strong>
|
47 |
+
- Get free updates for lifetime.
|
48 |
+
|
49 |
+
= Some Useful Links =
|
50 |
+
* <strong>Support Email</strong>: support@accesspressthemes.com
|
51 |
+
* <strong>Support Forum Link</strong>: http://accesspressthemes.com/support/
|
52 |
+
* <strong>Website Link</strong>: http://accesspressthemes.com/
|
53 |
+
* <strong>Youtube channel link</strong>: https://www.youtube.com/watch?v=TjZNcVG3fDE
|
54 |
+
* <strong>Facebook link</strong>: https://www.facebook.com/AccessPressThemes
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
For a easy installation guide checkout the Installation tab above.
|
59 |
+
|
60 |
+
For complete information and documentation regarding plugin,please visit below links.
|
61 |
+
|
62 |
+
[Plugin information](https://accesspressthemes.com/wordpress-plugins/ultimate-form-builder-lite/)
|
63 |
+
|
64 |
+
[Plugin Demo](http://demo.accesspressthemes.com/wordpress-plugins/ultimate-form-builder-lite/)
|
65 |
+
|
66 |
+
[Plugin Documentation](https://accesspressthemes.com/documentation/documentation-plugin-instruction-ultimate-form-builder-lite/)
|
67 |
+
|
68 |
+
== Installation ==
|
69 |
+
1. Unzip ultimate-form-builder-lite.zip
|
70 |
+
1. Upload all the files to the /wp-content/plugins/ultimate-form-builder-lite
|
71 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
72 |
+
1. For customizing the plugin's settings, click on Forms option menu in Wordpress left admin menu.
|
73 |
+
|
74 |
+
|
75 |
+
== Frequently Asked Questions ==
|
76 |
+
= What does this plugin do? =
|
77 |
+
This plugin provides the ability to create, customize and build the beautiful forms for your site on your own, receive contact email on any desired email address and store the form entries in your database which is listed in the backend for future references.
|
78 |
+
|
79 |
+
= Can I store form entries in my site's database? =
|
80 |
+
Our form stores all the received entries and lists in the plugin's form entries section in which you can filter the entries per form and export to CSV for further use.
|
81 |
+
|
82 |
+
= Where can I find the documentation for the plugin? =
|
83 |
+
Once you install the plugin , you can check some general documentation about how to use the plugin in the "How to use" page of the plugin. You can get the detailed documentation [here](https://accesspressthemes.com/documentation/documentation-plugin-instruction-ultimate-form-builder-lite/)
|
84 |
+
|
85 |
+
== Screenshots ==
|
86 |
+
1. Frontend Form Template 1
|
87 |
+
2. Frontend Form Template 2
|
88 |
+
3. Frontend Form Template 3
|
89 |
+
4. Frontend Form Template 4
|
90 |
+
5. Backend Form List
|
91 |
+
6. Backend Form Builder
|
92 |
+
7. Backend Display Settings
|
93 |
+
8. Backend Email Settings
|
94 |
+
9. Backend Form Entries
|
95 |
+
10. Backend Entry Detail
|
96 |
+
|
97 |
+
== Changelog ==
|
98 |
+
= 1.0.0 =
|
99 |
+
* Plugin submitted to http://wordpress.org for review and approval
|
100 |
+
* Plugin committed to http://wordpress.org plugin repository
|
101 |
+
|
102 |
+
== Upgrade Notice ==
|
103 |
+
There is an update available for the Ultimate Form Builder Lite .Please update to receive new updates and bug fixes.
|
ultimate-form-builder-lite.php
ADDED
@@ -0,0 +1,448 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
4 |
+
|
5 |
+
/*
|
6 |
+
Plugin Name: Ultimate Form Builder Lite
|
7 |
+
Plugin URI: https://accesspressthemes.com/wordpress-plugins/ultimate-form-builder-lite/
|
8 |
+
Description: A plugin to build any type of forms
|
9 |
+
Version: 1.0.0
|
10 |
+
Author: AccessPress Themes
|
11 |
+
Author URI: http://accesspressthemes.com
|
12 |
+
License: GPL2
|
13 |
+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
14 |
+
Domain Path: /languages
|
15 |
+
Text Domain: ufbl
|
16 |
+
*/
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Necessary Constants for plugin
|
20 |
+
*/
|
21 |
+
global $wpdb;
|
22 |
+
defined( 'UFBL_VERSION' ) or define( 'UFBL_VERSION', '1.0.0' ); //plugin version
|
23 |
+
defined( 'UFBL_SLUG' ) or define( 'UFBL_SLUG', 'ufbl' ); //plugin admin slug
|
24 |
+
defined( 'UFBL_TD' ) or define( 'UFBL_TD', 'ufbl' ); //plugin's text domain
|
25 |
+
defined( 'UFBL_IMG_DIR' ) or define( 'UFBL_IMG_DIR', plugin_dir_url( __FILE__ ) . 'images' ); //plugin image directory
|
26 |
+
defined( 'UFBL_JS_DIR' ) or define( 'UFBL_JS_DIR', plugin_dir_url( __FILE__ ) . 'js' ); //plugin js directory
|
27 |
+
defined( 'UFBL_CSS_DIR' ) or define( 'UFBL_CSS_DIR', plugin_dir_url( __FILE__ ) . 'css' ); // plugin css dir
|
28 |
+
defined( 'UFBL_PATH' ) or define( 'UFBL_PATH', plugin_dir_path( __FILE__ ) );
|
29 |
+
defined( 'UFBL_FORM_TABLE' ) or define( 'UFBL_FORM_TABLE', $wpdb->prefix . 'ufbl_forms' );
|
30 |
+
defined( 'UFBL_ENTRY_TABLE' ) or define( 'UFBL_ENTRY_TABLE', $wpdb->prefix . 'ufbl_entries' );
|
31 |
+
defined( 'UFBL_ENTRY_LIMIT' ) or define( 'UFBL_ENTRY_LIMIT', 10 );
|
32 |
+
|
33 |
+
require_once UFBL_PATH . 'classes/ufbl-lib.php';
|
34 |
+
require_once UFBL_PATH . 'classes/ufbl-model.php';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Plugin's main class
|
38 |
+
*/
|
39 |
+
if ( !class_exists( 'UFBL_Class' ) ) {
|
40 |
+
|
41 |
+
class UFBL_Class {
|
42 |
+
|
43 |
+
var $library;
|
44 |
+
var $model;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Plugin initialization hooks
|
48 |
+
*/
|
49 |
+
function __construct() {
|
50 |
+
$this->library = new UFBL_Lib();
|
51 |
+
$this->model = new UFBL_Model();
|
52 |
+
add_action( 'init', array( $this, 'ufbl_init' ) ); //executes when init hook is fired
|
53 |
+
add_action( 'admin_menu', array( $this, 'ufbl_menu' ) ); //adds plugin menu in wordpress backend
|
54 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_assets' ) ); //registers admin assets
|
55 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_assets' ) ); //registers admin assets
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Form Add Action
|
59 |
+
*/
|
60 |
+
add_action( 'wp_ajax_add_form_action', array( $this, 'add_form_ajax' ) ); //add form ajax action
|
61 |
+
add_action( 'wp_ajax_nopriv_add_form_action', array( $this, 'no_permission' ) ); //preventing unauthorized ajax call
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Form Copy Action
|
65 |
+
*/
|
66 |
+
add_action( 'wp_ajax_copy_form_action', array( $this, 'copy_form_ajax' ) ); //copy form ajax action
|
67 |
+
add_action( 'wp_ajax_nopriv_copy_form_action', array( $this, 'no_permission' ) ); //preventing unauthorized ajax call
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Front Form Action
|
71 |
+
*/
|
72 |
+
add_action( 'wp_ajax_ufbl_front_form_action', array( $this, 'front_form_action' ) ); //add form ajax action
|
73 |
+
add_action( 'wp_ajax_nopriv_ufbl_front_form_action', array( $this, 'front_form_action' ) ); //preventing unauthorized ajax call
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Form Status Action
|
77 |
+
*/
|
78 |
+
add_action( 'wp_ajax_ufbl_form_status_action', array( $this, 'form_status_action' ) ); //add form ajax action
|
79 |
+
add_action( 'wp_ajax_nopriv_ufbl_form_status_action', array( $this, 'no_permission' ) ); //preventing unauthorized ajax call
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Form Delete Action
|
83 |
+
*/
|
84 |
+
add_action( 'wp_ajax_ufbl_form_delete_action', array( $this, 'form_delete_action' ) ); //form delete ajax action
|
85 |
+
add_action( 'wp_ajax_nopriv_ufbl_form_delete_action', array( $this, 'no_permission' ) ); //preventing unauthorized ajax call
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Entry Delete Action
|
89 |
+
*/
|
90 |
+
add_action( 'wp_ajax_ufbl_entry_delete_action', array( $this, 'entry_delete_action' ) ); //entry delete ajax action
|
91 |
+
add_action( 'wp_ajax_nopriv_ufbl_form_delete_action', array( $this, 'no_permission' ) ); //preventing unauthorized ajax call
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Entry Detail Action
|
95 |
+
*/
|
96 |
+
add_action( 'wp_ajax_ufbl_get_entry_detail_action', array( $this, 'get_entry_detail_action' ) ); //entry detail ajax action
|
97 |
+
add_action( 'wp_ajax_nopriv_ufbl_get_entry_detail_action', array( $this, 'no_permission' ) ); //preventing unauthorized ajax call
|
98 |
+
|
99 |
+
register_activation_hook( __FILE__, array( $this, 'activate_plugin' ) ); //executes when plugin is activated
|
100 |
+
add_action( 'admin_post_ufbl_form_action', array( $this, 'ufbl_form_action' ) ); //form action
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Form Shortcode
|
104 |
+
*/
|
105 |
+
add_shortcode( 'ufbl', array( $this, 'shortcode_manager' ) );
|
106 |
+
|
107 |
+
/**
|
108 |
+
* CSV Export Action
|
109 |
+
*/
|
110 |
+
add_action( 'admin_post_ufbl_csv_export', array( $this, 'export_csv' ) );
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Form Preview
|
114 |
+
*/
|
115 |
+
add_action( 'template_redirect', array( $this, 'preview_form' ) );
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Tasks to be done in init hook
|
120 |
+
* Loads plugin for translation
|
121 |
+
* Starts session
|
122 |
+
*/
|
123 |
+
function ufbl_init() {
|
124 |
+
load_plugin_textdomain( UFBL_TD, false, basename( dirname( __FILE__ ) ) . '/languages' ); //Loads plugin text domain for the translation
|
125 |
+
if ( !session_id() && !headers_sent() ) {
|
126 |
+
session_start(); //starts session if already not started
|
127 |
+
}
|
128 |
+
do_action( 'ufbl_init' );
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Adds Plugin menu in wordpress backend
|
133 |
+
*/
|
134 |
+
function ufbl_menu() {
|
135 |
+
add_menu_page( __( 'Forms', UFBL_TD ), __( 'Forms', UFBL_TD ), 'manage_options', UFBL_SLUG, array( $this, 'forms_list' ),'dashicons-welcome-widgets-menus',35.7 );
|
136 |
+
add_submenu_page( UFBL_SLUG, isset( $_GET['form_id'] ) ? __( 'Edit Form', UFBL_TD ) : __( 'All Forms', UFBL_TD ), __( 'All Forms', UFBL_TD ), 'manage_options', UFBL_SLUG, array( $this, 'forms_list' ) );
|
137 |
+
add_submenu_page( UFBL_SLUG, __( 'New Form', UFBL_TD ), __( 'New Form', UFBL_TD ), 'manage_options', 'ufbl-new-form', array( $this, 'add_new_form' ) );
|
138 |
+
add_submenu_page( UFBL_SLUG, __( 'Form Entries', UFBL_TD ), __( 'Form Entries', UFBL_TD ), 'manage_options', 'ufbl-form-entries', array( $this, 'forms_entries' ) );
|
139 |
+
add_submenu_page( UFBL_SLUG, __( 'How to use', UFBL_TD ), __( 'How to use', UFBL_TD ), 'manage_options', 'ufbl-how-to-use', array( $this, 'how_to_use' ) );
|
140 |
+
add_submenu_page( UFBL_SLUG, __( 'About', UFBL_TD ), __( 'About', UFBL_TD ), 'manage_options', 'ufbl-about', array( $this, 'about' ) );
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Forms Listing
|
145 |
+
*/
|
146 |
+
function forms_list() {
|
147 |
+
if ( isset( $_GET['action'], $_GET['form_id'] ) && $_GET['action'] == 'edit-form' ) {
|
148 |
+
$form_id = sanitize_text_field( $_GET['form_id'] );
|
149 |
+
$data['form_row'] = $this->model->get_form_detail( $form_id );
|
150 |
+
if ( $data['form_row'] != null ) {
|
151 |
+
$this->library->load_view( 'backend/form-builder', $data );
|
152 |
+
} else {
|
153 |
+
die( __( 'No form found for this form id.Please go back and create a new form.', UFBL_TD ) );
|
154 |
+
}
|
155 |
+
} else {
|
156 |
+
$forms = $this->model->get_all_forms();
|
157 |
+
$data['forms'] = $forms;
|
158 |
+
$this->library->load_view( 'backend/form-list', $data );
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Forms Builder
|
164 |
+
*/
|
165 |
+
function forms_builder() {
|
166 |
+
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Plugin on activation tasks
|
171 |
+
*/
|
172 |
+
function activate_plugin() {
|
173 |
+
$this->library->load_core( 'activation' );
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Registers admin assets
|
178 |
+
*/
|
179 |
+
function register_admin_assets() {
|
180 |
+
$plugin_pages = array( UFBL_SLUG, 'ufbl-new-form', 'ufbl-form-entries', 'ufbl-how-to-use', 'ufbl-about' );
|
181 |
+
$admin_ajax_nonce = wp_create_nonce( 'ufbl-admin-ajax-nonce' );
|
182 |
+
$admin_ajax_object = array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'ajax_nonce' => $admin_ajax_nonce );
|
183 |
+
if ( isset( $_GET['page'] ) && in_array( $_GET['page'], $plugin_pages ) ) {
|
184 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
185 |
+
wp_enqueue_style( 'ufbl-admin', UFBL_CSS_DIR . '/backend.css', array(), UFBL_VERSION );
|
186 |
+
wp_enqueue_style( 'ufbl-font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', array(), UFBL_VERSION );
|
187 |
+
wp_enqueue_script( 'ufbl-admin-js', UFBL_JS_DIR . '/backend.js', array( 'jquery', 'jquery-ui-sortable' ), UFBL_VERSION );
|
188 |
+
wp_localize_script( 'ufbl-admin-js', 'ufbl_ajax_obj', $admin_ajax_object );
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Registers front assets
|
194 |
+
*/
|
195 |
+
function register_frontend_assets() {
|
196 |
+
wp_enqueue_style( 'ufbl-custom-select-css', UFBL_CSS_DIR . '/jquery.selectbox.css', array(), UFBL_VERSION );
|
197 |
+
wp_enqueue_style( 'ufbl-front-css', UFBL_CSS_DIR . '/frontend.css', array(), UFBL_VERSION );
|
198 |
+
wp_enqueue_script( 'ufbl-custom-select-js', UFBL_JS_DIR . '/jquery.selectbox-0.2.min.js', array( 'jquery' ), UFBL_VERSION );
|
199 |
+
wp_enqueue_script( 'ufbl-front-js', UFBL_JS_DIR . '/frontend.js', array( 'jquery','ufbl-custom-select-js' ), UFBL_VERSION );
|
200 |
+
$frontend_js_obj = array(
|
201 |
+
'default_error_message' => __( 'This field is required', UFBL_TD ),
|
202 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
203 |
+
'ajax_nonce' => wp_create_nonce( 'frontend-ajax-nonce' )
|
204 |
+
);
|
205 |
+
wp_localize_script( 'ufbl-front-js', 'frontend_js_obj', $frontend_js_obj );
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Unauthorized ajax call
|
210 |
+
*/
|
211 |
+
function no_permission() {
|
212 |
+
die( 'No script kiddies please!' );
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Add New Form
|
217 |
+
*/
|
218 |
+
function add_new_form(){
|
219 |
+
$this->library->load_view('backend/new-form');
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* Add Form Ajax Action
|
224 |
+
*/
|
225 |
+
function add_form_ajax() {
|
226 |
+
if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'ufbl-admin-ajax-nonce' ) ) {
|
227 |
+
$this->model->add_form();
|
228 |
+
} else {
|
229 |
+
die( 'No script kiddies please' );
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Form status change action
|
235 |
+
*/
|
236 |
+
function form_status_action() {
|
237 |
+
if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'ufbl-admin-ajax-nonce' ) ) {
|
238 |
+
$this->model->change_form_status();
|
239 |
+
} else {
|
240 |
+
die( 'No script kiddies please' );
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Form Save Action
|
246 |
+
*/
|
247 |
+
function form_save_action() {
|
248 |
+
if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'ufbl-admin-ajax-nonce' ) ) {
|
249 |
+
$this->model->save_form();
|
250 |
+
} else {
|
251 |
+
die( 'No script kiddies please' );
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Form Delete Action
|
257 |
+
*/
|
258 |
+
function form_delete_action() {
|
259 |
+
if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'ufbl-admin-ajax-nonce' ) ) {
|
260 |
+
$this->model->delete_form();
|
261 |
+
} else {
|
262 |
+
die( 'No script kiddies please' );
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* UFBL Form Save Action
|
268 |
+
*/
|
269 |
+
function ufbl_form_action() {
|
270 |
+
if ( isset( $_POST['ufbl_form_nonce_field'] ) && wp_verify_nonce( $_POST['ufbl_form_nonce_field'], 'ufbl-form-nonce' ) ) {
|
271 |
+
$this->model->save_form();
|
272 |
+
} else {
|
273 |
+
die( 'No script kiddies please' );
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Form Entries Page
|
279 |
+
*/
|
280 |
+
function forms_entries() {
|
281 |
+
$form_rows = $this->model->get_forms();
|
282 |
+
$data['form_rows'] = $form_rows;
|
283 |
+
$page = isset($_GET['page_num'])?$_GET['page_num']:1;
|
284 |
+
$limit = UFBL_ENTRY_LIMIT;
|
285 |
+
$offset = ($page-1)*$limit;
|
286 |
+
if ( isset( $_GET['form_id'] ) ) {
|
287 |
+
$form_id = sanitize_text_field( $_GET['form_id'] );
|
288 |
+
$form_entries_row = $this->model->get_forms_entries( $form_id,$limit,$offset );
|
289 |
+
$total_form_entries = $this->model->get_total_form_entries($form_id);
|
290 |
+
} else {
|
291 |
+
$form_entries_row = $this->model->get_forms_entries(NULL,$limit,$offset);
|
292 |
+
$total_form_entries = $this->model->get_total_form_entries();
|
293 |
+
}
|
294 |
+
$total_pages = $total_form_entries/$limit;
|
295 |
+
if($total_form_entries%$limit!=0){
|
296 |
+
$total_pages = intval($total_pages)+1;
|
297 |
+
}
|
298 |
+
$data['form_entry_rows'] = $form_entries_row;
|
299 |
+
$data['total_pages'] = $total_pages;
|
300 |
+
$this->library->load_view( 'backend/form-entries-list', $data );
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Form Shortcode
|
305 |
+
*/
|
306 |
+
function shortcode_manager( $atts = array() ) {
|
307 |
+
if ( isset( $atts['form_id'] ) ) {
|
308 |
+
$form_id = $atts['form_id'];
|
309 |
+
$form_row = $this->model->get_form_row( $form_id );
|
310 |
+
if ( $form_row != '' ) {
|
311 |
+
if ( $form_row['form_status'] == 1 ) {
|
312 |
+
|
313 |
+
$form_html = $this->generate_form( $form_row );
|
314 |
+
} else {
|
315 |
+
$close_message = isset( $atts['close_message'] ) ? $atts['close_message'] : __( 'This form is closed', UFBL_TD );
|
316 |
+
$form_html = '<p>' . $close_message . '</p>';
|
317 |
+
}
|
318 |
+
} else {
|
319 |
+
$form_html = '<p>' . __( 'Form couldn\'t be found for id ', UFBL_TD ) . $form_id . '</p>';
|
320 |
+
}
|
321 |
+
|
322 |
+
|
323 |
+
return $form_html;
|
324 |
+
} else {
|
325 |
+
return __( 'Form ID missing', UFBL_TD );
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
+
/**
|
330 |
+
* Form HTML
|
331 |
+
*
|
332 |
+
*/
|
333 |
+
function generate_form( $form_row ) {
|
334 |
+
$data['form_row'] = $form_row;
|
335 |
+
ob_start();
|
336 |
+
$this->library->load_view( 'frontend/front-form', $data );
|
337 |
+
$form_html = ob_get_contents();
|
338 |
+
ob_clean();
|
339 |
+
return $form_html;
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Front Form Action
|
344 |
+
*/
|
345 |
+
function front_form_action() {
|
346 |
+
if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'frontend-ajax-nonce' ) ) {
|
347 |
+
//$this->library->print_array( $_POST );
|
348 |
+
$this->library->do_form_process();
|
349 |
+
do_action( 'ufbl_front_form_action' );
|
350 |
+
die();
|
351 |
+
} else {
|
352 |
+
die( 'No script kiddies please!' );
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Entry Delete Action
|
358 |
+
*/
|
359 |
+
function entry_delete_action() {
|
360 |
+
if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'ufbl-admin-ajax-nonce' ) ) {
|
361 |
+
//$this->library->print_array($_POST);die();
|
362 |
+
$entry_id = sanitize_text_field( $_POST['entry_id'] );
|
363 |
+
$delete = $this->model->delete_entry( $entry_id );
|
364 |
+
} else {
|
365 |
+
die( 'No script kiddies please!' );
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Get Entry Detail Action
|
371 |
+
*/
|
372 |
+
function get_entry_detail_action() {
|
373 |
+
if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'ufbl-admin-ajax-nonce' ) ) {
|
374 |
+
//$this->library->print_array($_POST);die();
|
375 |
+
$entry_id = sanitize_text_field( $_POST['entry_id'] );
|
376 |
+
$entry_row = $this->model->get_entry_detail( $entry_id );
|
377 |
+
$data['entry_row'] = $entry_row;
|
378 |
+
$this->library->load_view( 'backend/entry-detail', $data );
|
379 |
+
die();
|
380 |
+
} else {
|
381 |
+
die( 'No script kiddies please!' );
|
382 |
+
}
|
383 |
+
}
|
384 |
+
|
385 |
+
/**
|
386 |
+
* Exports File to CSV
|
387 |
+
*/
|
388 |
+
function export_csv() {
|
389 |
+
if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'ufbl-csv-nonce' ) ) {
|
390 |
+
if ( isset( $_GET['form_id'] ) ) {
|
391 |
+
$form_id = sanitize_text_field( $_GET['form_id'] );
|
392 |
+
$form_data = $this->model->get_form_data( $form_id );
|
393 |
+
$entry_rows = $this->model->get_forms_entries( $form_id );
|
394 |
+
$this->library->generate_csv( $form_data, $entry_rows );
|
395 |
+
} else {
|
396 |
+
wp_redirect( admin_url( 'admin.php?page=ufbl-form-entries' ) );
|
397 |
+
exit;
|
398 |
+
}
|
399 |
+
} else {
|
400 |
+
die( 'No script kiddies please!!' );
|
401 |
+
}
|
402 |
+
}
|
403 |
+
|
404 |
+
/**
|
405 |
+
* Form copy action
|
406 |
+
*/
|
407 |
+
function copy_form_ajax() {
|
408 |
+
if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'ufbl-admin-ajax-nonce' ) ) {
|
409 |
+
$this->model->copy_form();
|
410 |
+
} else {
|
411 |
+
die( 'No script kiddies please' );
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Form Preview
|
417 |
+
*/
|
418 |
+
function preview_form(){
|
419 |
+
if(isset($_GET['ufbl_form_preview'],$_GET['ufbl_form_id']) && is_user_logged_in()){
|
420 |
+
$this->library->load_view('frontend/preview-form');
|
421 |
+
exit();
|
422 |
+
}
|
423 |
+
}
|
424 |
+
|
425 |
+
/**
|
426 |
+
* How to use page
|
427 |
+
*/
|
428 |
+
function how_to_use(){
|
429 |
+
$this->library->load_view('backend/how-to-use');
|
430 |
+
}
|
431 |
+
|
432 |
+
/**
|
433 |
+
* About page
|
434 |
+
*/
|
435 |
+
function about(){
|
436 |
+
$this->library->load_view('backend/about');
|
437 |
+
}
|
438 |
+
|
439 |
+
}
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Plugin initialization with object creation
|
443 |
+
*/
|
444 |
+
$ufbl_obj = new UFBL_Class();
|
445 |
+
$library_obj = new UFBL_Lib();
|
446 |
+
|
447 |
+
//class termination
|
448 |
+
}
|