Version Description
- Added: Dynamic choice feature for Dropdown, Multiple Choice, and Checkbox fields
- Changed: Loading order of templates and field classes - moved to
init
- Changed: Form javascript email validation requires domain TLD to pass
- Fixed: HTML email notification templates uses site locale text-direction
- Fixed: Javascript in the form builder conflicting with certain locales
Download this release
Release Info
Developer | jaredatch |
Plugin | Contact Form by WPForms – Drag & Drop Form Builder for WordPress |
Version | 1.2.8 |
Comparing to | |
See all releases |
Code changes from version 1.2.7 to 1.2.8
- assets/css/admin-builder-fields.css +15 -0
- assets/css/admin-builder.css +14 -0
- assets/css/wpforms-base.css +9 -10
- assets/css/wpforms-full.css +10 -10
- assets/js/admin-builder.js +191 -1
- assets/js/admin-utils.js +25 -1
- assets/js/wpforms.js +5 -0
- includes/admin/ajax-actions.php +116 -2
- includes/admin/builder/class-builder.php +1 -0
- includes/class-fields.php +15 -4
- includes/class-templates.php +15 -4
- includes/emails/templates/header-default.php +2 -6
- includes/fields/class-base.php +199 -20
- includes/fields/class-checkbox.php +229 -60
- includes/fields/class-radio.php +219 -62
- includes/fields/class-select.php +203 -54
- languages/wpforms.pot +351 -264
- lite/includes/admin/class-settings.php +0 -2
- readme.txt +8 -1
- wpforms.php +2 -2
assets/css/admin-builder-fields.css
CHANGED
@@ -364,6 +364,11 @@
|
|
364 |
|
365 |
/* Dropdown Choices / Multiple choice / Captcha questions */
|
366 |
|
|
|
|
|
|
|
|
|
|
|
367 |
#wpforms-panel-fields .wpforms-field-option-row-choices li,
|
368 |
#wpforms-panel-fields .wpforms-field-option-row-questions li {
|
369 |
border-bottom:1px solid #ddd;
|
@@ -427,6 +432,10 @@
|
|
427 |
display:block;
|
428 |
}
|
429 |
|
|
|
|
|
|
|
|
|
430 |
/* Address, Name, Date/Time field */
|
431 |
|
432 |
#wpforms-panel-fields .wpforms-field-option-address .placeholder,
|
@@ -734,6 +743,12 @@
|
|
734 |
display: none;
|
735 |
}
|
736 |
|
|
|
|
|
|
|
|
|
|
|
|
|
737 |
/* Divider field */
|
738 |
#wpforms-panel-fields .wpforms-field-divider {
|
739 |
border-top: 1px solid #ddd;
|
364 |
|
365 |
/* Dropdown Choices / Multiple choice / Captcha questions */
|
366 |
|
367 |
+
#wpforms-panel-fields .wpforms-field-option-row-choices ul,
|
368 |
+
#wpforms-panel-fields .wpforms-field-option-row-questions ul {
|
369 |
+
margin-bottom: 0;
|
370 |
+
}
|
371 |
+
|
372 |
#wpforms-panel-fields .wpforms-field-option-row-choices li,
|
373 |
#wpforms-panel-fields .wpforms-field-option-row-questions li {
|
374 |
border-bottom:1px solid #ddd;
|
432 |
display:block;
|
433 |
}
|
434 |
|
435 |
+
#wpforms-panel-fields .wpforms-field-option-row-choices .wpforms-alert {
|
436 |
+
margin-bottom: 0;
|
437 |
+
}
|
438 |
+
|
439 |
/* Address, Name, Date/Time field */
|
440 |
|
441 |
#wpforms-panel-fields .wpforms-field-option-address .placeholder,
|
743 |
display: none;
|
744 |
}
|
745 |
|
746 |
+
/* Multiple choice field */
|
747 |
+
#wpforms-panel-fields .wpforms-field-radio .wpforms-alert-dynamic {
|
748 |
+
font-size: 12px;
|
749 |
+
margin: 12px 0 0 0;
|
750 |
+
}
|
751 |
+
|
752 |
/* Divider field */
|
753 |
#wpforms-panel-fields .wpforms-field-divider {
|
754 |
border-top: 1px solid #ddd;
|
assets/css/admin-builder.css
CHANGED
@@ -69,6 +69,14 @@ body {
|
|
69 |
margin-top: 5px;
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
#wpforms-builder .wpforms-alert-success {
|
73 |
background-color: #dff0d8;
|
74 |
border-color: #d6e9c6;
|
@@ -97,6 +105,12 @@ body {
|
|
97 |
border: 1px solid #ebccd1;
|
98 |
}
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
#wpforms-builder #wpforms-builder-form .wpforms-hidden {
|
101 |
display: none;
|
102 |
}
|
69 |
margin-top: 5px;
|
70 |
}
|
71 |
|
72 |
+
#wpforms-builder .wpforms-alert-nomargin {
|
73 |
+
margin: 0;
|
74 |
+
}
|
75 |
+
|
76 |
+
#wpforms-builder .wpforms-alert-small {
|
77 |
+
font-size: 12px;
|
78 |
+
}
|
79 |
+
|
80 |
#wpforms-builder .wpforms-alert-success {
|
81 |
background-color: #dff0d8;
|
82 |
border-color: #d6e9c6;
|
105 |
border: 1px solid #ebccd1;
|
106 |
}
|
107 |
|
108 |
+
#wpforms-builder .wpforms-loading-inline {
|
109 |
+
display: inline-block;
|
110 |
+
margin: 0 10px;
|
111 |
+
color: #0073aa;
|
112 |
+
}
|
113 |
+
|
114 |
#wpforms-builder #wpforms-builder-form .wpforms-hidden {
|
115 |
display: none;
|
116 |
}
|
assets/css/wpforms-base.css
CHANGED
@@ -373,6 +373,14 @@
|
|
373 |
}
|
374 |
|
375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
/* Page Indicator themes
|
377 |
----------------------------------------------------------------------------- */
|
378 |
|
@@ -509,16 +517,6 @@
|
|
509 |
}
|
510 |
|
511 |
/* User list column classes */
|
512 |
-
.wpforms-container .wpforms-checkbox-2-columns ul,
|
513 |
-
.wpforms-container .wpforms-multiplechoice-2-columns ul,
|
514 |
-
.wpforms-container .wpforms-list-2-columns ul,
|
515 |
-
.wpforms-container .wpforms-checkbox-3-columns ul,
|
516 |
-
.wpforms-container .wpforms-multiplechoice-3-columns ul,
|
517 |
-
.wpforms-container .wpforms-list-3-columns ul {
|
518 |
-
-webkit-column-count: auto;
|
519 |
-
-moz-column-count: auto;
|
520 |
-
column-count: auto;
|
521 |
-
}
|
522 |
.wpforms-container .wpforms-checkbox-2-columns ul li,
|
523 |
.wpforms-container .wpforms-multiplechoice-2-columns ul li,
|
524 |
.wpforms-container .wpforms-list-2-columns ul li,
|
@@ -526,6 +524,7 @@
|
|
526 |
.wpforms-container .wpforms-multiplechoice-3-columns ul li,
|
527 |
.wpforms-container .wpforms-list-3-columns ul li {
|
528 |
float: none;
|
|
|
529 |
}
|
530 |
|
531 |
/* Page indicator */
|
373 |
}
|
374 |
|
375 |
|
376 |
+
/* Date/time field
|
377 |
+
----------------------------------------------------------------------------- */
|
378 |
+
|
379 |
+
.wpforms-container .wpforms-form .wpforms-datepicker-wrap {
|
380 |
+
position: relative;
|
381 |
+
}
|
382 |
+
|
383 |
+
|
384 |
/* Page Indicator themes
|
385 |
----------------------------------------------------------------------------- */
|
386 |
|
517 |
}
|
518 |
|
519 |
/* User list column classes */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
.wpforms-container .wpforms-checkbox-2-columns ul li,
|
521 |
.wpforms-container .wpforms-multiplechoice-2-columns ul li,
|
522 |
.wpforms-container .wpforms-list-2-columns ul li,
|
524 |
.wpforms-container .wpforms-multiplechoice-3-columns ul li,
|
525 |
.wpforms-container .wpforms-list-3-columns ul li {
|
526 |
float: none;
|
527 |
+
width: 100%;
|
528 |
}
|
529 |
|
530 |
/* Page indicator */
|
assets/css/wpforms-full.css
CHANGED
@@ -596,6 +596,15 @@ div.wpforms-container-full .wpforms-form .wpforms-field-credit-card-expiration s
|
|
596 |
line-height: 38px;
|
597 |
}
|
598 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
/* Custom Captcha field
|
600 |
----------------------------------------------------------------------------- */
|
601 |
|
@@ -756,16 +765,6 @@ div.wpforms-container-full .wpforms-form .wpforms-field-hidden {
|
|
756 |
}
|
757 |
|
758 |
/* User list column classes */
|
759 |
-
div.wpforms-container-full .wpforms-form .wpforms-checkbox-2-columns ul,
|
760 |
-
div.wpforms-container-full .wpforms-form .wpforms-multiplechoice-2-columns ul,
|
761 |
-
div.wpforms-container-full .wpforms-form .wpforms-list-2-columns ul,
|
762 |
-
div.wpforms-container-full .wpforms-form .wpforms-checkbox-3-columns ul,
|
763 |
-
div.wpforms-container-full .wpforms-form .wpforms-multiplechoice-3-columns ul,
|
764 |
-
div.wpforms-container-full .wpforms-form .wpforms-list-3-columns ul {
|
765 |
-
-webkit-column-count: auto;
|
766 |
-
-moz-column-count: auto;
|
767 |
-
column-count: auto;
|
768 |
-
}
|
769 |
div.wpforms-container-full .wpforms-form .wpforms-checkbox-2-columns ul li,
|
770 |
div.wpforms-container-full .wpforms-form .wpforms-multiplechoice-2-columns ul li,
|
771 |
div.wpforms-container-full .wpforms-form .wpforms-list-2-columns ul li,
|
@@ -773,6 +772,7 @@ div.wpforms-container-full .wpforms-form .wpforms-field-hidden {
|
|
773 |
div.wpforms-container-full .wpforms-form .wpforms-multiplechoice-3-columns ul li,
|
774 |
div.wpforms-container-full .wpforms-form .wpforms-list-3-columns ul li {
|
775 |
float: none;
|
|
|
776 |
}
|
777 |
|
778 |
/* Page indicator */
|
596 |
line-height: 38px;
|
597 |
}
|
598 |
|
599 |
+
|
600 |
+
/* Date/time field
|
601 |
+
----------------------------------------------------------------------------- */
|
602 |
+
|
603 |
+
div.wpforms-container-full .wpforms-form .wpforms-datepicker-wrap {
|
604 |
+
position: relative;
|
605 |
+
}
|
606 |
+
|
607 |
+
|
608 |
/* Custom Captcha field
|
609 |
----------------------------------------------------------------------------- */
|
610 |
|
765 |
}
|
766 |
|
767 |
/* User list column classes */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
768 |
div.wpforms-container-full .wpforms-form .wpforms-checkbox-2-columns ul li,
|
769 |
div.wpforms-container-full .wpforms-form .wpforms-multiplechoice-2-columns ul li,
|
770 |
div.wpforms-container-full .wpforms-form .wpforms-list-2-columns ul li,
|
772 |
div.wpforms-container-full .wpforms-form .wpforms-multiplechoice-3-columns ul li,
|
773 |
div.wpforms-container-full .wpforms-form .wpforms-list-3-columns ul li {
|
774 |
float: none;
|
775 |
+
width: 100%
|
776 |
}
|
777 |
|
778 |
/* Page indicator */
|
assets/js/admin-builder.js
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
|
7 |
settings: {
|
8 |
spinner: '<i class="fa fa-spinner fa-spin"></i>',
|
|
|
9 |
pagebreakTop: false,
|
10 |
pagebreakBottom: false
|
11 |
},
|
@@ -843,6 +844,18 @@
|
|
843 |
// Watch for pagebreak field being added and deleted
|
844 |
$(document).on('wpformsFieldAdd', WPFormsBuilder.fieldPagebreakAdd);
|
845 |
$(document).on('wpformsFieldDelete', WPFormsBuilder.fieldPagebreakDelete);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
},
|
847 |
|
848 |
/**
|
@@ -1357,6 +1370,183 @@
|
|
1357 |
}
|
1358 |
},
|
1359 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1360 |
//--------------------------------------------------------------------//
|
1361 |
// Settings Panel
|
1362 |
//--------------------------------------------------------------------//
|
@@ -1841,7 +2031,7 @@
|
|
1841 |
for(var key in fields) {
|
1842 |
|
1843 |
// Compile the label
|
1844 |
-
if (
|
1845 |
var label = wpf.sanitizeString(fields[key].label);
|
1846 |
} else {
|
1847 |
var label = wpforms_builder.field + ' #' + fields[key].val;
|
6 |
|
7 |
settings: {
|
8 |
spinner: '<i class="fa fa-spinner fa-spin"></i>',
|
9 |
+
spinnerInline: '<i class="fa fa-spinner fa-spin wpforms-loading-inline"></i>',
|
10 |
pagebreakTop: false,
|
11 |
pagebreakBottom: false
|
12 |
},
|
844 |
// Watch for pagebreak field being added and deleted
|
845 |
$(document).on('wpformsFieldAdd', WPFormsBuilder.fieldPagebreakAdd);
|
846 |
$(document).on('wpformsFieldDelete', WPFormsBuilder.fieldPagebreakDelete);
|
847 |
+
|
848 |
+
// Real-time updates for "Dynamic Choices" field option, for Dropdown,
|
849 |
+
// Checkboxes, and Multiple choice fields
|
850 |
+
$(document).on('change', '.wpforms-field-option-row-dynamic_choices select', function(e) {
|
851 |
+
WPFormsBuilder.fieldDynamicChoiceToggle($(this));
|
852 |
+
});
|
853 |
+
|
854 |
+
// Real-time updates for "Dynamic [type] Source" field option, for Dropdown,
|
855 |
+
// Checkboxes, and Multiple choice fields
|
856 |
+
$(document).on('change', '.wpforms-field-option-row-dynamic_taxonomy select, .wpforms-field-option-row-dynamic_post_type select', function(e) {
|
857 |
+
WPFormsBuilder.fieldDynamicChoiceSource($(this));
|
858 |
+
});
|
859 |
},
|
860 |
|
861 |
/**
|
1370 |
}
|
1371 |
},
|
1372 |
|
1373 |
+
/**
|
1374 |
+
* Field Dynamic Choice toggle.
|
1375 |
+
*
|
1376 |
+
* @since 1.2.8
|
1377 |
+
*/
|
1378 |
+
fieldDynamicChoiceToggle: function(el) {
|
1379 |
+
|
1380 |
+
var $this = $(el),
|
1381 |
+
$thisOption = $this.parent(),
|
1382 |
+
value = $this.val(),
|
1383 |
+
id = $thisOption.data('field-id'),
|
1384 |
+
$field = $('#wpforms-field-'+id);
|
1385 |
+
$choices = $('#wpforms-field-option-row-'+id+'-choices');
|
1386 |
+
|
1387 |
+
// Loading
|
1388 |
+
wpf.fieldOptionLoading($thisOption);
|
1389 |
+
|
1390 |
+
// Remove previous dynamic post type or taxonomy source options
|
1391 |
+
$('#wpforms-field-option-row-'+id+'-dynamic_post_type').remove();
|
1392 |
+
$('#wpforms-field-option-row-'+id+'-dynamic_taxonomy').remove();
|
1393 |
+
|
1394 |
+
if ( '' == value ) {
|
1395 |
+
// "Off" - no dynamic populating
|
1396 |
+
|
1397 |
+
// Get original field choices
|
1398 |
+
var choices = [];
|
1399 |
+
$('#wpforms-field-option-row-'+id+'-choices .label').each(function(index) {
|
1400 |
+
choices.push($(this).val());
|
1401 |
+
});
|
1402 |
+
|
1403 |
+
// Restore field to display original field choices
|
1404 |
+
if ($field.hasClass('wpforms-field-select')) {
|
1405 |
+
|
1406 |
+
$field.find('select option:first').text(choices[0]);
|
1407 |
+
|
1408 |
+
} else {
|
1409 |
+
|
1410 |
+
var type = 'radio',
|
1411 |
+
$list = $field.find('.primary-input');
|
1412 |
+
|
1413 |
+
if ($field.hasClass('wpforms-field-checkbox')) {
|
1414 |
+
type = 'checkbox';
|
1415 |
+
}
|
1416 |
+
|
1417 |
+
// Remove previous items
|
1418 |
+
$list.empty();
|
1419 |
+
|
1420 |
+
// Add new items to radio or checkbox field
|
1421 |
+
for(var key in choices) {
|
1422 |
+
$list.append('<li><input type="'+type+'" disabled> '+choices[key]+'</li>');
|
1423 |
+
}
|
1424 |
+
}
|
1425 |
+
|
1426 |
+
// Toggle elements and hide loading indicator
|
1427 |
+
$choices.find('ul').removeClass('wpforms-hidden');
|
1428 |
+
$choices.find('.wpforms-alert').addClass('wpforms-hidden');
|
1429 |
+
|
1430 |
+
wpf.fieldOptionLoading($thisOption, true);
|
1431 |
+
|
1432 |
+
} else {
|
1433 |
+
// Post type or Taxonomy based dynamic populating
|
1434 |
+
var data = {
|
1435 |
+
type : value,
|
1436 |
+
field_id: id,
|
1437 |
+
action : 'wpforms_builder_dynamic_choices',
|
1438 |
+
nonce : wpforms_builder.nonce
|
1439 |
+
}
|
1440 |
+
$.post(wpforms_builder.ajax_url, data, function(res) {
|
1441 |
+
if (res.success){
|
1442 |
+
// New option markup
|
1443 |
+
$thisOption.after(res.data.markup)
|
1444 |
+
} else {
|
1445 |
+
console.log(res);
|
1446 |
+
}
|
1447 |
+
// Hide loading indicator
|
1448 |
+
wpf.fieldOptionLoading($thisOption, true);
|
1449 |
+
|
1450 |
+
// Re-init tooltips for new field
|
1451 |
+
WPFormsBuilder.loadTooltips();
|
1452 |
+
|
1453 |
+
// Trigger Dynamic source updates
|
1454 |
+
$('#wpforms-field-option-'+id+'-dynamic_'+value).find('option:first').prop('selected', true);
|
1455 |
+
$('#wpforms-field-option-'+id+'-dynamic_'+value).trigger('change');
|
1456 |
+
|
1457 |
+
}).fail(function(xhr, textStatus, e) {
|
1458 |
+
console.log(xhr.responseText);
|
1459 |
+
});
|
1460 |
+
}
|
1461 |
+
},
|
1462 |
+
|
1463 |
+
/**
|
1464 |
+
* Field Dynamic Choice Source toggle.
|
1465 |
+
*
|
1466 |
+
* @since 1.2.8
|
1467 |
+
*/
|
1468 |
+
fieldDynamicChoiceSource: function(el) {
|
1469 |
+
|
1470 |
+
var $this = $(el),
|
1471 |
+
$thisOption = $this.parent(),
|
1472 |
+
value = $this.val(),
|
1473 |
+
id = $thisOption.data('field-id'),
|
1474 |
+
form_id = $('#wpforms-builder-form').data('id'),
|
1475 |
+
$choices = $('#wpforms-field-option-row-'+id+'-choices'),
|
1476 |
+
$field = $('#wpforms-field-'+id);
|
1477 |
+
type = $('#wpforms-field-option-'+id+'-dynamic_choices option:selected').val(),
|
1478 |
+
limit = 20;
|
1479 |
+
|
1480 |
+
// Loading
|
1481 |
+
wpf.fieldOptionLoading($thisOption);
|
1482 |
+
|
1483 |
+
var data = {
|
1484 |
+
type : type,
|
1485 |
+
source : value,
|
1486 |
+
field_id: id,
|
1487 |
+
form_id : form_id,
|
1488 |
+
action : 'wpforms_builder_dynamic_source',
|
1489 |
+
nonce : wpforms_builder.nonce
|
1490 |
+
}
|
1491 |
+
$.post(wpforms_builder.ajax_url, data, function(res) {
|
1492 |
+
if (res.success){
|
1493 |
+
|
1494 |
+
// Update info box and remove old choices
|
1495 |
+
$choices.find('.dynamic-name').text(res.data.source_name);
|
1496 |
+
$choices.find('.dynamic-type').text(res.data.type_name);
|
1497 |
+
$choices.find('ul').addClass('wpforms-hidden');
|
1498 |
+
$choices.find('.wpforms-alert').removeClass('wpforms-hidden');
|
1499 |
+
|
1500 |
+
if ($field.hasClass('wpforms-field-select')) {
|
1501 |
+
|
1502 |
+
// Add new items to select field
|
1503 |
+
$field.find('select option:first').text(res.data.items[0]);
|
1504 |
+
limit = 200;
|
1505 |
+
|
1506 |
+
} else {
|
1507 |
+
|
1508 |
+
var type = 'radio',
|
1509 |
+
$list = $field.find('.primary-input');
|
1510 |
+
|
1511 |
+
if ($field.hasClass('wpforms-field-checkbox')) {
|
1512 |
+
type = 'checkbox';
|
1513 |
+
}
|
1514 |
+
|
1515 |
+
// Remove previous items
|
1516 |
+
$list.empty();
|
1517 |
+
|
1518 |
+
// Add new items to radio or checkbox field
|
1519 |
+
for(var key in res.data.items) {
|
1520 |
+
$list.append('<li><input type="'+type+'" disabled> '+res.data.items[key]+'</li>');
|
1521 |
+
}
|
1522 |
+
}
|
1523 |
+
|
1524 |
+
// If the source has more items than the field type can
|
1525 |
+
// ideally handle alert the user
|
1526 |
+
if (Number(res.data.total) > limit) {
|
1527 |
+
var msg = wpforms_builder.dynamic_choice_limit;
|
1528 |
+
msg = msg.replace('{source}',res.data.source_name);
|
1529 |
+
msg = msg.replace('{type}',res.data.type_name);
|
1530 |
+
msg = msg.replace('{limit}',limit);
|
1531 |
+
msg = msg.replace('{total}',res.data.total);
|
1532 |
+
$.alert({
|
1533 |
+
title: wpforms_builder.heads_up,
|
1534 |
+
content: msg
|
1535 |
+
});
|
1536 |
+
}
|
1537 |
+
} else {
|
1538 |
+
console.log(res);
|
1539 |
+
}
|
1540 |
+
|
1541 |
+
// Toggle elements and hide loading indicator
|
1542 |
+
$choices.find('ul').addClass('wpforms-hidden');
|
1543 |
+
wpf.fieldOptionLoading($thisOption, true);
|
1544 |
+
|
1545 |
+
}).fail(function(xhr, textStatus, e) {
|
1546 |
+
console.log(xhr.responseText);
|
1547 |
+
});
|
1548 |
+
},
|
1549 |
+
|
1550 |
//--------------------------------------------------------------------//
|
1551 |
// Settings Panel
|
1552 |
//--------------------------------------------------------------------//
|
2031 |
for(var key in fields) {
|
2032 |
|
2033 |
// Compile the label
|
2034 |
+
if (typeof fields[key].label !== 'undefined' && fields[key].label.length) {
|
2035 |
var label = wpf.sanitizeString(fields[key].label);
|
2036 |
} else {
|
2037 |
var label = wpforms_builder.field + ' #' + fields[key].val;
|
assets/js/admin-utils.js
CHANGED
@@ -113,6 +113,29 @@ var wpf = {
|
|
113 |
return fieldsOrdered;
|
114 |
},
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
/**
|
117 |
* todo: get a single field
|
118 |
*
|
@@ -151,9 +174,10 @@ var wpf = {
|
|
151 |
* Sanitize string.
|
152 |
*
|
153 |
* @since 1.0.1
|
|
|
154 |
*/
|
155 |
sanitizeString: function(str) {
|
156 |
-
|
157 |
return str.trim();
|
158 |
},
|
159 |
|
113 |
return fieldsOrdered;
|
114 |
},
|
115 |
|
116 |
+
/**
|
117 |
+
* Toggle the loading state/indicator of a field option.
|
118 |
+
*
|
119 |
+
* @since 1.2.8
|
120 |
+
*/
|
121 |
+
fieldOptionLoading: function(option, unload) {
|
122 |
+
|
123 |
+
var $option = jQuery(option),
|
124 |
+
$label = $option.find('label'),
|
125 |
+
unload = (typeof unload === 'undefined') ? false : true,
|
126 |
+
spinner = '<i class="fa fa-spinner fa-spin wpforms-loading-inline"></i>';
|
127 |
+
|
128 |
+
if (unload) {
|
129 |
+
$label.find('.wpforms-loading-inline').remove();
|
130 |
+
$label.find('.wpforms-help-tooltip').show();
|
131 |
+
$option.find('input,select,textarea').prop('disabled', false);
|
132 |
+
} else {
|
133 |
+
$label.append(spinner);
|
134 |
+
$label.find('.wpforms-help-tooltip').hide();
|
135 |
+
$option.find('input,select,textarea').prop('disabled', true);
|
136 |
+
}
|
137 |
+
},
|
138 |
+
|
139 |
/**
|
140 |
* todo: get a single field
|
141 |
*
|
174 |
* Sanitize string.
|
175 |
*
|
176 |
* @since 1.0.1
|
177 |
+
* @deprecated 1.2.8
|
178 |
*/
|
179 |
sanitizeString: function(str) {
|
180 |
+
|
181 |
return str.trim();
|
182 |
},
|
183 |
|
assets/js/wpforms.js
CHANGED
@@ -93,6 +93,11 @@
|
|
93 |
return true;
|
94 |
}, $.validator.format("File exceeds max size allowed"));
|
95 |
|
|
|
|
|
|
|
|
|
|
|
96 |
// Finally load jQuery Validation library for our forms
|
97 |
$('.wpforms-validate').each(function() {
|
98 |
var form = $(this),
|
93 |
return true;
|
94 |
}, $.validator.format("File exceeds max size allowed"));
|
95 |
|
96 |
+
// Validate email addresses
|
97 |
+
$.validator.methods.email = function( value, element ) {
|
98 |
+
return this.optional( element ) || /[a-z]+@[a-z]+\.[a-z]+/.test( value );
|
99 |
+
}
|
100 |
+
|
101 |
// Finally load jQuery Validation library for our forms
|
102 |
$('.wpforms-validate').each(function() {
|
103 |
var form = $(this),
|
includes/admin/ajax-actions.php
CHANGED
@@ -12,7 +12,6 @@
|
|
12 |
/**
|
13 |
* Save a form
|
14 |
*
|
15 |
-
* @todo pull out the saving function to the form handler class
|
16 |
* @since 1.0.0
|
17 |
*/
|
18 |
function wpforms_save_form() {
|
@@ -144,4 +143,119 @@ function wpforms_update_form_template() {
|
|
144 |
die( __( 'Error updating form template', 'wpforms' ) );
|
145 |
}
|
146 |
}
|
147 |
-
add_action( 'wp_ajax_wpforms_update_form_template', 'wpforms_update_form_template' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
/**
|
13 |
* Save a form
|
14 |
*
|
|
|
15 |
* @since 1.0.0
|
16 |
*/
|
17 |
function wpforms_save_form() {
|
143 |
die( __( 'Error updating form template', 'wpforms' ) );
|
144 |
}
|
145 |
}
|
146 |
+
add_action( 'wp_ajax_wpforms_update_form_template', 'wpforms_update_form_template' );
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Form Builder Dynamic Choices option toggle.
|
150 |
+
*
|
151 |
+
* This can be triggered with select/radio/checkbox fileds.
|
152 |
+
*
|
153 |
+
* @since 1.2.8
|
154 |
+
*/
|
155 |
+
function wpforms_builder_dynamic_choices() {
|
156 |
+
|
157 |
+
// Run a security check
|
158 |
+
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
159 |
+
|
160 |
+
// Check for permissions
|
161 |
+
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
162 |
+
wp_send_json_error();
|
163 |
+
}
|
164 |
+
|
165 |
+
// Check for valid/required items
|
166 |
+
if ( !isset( $_POST['field_id'] ) || empty( $_POST['type'] ) || !in_array( $_POST['type'], array( 'post_type', 'taxonomy' ) ) ) {
|
167 |
+
wp_send_json_error();
|
168 |
+
}
|
169 |
+
|
170 |
+
$type = esc_attr( $_POST['type'] );
|
171 |
+
$id = absint( $_POST['field_id'] );
|
172 |
+
|
173 |
+
// Fetch the option row HTML to be returned to the builder
|
174 |
+
$field = new WPForms_Field_Select( false );
|
175 |
+
$field_args = array(
|
176 |
+
'id' => $id,
|
177 |
+
'dynamic_choices' => $type,
|
178 |
+
);
|
179 |
+
$option_row = $field->field_option( 'dynamic_choices_source', $field_args, array(), false );
|
180 |
+
|
181 |
+
wp_send_json_success( array(
|
182 |
+
'markup' => $option_row,
|
183 |
+
) );
|
184 |
+
}
|
185 |
+
add_action( 'wp_ajax_wpforms_builder_dynamic_choices', 'wpforms_builder_dynamic_choices' );
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Form Builder Dynamic Choices Source option toggle.
|
189 |
+
*
|
190 |
+
* This can be triggered with select/radio/checkbox fileds.
|
191 |
+
*
|
192 |
+
* @since 1.2.8
|
193 |
+
*/
|
194 |
+
function wpforms_builder_dynamic_source() {
|
195 |
+
|
196 |
+
// Run a security check
|
197 |
+
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
198 |
+
|
199 |
+
// Check for permissions
|
200 |
+
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
201 |
+
wp_send_json_error();
|
202 |
+
}
|
203 |
+
|
204 |
+
// Check for required items
|
205 |
+
if ( !isset( $_POST['field_id'] ) || empty( $_POST['form_id'] ) || empty( $_POST['type'] ) || empty( $_POST['source'] ) ) {
|
206 |
+
wp_send_json_error();
|
207 |
+
}
|
208 |
+
|
209 |
+
$type = esc_attr( $_POST['type'] );
|
210 |
+
$source = esc_attr( $_POST['source'] );
|
211 |
+
$id = absint( $_POST['field_id'] );
|
212 |
+
$form_id = absint( $_POST['form_id'] );
|
213 |
+
$items = array();
|
214 |
+
|
215 |
+
if ( 'post_type' == $type ) {
|
216 |
+
|
217 |
+
$type_name = __( 'post type', 'wpforms' );
|
218 |
+
$args = array(
|
219 |
+
'post_type' => $source,
|
220 |
+
'posts_per_page' => 20,
|
221 |
+
'orderby' => 'title',
|
222 |
+
'order' => 'ASC',
|
223 |
+
);
|
224 |
+
$posts = get_posts( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, array( 'id' => $id ), $form_id ) );
|
225 |
+
$total = wp_count_posts( $source );
|
226 |
+
$total = $total->publish;
|
227 |
+
$pt = get_post_type_object( $source );
|
228 |
+
$source_name = $pt->labels->name;
|
229 |
+
|
230 |
+
foreach ( $posts as $post ) {
|
231 |
+
$items[] = $post->post_title;
|
232 |
+
}
|
233 |
+
|
234 |
+
} elseif ( 'taxonomy' == $type ) {
|
235 |
+
|
236 |
+
$type_name = __( 'taxonomy', 'wpforms' );
|
237 |
+
$args = array(
|
238 |
+
'taxonomy' => $source,
|
239 |
+
'hide_empty' => false,
|
240 |
+
'number' => 20,
|
241 |
+
);
|
242 |
+
$terms = get_terms( apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, array( 'id' => $id ), $form_id ) );
|
243 |
+
$total = wp_count_terms( $source );
|
244 |
+
$tax = get_taxonomy( $source );
|
245 |
+
$source_name = $tax->labels->name;
|
246 |
+
|
247 |
+
foreach ( $terms as $term ) {
|
248 |
+
$items[] = $term->name;
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
wp_send_json_success( array(
|
253 |
+
'items' => $items,
|
254 |
+
'source' => $source,
|
255 |
+
'source_name' => $source_name,
|
256 |
+
'total' => $total,
|
257 |
+
'type' => $type,
|
258 |
+
'type_name' => $type_name,
|
259 |
+
) );
|
260 |
+
}
|
261 |
+
add_action( 'wp_ajax_wpforms_builder_dynamic_source', 'wpforms_builder_dynamic_source' );
|
includes/admin/builder/class-builder.php
CHANGED
@@ -257,6 +257,7 @@ class WPForms_Builder {
|
|
257 |
|
258 |
$strings = array(
|
259 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
|
|
260 |
'cancel' => __( 'Cancel', 'wpforms' ),
|
261 |
'ok' => __( 'OK', 'wpforms' ),
|
262 |
'close' => __( 'Close', 'wpforms' ),
|
257 |
|
258 |
$strings = array(
|
259 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
260 |
+
'dynamic_choice_limit' => __( 'The {source} {type} contains over {limit} items ({total}). This may make the field difficult for your vistors to use and/or cause the form to be slow.', 'wpforms' ),
|
261 |
'cancel' => __( 'Cancel', 'wpforms' ),
|
262 |
'ok' => __( 'OK', 'wpforms' ),
|
263 |
'close' => __( 'Close', 'wpforms' ),
|
includes/class-fields.php
CHANGED
@@ -17,19 +17,30 @@ class WPForms_Fields {
|
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
|
20 |
-
$this->
|
21 |
}
|
22 |
|
23 |
/**
|
24 |
-
* Load
|
25 |
*
|
26 |
-
* @since 1.
|
27 |
*/
|
28 |
-
public function
|
29 |
|
30 |
// Parent class template
|
31 |
require_once WPFORMS_PLUGIN_DIR . 'includes/fields/class-base.php';
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
$fields = apply_filters( 'wpforms_load_fields', array(
|
34 |
'text',
|
35 |
'textarea',
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
|
20 |
+
$this->init();
|
21 |
}
|
22 |
|
23 |
/**
|
24 |
+
* Load and init the base field class.
|
25 |
*
|
26 |
+
* @since 1.2.8
|
27 |
*/
|
28 |
+
public function init() {
|
29 |
|
30 |
// Parent class template
|
31 |
require_once WPFORMS_PLUGIN_DIR . 'includes/fields/class-base.php';
|
32 |
|
33 |
+
// Load default fields on WP init
|
34 |
+
add_action( 'init', array( $this, 'load' ) );
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Load default field types.
|
39 |
+
*
|
40 |
+
* @since 1.0.0
|
41 |
+
*/
|
42 |
+
public function load() {
|
43 |
+
|
44 |
$fields = apply_filters( 'wpforms_load_fields', array(
|
45 |
'text',
|
46 |
'textarea',
|
includes/class-templates.php
CHANGED
@@ -17,19 +17,30 @@ class WPForms_Templates {
|
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
|
20 |
-
$this->
|
21 |
}
|
22 |
|
23 |
/**
|
24 |
-
* Load
|
25 |
*
|
26 |
-
* @since 1.
|
27 |
*/
|
28 |
-
public function
|
29 |
|
30 |
// Parent class template
|
31 |
require_once WPFORMS_PLUGIN_DIR . 'includes/templates/class-base.php';
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
$templates = apply_filters( 'wpforms_load_templates', array(
|
34 |
'blank',
|
35 |
'contact',
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
|
20 |
+
$this->init();
|
21 |
}
|
22 |
|
23 |
/**
|
24 |
+
* Load and init the base form template class.
|
25 |
*
|
26 |
+
* @since 1.2.8
|
27 |
*/
|
28 |
+
public function init() {
|
29 |
|
30 |
// Parent class template
|
31 |
require_once WPFORMS_PLUGIN_DIR . 'includes/templates/class-base.php';
|
32 |
|
33 |
+
// Load default templates on WP init
|
34 |
+
add_action( 'init', array( $this, 'load' ) );
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Load default form templates.
|
39 |
+
*
|
40 |
+
* @since 1.0.0
|
41 |
+
*/
|
42 |
+
public function load() {
|
43 |
+
|
44 |
$templates = apply_filters( 'wpforms_load_templates', array(
|
45 |
'blank',
|
46 |
'contact',
|
includes/emails/templates/header-default.php
CHANGED
@@ -14,9 +14,10 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
14 |
|
15 |
$header_image = wpforms_setting( 'email-header-image', false );
|
16 |
$background_color = wpforms_setting( 'email-background-color', '#e9eaec' );
|
|
|
17 |
?>
|
18 |
<!doctype html>
|
19 |
-
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
20 |
<head>
|
21 |
<!--[if gte mso 15]>
|
22 |
<xml>
|
@@ -127,7 +128,6 @@ $background_color = wpforms_setting( 'email-background-color', '#e9eaec' );
|
|
127 |
font-weight:bold;
|
128 |
line-height:125%;
|
129 |
letter-spacing:normal;
|
130 |
-
text-align:left;
|
131 |
}
|
132 |
/* Page - Heading 2 */
|
133 |
h2{
|
@@ -138,7 +138,6 @@ $background_color = wpforms_setting( 'email-background-color', '#e9eaec' );
|
|
138 |
font-weight:bold;
|
139 |
line-height:125%;
|
140 |
letter-spacing:normal;
|
141 |
-
text-align:left;
|
142 |
}
|
143 |
/* Page - Heading 3 */
|
144 |
h3{
|
@@ -149,7 +148,6 @@ $background_color = wpforms_setting( 'email-background-color', '#e9eaec' );
|
|
149 |
font-weight:bold;
|
150 |
line-height:125%;
|
151 |
letter-spacing:normal;
|
152 |
-
text-align:left;
|
153 |
}
|
154 |
/* Page - Heading 4 */
|
155 |
h4{
|
@@ -160,7 +158,6 @@ $background_color = wpforms_setting( 'email-background-color', '#e9eaec' );
|
|
160 |
font-weight:bold;
|
161 |
line-height:125%;
|
162 |
letter-spacing:normal;
|
163 |
-
text-align:left;
|
164 |
}
|
165 |
/* Header - Header Style */
|
166 |
#templateHeader{
|
@@ -185,7 +182,6 @@ $background_color = wpforms_setting( 'email-background-color', '#e9eaec' );
|
|
185 |
font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
|
186 |
font-size:14px;
|
187 |
line-height:150%;
|
188 |
-
text-align:left;
|
189 |
}
|
190 |
/* Body - Body Link */
|
191 |
#templateBody .mcnTextContent a,
|
14 |
|
15 |
$header_image = wpforms_setting( 'email-header-image', false );
|
16 |
$background_color = wpforms_setting( 'email-background-color', '#e9eaec' );
|
17 |
+
$text_direction = is_rtl() ? 'rtl' : 'ltr';
|
18 |
?>
|
19 |
<!doctype html>
|
20 |
+
<html dir="<?php echo $text_direction; ?>" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
21 |
<head>
|
22 |
<!--[if gte mso 15]>
|
23 |
<xml>
|
128 |
font-weight:bold;
|
129 |
line-height:125%;
|
130 |
letter-spacing:normal;
|
|
|
131 |
}
|
132 |
/* Page - Heading 2 */
|
133 |
h2{
|
138 |
font-weight:bold;
|
139 |
line-height:125%;
|
140 |
letter-spacing:normal;
|
|
|
141 |
}
|
142 |
/* Page - Heading 3 */
|
143 |
h3{
|
148 |
font-weight:bold;
|
149 |
line-height:125%;
|
150 |
letter-spacing:normal;
|
|
|
151 |
}
|
152 |
/* Page - Heading 4 */
|
153 |
h4{
|
158 |
font-weight:bold;
|
159 |
line-height:125%;
|
160 |
letter-spacing:normal;
|
|
|
161 |
}
|
162 |
/* Header - Header Style */
|
163 |
#templateHeader{
|
182 |
font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
|
183 |
font-size:14px;
|
184 |
line-height:150%;
|
|
|
185 |
}
|
186 |
/* Body - Body Link */
|
187 |
#templateBody .mcnTextContent a,
|
includes/fields/class-base.php
CHANGED
@@ -79,7 +79,11 @@ abstract class WPForms_Field {
|
|
79 |
*
|
80 |
* @since 1.0.0
|
81 |
*/
|
82 |
-
public function __construct() {
|
|
|
|
|
|
|
|
|
83 |
|
84 |
// The form ID is to be accessed in the builder
|
85 |
$this->form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : false;
|
@@ -240,9 +244,10 @@ abstract class WPForms_Field {
|
|
240 |
// Select
|
241 |
case 'select':
|
242 |
$options = $args['options'];
|
|
|
243 |
$output = sprintf( '<select class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" %s>', $class, $id, $slug, $id, $slug, $data );
|
244 |
foreach ( $options as $key => $option ) {
|
245 |
-
$output .= sprintf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $key, $
|
246 |
}
|
247 |
$output .= '</select>';
|
248 |
break;
|
@@ -269,9 +274,12 @@ abstract class WPForms_Field {
|
|
269 |
|
270 |
switch ( $option ) {
|
271 |
|
272 |
-
|
|
|
|
|
|
|
|
|
273 |
|
274 |
-
// Basic Options markup
|
275 |
case 'basic-options':
|
276 |
$markup = !empty( $args['markup'] ) ? $args['markup'] : 'open';
|
277 |
$class = !empty( $args['class'] ) ? esc_html( $args['class'] ) : '';
|
@@ -284,7 +292,8 @@ abstract class WPForms_Field {
|
|
284 |
}
|
285 |
break;
|
286 |
|
287 |
-
// Field Label
|
|
|
288 |
case 'label':
|
289 |
$value = !empty( $field['label'] ) ? esc_attr( $field['label'] ) : '';
|
290 |
$tooltip = __( 'Enter text for the form field label. Field labels are recommended and can be hidden in the Advanced Settings.', 'wpforms' );
|
@@ -293,7 +302,8 @@ abstract class WPForms_Field {
|
|
293 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'label', 'content' => $output ), false );
|
294 |
break;
|
295 |
|
296 |
-
// Field Description
|
|
|
297 |
case 'description':
|
298 |
$value = !empty( $field['description'] ) ? esc_attr( $field['description'] ) : '';
|
299 |
$tooltip = __( 'Enter text for the form field description.', 'wpforms' );
|
@@ -302,6 +312,8 @@ abstract class WPForms_Field {
|
|
302 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'description', 'content' => $output ), false );
|
303 |
break;
|
304 |
|
|
|
|
|
305 |
case 'required':
|
306 |
$default = !empty( $args['default'] ) ? $args['default'] : '0';
|
307 |
$value = isset( $field['required'] ) ? $field['required'] : $default;
|
@@ -310,14 +322,16 @@ abstract class WPForms_Field {
|
|
310 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'required', 'content' => $output ), false );
|
311 |
break;
|
312 |
|
313 |
-
// Meta
|
|
|
314 |
case 'meta':
|
315 |
$output = sprintf( '<label>%s</label>', 'Type' );
|
316 |
$output .= sprintf( '<p class="meta">%s <span class="id">(ID #%d)</span></p>', $this->name, $field['id']);
|
317 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'meta', 'content' => $output ), false );
|
318 |
break;
|
319 |
|
320 |
-
// Code
|
|
|
321 |
case 'code':
|
322 |
$value = !empty( $field['code'] ) ? esc_attr( $field['code'] ) : '';
|
323 |
$tooltip = __( 'Enter code for the form field.', 'wpforms' );
|
@@ -326,10 +340,85 @@ abstract class WPForms_Field {
|
|
326 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'code', 'content' => $output ), false );
|
327 |
break;
|
328 |
|
329 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
|
331 |
-
// Default value
|
332 |
-
|
|
|
333 |
$value = !empty( $field['default_value'] ) ? esc_attr( $field['default_value'] ) : '';
|
334 |
$tooltip = __( 'Enter text for the default form field value.', 'wpforms' );
|
335 |
$toggle = '<a href="#" class="toggle-smart-tags"><i class="fa fa-tags"></i> <span>' . __( 'Show Smart Tags', 'wpforms' ) . '</span></a>';
|
@@ -339,8 +428,9 @@ abstract class WPForms_Field {
|
|
339 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'default_value', 'content' => $output ), false );
|
340 |
break;
|
341 |
|
342 |
-
// Size
|
343 |
-
|
|
|
344 |
$value = !empty( $field['size'] ) ? esc_attr( $field['size'] ) : 'medium';
|
345 |
$tooltip = __( 'Select the default form field size.', 'wpforms' );
|
346 |
$options = array(
|
@@ -353,7 +443,8 @@ abstract class WPForms_Field {
|
|
353 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'size', 'content' => $output ), false );
|
354 |
break;
|
355 |
|
356 |
-
// Advanced Options markup
|
|
|
357 |
case 'advanced-options':
|
358 |
$markup = !empty( $args['markup'] ) ? $args['markup'] : 'open';
|
359 |
if ( $markup == 'open' ) {
|
@@ -367,7 +458,8 @@ abstract class WPForms_Field {
|
|
367 |
}
|
368 |
break;
|
369 |
|
370 |
-
// Placeholder
|
|
|
371 |
case 'placeholder':
|
372 |
$value = !empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
|
373 |
$tooltip = __( 'Enter text for the form field placeholder.', 'wpforms' );
|
@@ -376,7 +468,8 @@ abstract class WPForms_Field {
|
|
376 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'placeholder', 'content' => $output ), false );
|
377 |
break;
|
378 |
|
379 |
-
// CSS classes
|
|
|
380 |
case 'css':
|
381 |
$value = !empty( $field['css'] ) ? esc_attr( $field['css'] ) : '';
|
382 |
$tooltip = __( 'Enter CSS class names for the form field container. Class names should be seperated with spaces.', 'wpforms' );
|
@@ -386,7 +479,8 @@ abstract class WPForms_Field {
|
|
386 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'css', 'content' => $output ), false );
|
387 |
break;
|
388 |
|
389 |
-
// Hide Label
|
|
|
390 |
case 'label_hide':
|
391 |
$value = isset( $field['label_hide'] ) ? $field['label_hide'] : '0';
|
392 |
$tooltip = __( 'Check this option to hide the form field label.', 'wpforms' );
|
@@ -395,7 +489,8 @@ abstract class WPForms_Field {
|
|
395 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'label_hide', 'content' => $output ), false );
|
396 |
break;
|
397 |
|
398 |
-
// Hide Sub-Labels
|
|
|
399 |
case 'sublabel_hide':
|
400 |
$value = isset( $field['sublabel_hide'] ) ? $field['sublabel_hide'] : '0';
|
401 |
$tooltip = __( 'Check this option to hide the form field sub-label.', 'wpforms' );
|
@@ -404,8 +499,9 @@ abstract class WPForms_Field {
|
|
404 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'sublabel_hide', 'content' => $output ), false );
|
405 |
break;
|
406 |
|
407 |
-
//
|
408 |
-
|
|
|
409 |
$value = !empty( $field['input_columns'] ) ? esc_attr( $field['input_columns'] ) : '';
|
410 |
$tooltip = __( 'Select the layout for displaying field choices.', 'wpforms' );
|
411 |
$options = array(
|
@@ -417,6 +513,89 @@ abstract class WPForms_Field {
|
|
417 |
$output .= $this->field_element( 'select', $field, array( 'slug' => 'input_columns', 'value' => $value, 'options' => $options ), false );
|
418 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'input_columns', 'content' => $output ), false );
|
419 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
}
|
421 |
|
422 |
if ( $echo ) {
|
79 |
*
|
80 |
* @since 1.0.0
|
81 |
*/
|
82 |
+
public function __construct( $init = true ) {
|
83 |
+
|
84 |
+
if ( ! $init ) {
|
85 |
+
return;
|
86 |
+
}
|
87 |
|
88 |
// The form ID is to be accessed in the builder
|
89 |
$this->form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : false;
|
244 |
// Select
|
245 |
case 'select':
|
246 |
$options = $args['options'];
|
247 |
+
$value = isset( $args['value'] ) ? $args['value'] : '';
|
248 |
$output = sprintf( '<select class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" %s>', $class, $id, $slug, $id, $slug, $data );
|
249 |
foreach ( $options as $key => $option ) {
|
250 |
+
$output .= sprintf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $key, $value, false ), $option );
|
251 |
}
|
252 |
$output .= '</select>';
|
253 |
break;
|
274 |
|
275 |
switch ( $option ) {
|
276 |
|
277 |
+
//----------------------------------------------------------------//
|
278 |
+
// Basic Fields
|
279 |
+
//----------------------------------------------------------------//
|
280 |
+
|
281 |
+
// Basic Options markup ------------------------------------------//
|
282 |
|
|
|
283 |
case 'basic-options':
|
284 |
$markup = !empty( $args['markup'] ) ? $args['markup'] : 'open';
|
285 |
$class = !empty( $args['class'] ) ? esc_html( $args['class'] ) : '';
|
292 |
}
|
293 |
break;
|
294 |
|
295 |
+
// Field Label ---------------------------------------------------//
|
296 |
+
|
297 |
case 'label':
|
298 |
$value = !empty( $field['label'] ) ? esc_attr( $field['label'] ) : '';
|
299 |
$tooltip = __( 'Enter text for the form field label. Field labels are recommended and can be hidden in the Advanced Settings.', 'wpforms' );
|
302 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'label', 'content' => $output ), false );
|
303 |
break;
|
304 |
|
305 |
+
// Field Description ---------------------------------------------//
|
306 |
+
|
307 |
case 'description':
|
308 |
$value = !empty( $field['description'] ) ? esc_attr( $field['description'] ) : '';
|
309 |
$tooltip = __( 'Enter text for the form field description.', 'wpforms' );
|
312 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'description', 'content' => $output ), false );
|
313 |
break;
|
314 |
|
315 |
+
// Field Required toggle -----------------------------------------//
|
316 |
+
|
317 |
case 'required':
|
318 |
$default = !empty( $args['default'] ) ? $args['default'] : '0';
|
319 |
$value = isset( $field['required'] ) ? $field['required'] : $default;
|
322 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'required', 'content' => $output ), false );
|
323 |
break;
|
324 |
|
325 |
+
// Field Meta (field type and ID) --------------------------------//
|
326 |
+
|
327 |
case 'meta':
|
328 |
$output = sprintf( '<label>%s</label>', 'Type' );
|
329 |
$output .= sprintf( '<p class="meta">%s <span class="id">(ID #%d)</span></p>', $this->name, $field['id']);
|
330 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'meta', 'content' => $output ), false );
|
331 |
break;
|
332 |
|
333 |
+
// Code Block ----------------------------------------------------//
|
334 |
+
|
335 |
case 'code':
|
336 |
$value = !empty( $field['code'] ) ? esc_attr( $field['code'] ) : '';
|
337 |
$tooltip = __( 'Enter code for the form field.', 'wpforms' );
|
340 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'code', 'content' => $output ), false );
|
341 |
break;
|
342 |
|
343 |
+
// Choices -------------------------------------------------------//
|
344 |
+
|
345 |
+
case 'choices':
|
346 |
+
|
347 |
+
$tooltip = __( 'Add choices for the form field.', 'wpforms' );
|
348 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? esc_html( $field['dynamic_choices'] ) : '';
|
349 |
+
$values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
350 |
+
$class = !empty( $field['show_values'] ) && $field['show_values'] == '1' ? 'show-values' : '';
|
351 |
+
$class .= !empty( $dynamic ) ? ' wpforms-hidden' : '';
|
352 |
+
|
353 |
+
// Field option label
|
354 |
+
$option_label = $this->field_element(
|
355 |
+
'label',
|
356 |
+
$field,
|
357 |
+
array(
|
358 |
+
'slug' => 'choices',
|
359 |
+
'value' => __( 'Choices', 'wpforms' ),
|
360 |
+
'tooltip' => $tooltip
|
361 |
+
),
|
362 |
+
false
|
363 |
+
);
|
364 |
+
|
365 |
+
// Field option choices inputs
|
366 |
+
$option_choices = sprintf( '<ul data-next-id="%s" class="%s" data-field-id="%d" data-field-type="%s">', max( array_keys( $values ) ) +1, $class, $field['id'], $this->type );
|
367 |
+
foreach ( $values as $key => $value ) {
|
368 |
+
$default = !empty( $choices_values['default'] ) ? $choices_values['default'] : '';
|
369 |
+
$option_choices .= sprintf( '<li data-key="%d">', $key );
|
370 |
+
$option_choices .= sprintf( '<input type="radio" name="fields[%s][choices][%s][default]" class="default" value="1" %s>', $field['id'], $key, checked( '1', $default, false ) );
|
371 |
+
$option_choices .= '<span class="move"><i class="fa fa-bars"></i></span>';
|
372 |
+
$option_choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][label]" value="%s" class="label">', $field['id'], $key, esc_attr( $value['label'] ) );
|
373 |
+
$option_choices .= '<a class="add" href="#"><i class="fa fa-plus-circle"></i></a>';
|
374 |
+
$option_choices .= '<a class="remove" href="#"><i class="fa fa-minus-circle"></i></a>';
|
375 |
+
$option_choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][value]" value="%s" class="value">', $field['id'], $key, esc_attr( $value['value'] ) );
|
376 |
+
$option_choices .= '</li>';
|
377 |
+
}
|
378 |
+
$option_choices .= '</ul>';
|
379 |
+
|
380 |
+
// Field option dynamic status
|
381 |
+
$source_name = '';
|
382 |
+
$type_name = '';
|
383 |
+
$status_visibility = !empty( $dynamic ) && !empty( $field['dynamic_' . $dynamic ] ) ? '' : 'wpforms-hidden';
|
384 |
+
|
385 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_' . $dynamic ] ) ) {
|
386 |
+
|
387 |
+
$type_name = __( 'post type', 'wpforms' );
|
388 |
+
$source = $field['dynamic_' . $dynamic ];
|
389 |
+
$pt = get_post_type_object( $source );
|
390 |
+
$source_name = $pt->labels->name;
|
391 |
+
|
392 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_' . $dynamic ] ) ) {
|
393 |
+
|
394 |
+
$type_name = __( 'taxonomy', 'wpforms' );
|
395 |
+
$source = $field['dynamic_' . $dynamic ];
|
396 |
+
$tax = get_taxonomy( $source );
|
397 |
+
$source_name = $tax->labels->name;
|
398 |
+
}
|
399 |
+
|
400 |
+
$option_status = sprintf( '<div class="wpforms-alert-warning wpforms-alert %s">', $status_visibility );
|
401 |
+
$option_status .= sprintf( __( 'Choices are dynamically populated from the <span class="dynamic-name">%s</span> <span class="dynamic-type">%s</span>', 'wpforms' ), $source_name, $type_name );
|
402 |
+
$option_status .= '</div>';
|
403 |
+
|
404 |
+
// Field option row (markup) including label and input.
|
405 |
+
$output = $this->field_element(
|
406 |
+
'row',
|
407 |
+
$field,
|
408 |
+
array(
|
409 |
+
'slug' => 'choices',
|
410 |
+
'content' => $option_label . $option_choices . $option_status,
|
411 |
+
)
|
412 |
+
);
|
413 |
+
break;
|
414 |
+
|
415 |
+
//----------------------------------------------------------------//
|
416 |
+
// Advanced Fields
|
417 |
+
//----------------------------------------------------------------//
|
418 |
|
419 |
+
// Default value -------------------------------------------------//
|
420 |
+
|
421 |
+
case 'default_value':
|
422 |
$value = !empty( $field['default_value'] ) ? esc_attr( $field['default_value'] ) : '';
|
423 |
$tooltip = __( 'Enter text for the default form field value.', 'wpforms' );
|
424 |
$toggle = '<a href="#" class="toggle-smart-tags"><i class="fa fa-tags"></i> <span>' . __( 'Show Smart Tags', 'wpforms' ) . '</span></a>';
|
428 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'default_value', 'content' => $output ), false );
|
429 |
break;
|
430 |
|
431 |
+
// Size ----------------------------------------------------------//
|
432 |
+
|
433 |
+
case 'size':
|
434 |
$value = !empty( $field['size'] ) ? esc_attr( $field['size'] ) : 'medium';
|
435 |
$tooltip = __( 'Select the default form field size.', 'wpforms' );
|
436 |
$options = array(
|
443 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'size', 'content' => $output ), false );
|
444 |
break;
|
445 |
|
446 |
+
// Advanced Options markup ---------------------------------------//
|
447 |
+
|
448 |
case 'advanced-options':
|
449 |
$markup = !empty( $args['markup'] ) ? $args['markup'] : 'open';
|
450 |
if ( $markup == 'open' ) {
|
458 |
}
|
459 |
break;
|
460 |
|
461 |
+
// Placeholder ---------------------------------------------------//
|
462 |
+
|
463 |
case 'placeholder':
|
464 |
$value = !empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
|
465 |
$tooltip = __( 'Enter text for the form field placeholder.', 'wpforms' );
|
468 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'placeholder', 'content' => $output ), false );
|
469 |
break;
|
470 |
|
471 |
+
// CSS classes ---------------------------------------------------//
|
472 |
+
|
473 |
case 'css':
|
474 |
$value = !empty( $field['css'] ) ? esc_attr( $field['css'] ) : '';
|
475 |
$tooltip = __( 'Enter CSS class names for the form field container. Class names should be seperated with spaces.', 'wpforms' );
|
479 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'css', 'content' => $output ), false );
|
480 |
break;
|
481 |
|
482 |
+
// Hide Label ----------------------------------------------------//
|
483 |
+
|
484 |
case 'label_hide':
|
485 |
$value = isset( $field['label_hide'] ) ? $field['label_hide'] : '0';
|
486 |
$tooltip = __( 'Check this option to hide the form field label.', 'wpforms' );
|
489 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'label_hide', 'content' => $output ), false );
|
490 |
break;
|
491 |
|
492 |
+
// Hide Sub-Labels -----------------------------------------------//
|
493 |
+
|
494 |
case 'sublabel_hide':
|
495 |
$value = isset( $field['sublabel_hide'] ) ? $field['sublabel_hide'] : '0';
|
496 |
$tooltip = __( 'Check this option to hide the form field sub-label.', 'wpforms' );
|
499 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'sublabel_hide', 'content' => $output ), false );
|
500 |
break;
|
501 |
|
502 |
+
// Input Columns -------------------------------------------------//
|
503 |
+
|
504 |
+
case 'input_columns':
|
505 |
$value = !empty( $field['input_columns'] ) ? esc_attr( $field['input_columns'] ) : '';
|
506 |
$tooltip = __( 'Select the layout for displaying field choices.', 'wpforms' );
|
507 |
$options = array(
|
513 |
$output .= $this->field_element( 'select', $field, array( 'slug' => 'input_columns', 'value' => $value, 'options' => $options ), false );
|
514 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'input_columns', 'content' => $output ), false );
|
515 |
break;
|
516 |
+
|
517 |
+
// Dynamic Choices -----------------------------------------------//
|
518 |
+
|
519 |
+
case 'dynamic_choices':
|
520 |
+
$value = !empty( $field['dynamic_choices'] ) ? esc_attr( $field['dynamic_choices'] ) : '';
|
521 |
+
$tooltip = __( 'Select auto-populate method to use.', 'wpforms' );
|
522 |
+
$options = array(
|
523 |
+
'' => __( 'Off', 'wpforms' ),
|
524 |
+
'post_type' => __( 'Post Type', 'wpforms'),
|
525 |
+
'taxonomy' => __( 'Taxonomy', 'wpforms' ),
|
526 |
+
);
|
527 |
+
$output = $this->field_element( 'label', $field, array( 'slug' => 'dynamic_choices', 'value' => __( 'Dynamic Choices', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
528 |
+
$output .= $this->field_element( 'select', $field, array( 'slug' => 'dynamic_choices', 'value' => $value, 'options' => $options ), false );
|
529 |
+
$output = $this->field_element( 'row', $field, array( 'slug' => 'dynamic_choices', 'content' => $output ), false );
|
530 |
+
break;
|
531 |
+
|
532 |
+
// Dynamic Choices Source ----------------------------------------//
|
533 |
+
|
534 |
+
case 'dynamic_choices_source':
|
535 |
+
|
536 |
+
$output = '';
|
537 |
+
$type = !empty( $field['dynamic_choices'] ) ? esc_attr( $field['dynamic_choices'] ) : '';
|
538 |
+
|
539 |
+
if ( !empty( $type ) ) {
|
540 |
+
|
541 |
+
if ( 'post_type' == $type ) {
|
542 |
+
|
543 |
+
$type_name = __( 'Post Type', 'wpforms' );
|
544 |
+
$items = get_post_types( array( 'public' => true ), 'objects' );
|
545 |
+
unset( $items['attachment'] );
|
546 |
+
|
547 |
+
} elseif ( 'taxonomy' == $type ) {
|
548 |
+
|
549 |
+
$type_name = __( 'Taxonomy', 'wpforms' );
|
550 |
+
$items = get_taxonomies( array( 'public' => true ), 'objects' );
|
551 |
+
unset( $items['post_format'] );
|
552 |
+
}
|
553 |
+
|
554 |
+
$tooltip = sprintf( __( 'Select %s to use for auto-populating field choices.', 'wpforms' ), $type_name );
|
555 |
+
$label = sprintf( __( 'Dynamic %s Source', 'wpforms' ), $type_name );
|
556 |
+
$options = array();
|
557 |
+
$source = !empty( $field['dynamic_' . $type ] ) ? esc_attr( $field['dynamic_' . $type] ) : '';
|
558 |
+
|
559 |
+
foreach ( $items as $key => $item ) {
|
560 |
+
$options[$key] = $item->labels->name;
|
561 |
+
}
|
562 |
+
|
563 |
+
// Field option label
|
564 |
+
$option_label = $this->field_element(
|
565 |
+
'label',
|
566 |
+
$field,
|
567 |
+
array(
|
568 |
+
'slug' => 'dynamic_' . $type,
|
569 |
+
'value' => $label,
|
570 |
+
'tooltip' => $tooltip,
|
571 |
+
),
|
572 |
+
false
|
573 |
+
);
|
574 |
+
|
575 |
+
// Field option select input
|
576 |
+
$option_input = $this->field_element(
|
577 |
+
'select',
|
578 |
+
$field,
|
579 |
+
array(
|
580 |
+
'slug' => 'dynamic_' . $type,
|
581 |
+
'options' => $options,
|
582 |
+
'value' => $source,
|
583 |
+
),
|
584 |
+
false
|
585 |
+
);
|
586 |
+
|
587 |
+
// Field option row (markup) including label and input.
|
588 |
+
$output = $this->field_element(
|
589 |
+
'row',
|
590 |
+
$field,
|
591 |
+
array(
|
592 |
+
'slug' => 'dynamic_' . $type,
|
593 |
+
'content' => $option_label . $option_input
|
594 |
+
),
|
595 |
+
false
|
596 |
+
);
|
597 |
+
}
|
598 |
+
break;
|
599 |
}
|
600 |
|
601 |
if ( $echo ) {
|
includes/fields/class-checkbox.php
CHANGED
@@ -24,18 +24,18 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
24 |
$this->order = 11;
|
25 |
$this->defaults = array(
|
26 |
1 => array(
|
27 |
-
'label'
|
28 |
-
'value'
|
29 |
'default' => '',
|
30 |
),
|
31 |
2 => array(
|
32 |
-
'label'
|
33 |
-
'value'
|
34 |
'default' => '',
|
35 |
),
|
36 |
3 => array(
|
37 |
-
'label'
|
38 |
-
'value'
|
39 |
'default' => '',
|
40 |
),
|
41 |
);
|
@@ -53,47 +53,53 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
53 |
// Basic field options
|
54 |
//--------------------------------------------------------------------//
|
55 |
|
|
|
56 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'open' ) );
|
57 |
-
$this->field_option( 'label', $field );
|
58 |
-
|
59 |
-
$tooltip = __( 'Add choices for the form field.', 'wpforms' );
|
60 |
-
$choices_values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
61 |
-
$choices_class = !empty( $field['show_values'] ) && $field['show_values'] == '1' ? 'show-values' : '';
|
62 |
-
$choices = $this->field_element( 'label', $field, array( 'slug' => 'choices', 'value' => __( 'Choices', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
63 |
-
$choices .= sprintf( '<ul data-next-id="%s" class="%s" data-field-id="%d" data-field-type="%s">', max( array_keys( $choices_values ) ) +1, $choices_class, $field['id'], $this->type );
|
64 |
-
foreach ( $choices_values as $key => $value ) {
|
65 |
-
$value['default'] = isset( $value['default'] ) ? $value['default'] : '';
|
66 |
-
$choices .= '<li data-key="' . absint( $key ) . '">';
|
67 |
-
$choices .= sprintf( '<input type="checkbox" name="fields[%s][choices][%s][default]" class="default" value="1" %s>', $field['id'], $key, checked( '1', $value['default'], false ) );
|
68 |
-
$choices .= '<span class="move"><i class="fa fa-bars"></i></span>';
|
69 |
-
$choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][label]" value="%s" class="label">', $field['id'], $key, esc_attr( $value['label'] ) );
|
70 |
-
$choices .= '<a class="add" href="#"><i class="fa fa-plus-circle"></i></a>';
|
71 |
-
$choices .= '<a class="remove" href="#"><i class="fa fa-minus-circle"></i></a>';
|
72 |
-
$choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][value]" value="%s" class="value">', $field['id'], $key, esc_attr( $value['value'] ) );
|
73 |
-
$choices .= '</li>';
|
74 |
-
}
|
75 |
-
$choices .= '</ul>';
|
76 |
-
$this->field_element( 'row', $field, array( 'slug' => 'choices', 'content' => $choices ) );
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
$this->field_option( 'description', $field );
|
79 |
-
|
|
|
|
|
|
|
|
|
80 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'close' ) );
|
81 |
|
82 |
//--------------------------------------------------------------------//
|
83 |
// Advanced field options
|
84 |
//--------------------------------------------------------------------//
|
85 |
|
|
|
86 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'open' ) );
|
87 |
|
88 |
// Show Values toggle option
|
89 |
$tooltip = __( 'Check this to manual set form field values.', 'wpforms' );
|
90 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
91 |
$show_values = $this->field_element( 'checkbox', $field, array( 'slug' => 'show_values', 'value' => $show_values, 'desc' => __( 'Show Values', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
92 |
-
$this->field_element( 'row',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
-
|
95 |
-
$this->field_option( 'label_hide', $field );
|
96 |
-
$this->field_option( 'css', $field );
|
97 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'close' ) );
|
98 |
}
|
99 |
|
@@ -106,16 +112,77 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
106 |
public function field_preview( $field ) {
|
107 |
|
108 |
$values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
|
|
109 |
|
|
|
110 |
$this->field_preview_option( 'label', $field );
|
111 |
|
|
|
112 |
echo '<ul class="primary-input">';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
foreach ( $values as $key => $value ) {
|
114 |
-
|
115 |
-
|
|
|
|
|
|
|
116 |
}
|
|
|
117 |
echo '</ul>';
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
$this->field_preview_option( 'description', $field );
|
120 |
}
|
121 |
|
@@ -136,6 +203,8 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
136 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
137 |
$field_data = '';
|
138 |
$form_id = $form_data['id'];
|
|
|
|
|
139 |
|
140 |
if ( !empty( $field_atts['input_data'] ) ) {
|
141 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
@@ -143,12 +212,62 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
143 |
}
|
144 |
}
|
145 |
|
146 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
printf( '<ul id="%s" class="%s" %s>', $field_id, $field_class, $field_data );
|
148 |
-
|
|
|
|
|
149 |
$selected = isset( $choice['default'] ) ? '1' : '0' ;
|
150 |
$val = isset( $field['show_values'] ) ? esc_attr( $choice['value'] ) : esc_attr( $choice['label'] );
|
|
|
151 |
printf( '<li class="choice-%d">', $key );
|
|
|
|
|
152 |
printf( '<input type="checkbox" id="wpforms-%d-field_%d_%d" name="wpforms[fields][%d][]" value="%s" %s %s>',
|
153 |
$form_id,
|
154 |
$field['id'],
|
@@ -158,9 +277,12 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
158 |
checked( '1', $selected, false ),
|
159 |
$field_required
|
160 |
);
|
|
|
161 |
printf( '<label class="wpforms-field-label-inline" for="wpforms-%d-field_%d_%d">%s</label>', $form_id, $field['id'], $key, wp_kses_post( $choice['label'] ) );
|
|
|
162 |
echo '</li>';
|
163 |
}
|
|
|
164 |
echo '</ul>';
|
165 |
}
|
166 |
|
@@ -175,39 +297,86 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
175 |
public function format( $field_id, $field_submit, $form_data ) {
|
176 |
|
177 |
$field_submit = (array) $field_submit;
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
$
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
|
|
|
|
192 |
}
|
193 |
}
|
194 |
-
|
195 |
-
$value = !empty( $value ) ? implode( "\n", array_map( 'sanitize_text_field', $value ) ) : '';
|
196 |
|
197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
}
|
201 |
|
202 |
-
|
203 |
-
|
204 |
-
wpforms()->process->fields[$field_id] = array(
|
205 |
-
'name' => $name,
|
206 |
-
'value' => $value,
|
207 |
-
'value_raw' => $value_raw,
|
208 |
-
'id' => absint( $field_id ),
|
209 |
-
'type' => $this->type,
|
210 |
-
);
|
211 |
}
|
212 |
}
|
213 |
new WPForms_Field_Checkbox;
|
24 |
$this->order = 11;
|
25 |
$this->defaults = array(
|
26 |
1 => array(
|
27 |
+
'label' => __( 'First Choice', 'wpforms' ),
|
28 |
+
'value' => '',
|
29 |
'default' => '',
|
30 |
),
|
31 |
2 => array(
|
32 |
+
'label' => __( 'Second Choice', 'wpforms' ),
|
33 |
+
'value' => '',
|
34 |
'default' => '',
|
35 |
),
|
36 |
3 => array(
|
37 |
+
'label' => __( 'Third Choice', 'wpforms' ),
|
38 |
+
'value' => '',
|
39 |
'default' => '',
|
40 |
),
|
41 |
);
|
53 |
// Basic field options
|
54 |
//--------------------------------------------------------------------//
|
55 |
|
56 |
+
// Options open markup
|
57 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'open' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
+
// Label
|
60 |
+
$this->field_option( 'label', $field );
|
61 |
+
|
62 |
+
// Choices
|
63 |
+
$this->field_option( 'choices', $field );
|
64 |
+
|
65 |
+
// Description
|
66 |
$this->field_option( 'description', $field );
|
67 |
+
|
68 |
+
// Required toggle
|
69 |
+
$this->field_option( 'required', $field );
|
70 |
+
|
71 |
+
// Options close markup
|
72 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'close' ) );
|
73 |
|
74 |
//--------------------------------------------------------------------//
|
75 |
// Advanced field options
|
76 |
//--------------------------------------------------------------------//
|
77 |
|
78 |
+
// Options open markup
|
79 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'open' ) );
|
80 |
|
81 |
// Show Values toggle option
|
82 |
$tooltip = __( 'Check this to manual set form field values.', 'wpforms' );
|
83 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
84 |
$show_values = $this->field_element( 'checkbox', $field, array( 'slug' => 'show_values', 'value' => $show_values, 'desc' => __( 'Show Values', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
85 |
+
$this->field_element( 'row', $field, array( 'slug' => 'show_values', 'content' => $show_values ) );
|
86 |
+
|
87 |
+
// Input columns
|
88 |
+
$this->field_option( 'input_columns', $field );
|
89 |
+
|
90 |
+
// Hide label
|
91 |
+
$this->field_option( 'label_hide', $field );
|
92 |
+
|
93 |
+
// Custom CSS classes
|
94 |
+
$this->field_option( 'css', $field );
|
95 |
+
|
96 |
+
// Dynamic choice auto-populating toggle
|
97 |
+
$this->field_option( 'dynamic_choices', $field );
|
98 |
+
|
99 |
+
// Dynamic choice source
|
100 |
+
$this->field_option( 'dynamic_choices_source', $field );
|
101 |
|
102 |
+
// Options close markup
|
|
|
|
|
103 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'close' ) );
|
104 |
}
|
105 |
|
112 |
public function field_preview( $field ) {
|
113 |
|
114 |
$values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
115 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
116 |
|
117 |
+
// Label
|
118 |
$this->field_preview_option( 'label', $field );
|
119 |
|
120 |
+
// Field checkbox elements
|
121 |
echo '<ul class="primary-input">';
|
122 |
+
|
123 |
+
// Check to see if this field is configured for Dynamic Choices,
|
124 |
+
// either auto populating from a post type or a taxonomy.
|
125 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_post_type'] ) ) {
|
126 |
+
|
127 |
+
// Post type dynamic populating
|
128 |
+
$source = $field['dynamic_post_type'];
|
129 |
+
$total = wp_count_posts( $source );
|
130 |
+
$total = $total->publish;
|
131 |
+
$args = array(
|
132 |
+
'post_type' => $source,
|
133 |
+
'posts_per_page' => 20,
|
134 |
+
'orderby' => 'title',
|
135 |
+
'order' => 'ASC' ,
|
136 |
+
);
|
137 |
+
$posts = get_posts( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $this->form_id ) );
|
138 |
+
$values = array();
|
139 |
+
|
140 |
+
foreach ( $posts as $post ) {
|
141 |
+
$values[] = array( 'label' => $post->post_title );
|
142 |
+
}
|
143 |
+
|
144 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
145 |
+
|
146 |
+
// Taxonomy dynamic populating
|
147 |
+
$source = $field['dynamic_taxonomy'];
|
148 |
+
$total = wp_count_terms( $source );
|
149 |
+
$args = array(
|
150 |
+
'taxonomy' => $source,
|
151 |
+
'hide_empty' => false,
|
152 |
+
'number' => 20
|
153 |
+
);
|
154 |
+
$terms = get_terms( apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $this->form_id ) );
|
155 |
+
$values = array();
|
156 |
+
|
157 |
+
foreach ( $terms as $term ) {
|
158 |
+
$values[] = array( 'label' => $term->name );
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
// Notify if currently empty
|
163 |
+
if ( empty( $values ) ) {
|
164 |
+
$values = array( 'label' => __( '(empty)', 'wpforms' ) );
|
165 |
+
}
|
166 |
+
|
167 |
+
// Individual checkbox options
|
168 |
foreach ( $values as $key => $value ) {
|
169 |
+
|
170 |
+
$default = isset( $value['default'] ) ? $value['default'] : '';
|
171 |
+
$selected = checked( '1', $default, false );
|
172 |
+
|
173 |
+
printf( '<li><input type="checkbox" %s disabled>%s</li>', $selected, $value['label'] );
|
174 |
}
|
175 |
+
|
176 |
echo '</ul>';
|
177 |
|
178 |
+
// Dynamic population is enabled and contains more than 20 items
|
179 |
+
if ( isset( $total ) && $total > 20 ) {
|
180 |
+
echo '<div class="wpforms-alert-dynamic wpforms-alert wpforms-alert-warning">';
|
181 |
+
printf( __( 'Showing the first 20 choices.<br> All %d choices will be displayed when viewing the form.', 'wpforms' ), absint( $total ) );
|
182 |
+
echo '</div>';
|
183 |
+
}
|
184 |
+
|
185 |
+
// Description
|
186 |
$this->field_preview_option( 'description', $field );
|
187 |
}
|
188 |
|
203 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
204 |
$field_data = '';
|
205 |
$form_id = $form_data['id'];
|
206 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
207 |
+
$choices = $field['choices'];
|
208 |
|
209 |
if ( !empty( $field_atts['input_data'] ) ) {
|
210 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
212 |
}
|
213 |
}
|
214 |
|
215 |
+
// Check to see if this field is configured for Dynamic Choices,
|
216 |
+
// either auto populating from a post type or a taxonomy.
|
217 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_post_type'] ) ) {
|
218 |
+
|
219 |
+
// Post type dynamic populating
|
220 |
+
$source = $field['dynamic_post_type'];
|
221 |
+
$args = array(
|
222 |
+
'post_type' => $source,
|
223 |
+
'posts_per_page' => -1,
|
224 |
+
'orderby' => 'title',
|
225 |
+
'order' => 'ASC' ,
|
226 |
+
);
|
227 |
+
$posts = apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $form_data['id'] );
|
228 |
+
$choices = array();
|
229 |
+
|
230 |
+
foreach ( $posts as $post ) {
|
231 |
+
$choices[] = array(
|
232 |
+
'value' => $post->ID,
|
233 |
+
'label' => $post->post_title
|
234 |
+
);
|
235 |
+
}
|
236 |
+
|
237 |
+
$field['show_values'] = true;
|
238 |
+
|
239 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
240 |
+
|
241 |
+
// Taxonomy dynamic populating
|
242 |
+
$source = $field['dynamic_taxonomy'];
|
243 |
+
$args = array(
|
244 |
+
'taxonomy' => $source,
|
245 |
+
'hide_empty' => false,
|
246 |
+
);
|
247 |
+
$terms = get_terms( apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $form_data['id'] ) );
|
248 |
+
$choices = array();
|
249 |
+
|
250 |
+
foreach ( $terms as $term ) {
|
251 |
+
$choices[] = array(
|
252 |
+
'value' => $term->term_id,
|
253 |
+
'label' => $term->name
|
254 |
+
);
|
255 |
+
}
|
256 |
+
|
257 |
+
$field['show_values'] = true;
|
258 |
+
}
|
259 |
+
|
260 |
+
// List
|
261 |
printf( '<ul id="%s" class="%s" %s>', $field_id, $field_class, $field_data );
|
262 |
+
|
263 |
+
foreach( $choices as $key=> $choice ) {
|
264 |
+
|
265 |
$selected = isset( $choice['default'] ) ? '1' : '0' ;
|
266 |
$val = isset( $field['show_values'] ) ? esc_attr( $choice['value'] ) : esc_attr( $choice['label'] );
|
267 |
+
|
268 |
printf( '<li class="choice-%d">', $key );
|
269 |
+
|
270 |
+
// Checkbox elements
|
271 |
printf( '<input type="checkbox" id="wpforms-%d-field_%d_%d" name="wpforms[fields][%d][]" value="%s" %s %s>',
|
272 |
$form_id,
|
273 |
$field['id'],
|
277 |
checked( '1', $selected, false ),
|
278 |
$field_required
|
279 |
);
|
280 |
+
|
281 |
printf( '<label class="wpforms-field-label-inline" for="wpforms-%d-field_%d_%d">%s</label>', $form_id, $field['id'], $key, wp_kses_post( $choice['label'] ) );
|
282 |
+
|
283 |
echo '</li>';
|
284 |
}
|
285 |
+
|
286 |
echo '</ul>';
|
287 |
}
|
288 |
|
297 |
public function format( $field_id, $field_submit, $form_data ) {
|
298 |
|
299 |
$field_submit = (array) $field_submit;
|
300 |
+
$field = $form_data['fields'][$field_id];
|
301 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
302 |
+
$name = sanitize_text_field( $field['label'] );
|
303 |
+
$value_raw = implode( "\n", array_map( 'sanitize_text_field', $field_submit ) );
|
304 |
+
$value = '';
|
305 |
|
306 |
+
$data = array(
|
307 |
+
'name' => $name,
|
308 |
+
'value' => '',
|
309 |
+
'value_raw' => $value_raw,
|
310 |
+
'id' => absint( $field_id ),
|
311 |
+
'type' => $this->type,
|
312 |
+
);
|
313 |
|
314 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_post_type'] ) ) {
|
315 |
+
|
316 |
+
// Dynamic population is enabled using post type
|
317 |
+
$data['dynamic'] = 'post_type';
|
318 |
+
$data['dynamic_post_type'] = absint( $value_raw );
|
319 |
+
|
320 |
+
$source = $field['dynamic_post_type'];
|
321 |
+
$posts = array();
|
322 |
+
|
323 |
+
foreach ( $field_submit as $id ) {
|
324 |
+
$post = get_post( $id );
|
325 |
+
|
326 |
+
if ( ! is_wp_error( $post ) && !empty( $post ) && $source == $post->post_type ) {
|
327 |
+
$posts[] = esc_html( $post->post_title );
|
328 |
}
|
329 |
}
|
|
|
|
|
330 |
|
331 |
+
$data['value'] = !empty( $posts ) ? implode( "\n", array_map( 'sanitize_text_field', $posts ) ) : '';
|
332 |
+
|
333 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
334 |
+
|
335 |
+
// Dynamic population is enabled using taxonomy
|
336 |
+
$data['dynamic'] = 'taxonomy';
|
337 |
+
$data['dynamic_taxonomy'] = absint( $value_raw );
|
338 |
+
|
339 |
+
$source = $field['dynamic_taxonomy'];
|
340 |
+
$terms = array();
|
341 |
+
|
342 |
+
foreach ( $field_submit as $id ) {
|
343 |
+
$term = get_term( $id, $source );
|
344 |
+
|
345 |
+
if ( ! is_wp_error( $term ) && !empty( $term ) ) {
|
346 |
+
$terms[] = esc_html( $term->name );
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
$data['value'] = !empty( $terms ) ? implode( "\n", array_map( 'sanitize_text_field', $terms ) ) : '';
|
351 |
|
352 |
+
} else {
|
353 |
+
|
354 |
+
// Normal processing, dynamic population is off
|
355 |
+
|
356 |
+
// If show_values is true, that means values posted are the raw values
|
357 |
+
// and not the labels. So we need to get the label values.
|
358 |
+
if ( !empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
|
359 |
+
|
360 |
+
$value = array();
|
361 |
+
|
362 |
+
foreach( $field_submit as $field_submit_single ) {
|
363 |
+
foreach( $field['choices'] as $choice ) {
|
364 |
+
if ( $choice['value'] == $field_submit_single ) {
|
365 |
+
$value[] = $choice['label'];
|
366 |
+
break;
|
367 |
+
}
|
368 |
+
}
|
369 |
+
}
|
370 |
+
|
371 |
+
$data['value'] = !empty( $value ) ? implode( "\n", array_map( 'sanitize_text_field', $value ) ) : '';
|
372 |
+
|
373 |
+
} else {
|
374 |
+
$data['value'] = $value_raw;
|
375 |
+
}
|
376 |
}
|
377 |
|
378 |
+
// Push field details to be saved
|
379 |
+
wpforms()->process->fields[$field_id] = $data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
}
|
381 |
}
|
382 |
new WPForms_Field_Checkbox;
|
includes/fields/class-radio.php
CHANGED
@@ -24,18 +24,18 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
24 |
$this->order = 11;
|
25 |
$this->defaults = array(
|
26 |
1 => array(
|
27 |
-
'label'
|
28 |
-
'value'
|
29 |
'default' => '',
|
30 |
),
|
31 |
2 => array(
|
32 |
-
'label'
|
33 |
-
'value'
|
34 |
'default' => '',
|
35 |
),
|
36 |
3 => array(
|
37 |
-
'label'
|
38 |
-
'value'
|
39 |
'default' => '',
|
40 |
),
|
41 |
);
|
@@ -53,37 +53,29 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
53 |
// Basic field options
|
54 |
//--------------------------------------------------------------------//
|
55 |
|
|
|
56 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'open' ) );
|
57 |
-
$this->field_option( 'label', $field );
|
58 |
|
59 |
-
//
|
60 |
-
$
|
61 |
-
$choices_values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
62 |
-
$choices_class = !empty( $field['show_values'] ) && $field['show_values'] == '1' ? 'show-values' : '';
|
63 |
-
$choices = $this->field_element( 'label', $field, array( 'slug' => 'choices', 'value' => __( 'Choices', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
64 |
-
$choices .= sprintf( '<ul data-next-id="%s" class="%s" data-field-id="%d" data-field-type="%s">', max( array_keys( $choices_values ) ) +1, $choices_class, $field['id'], $this->type );
|
65 |
-
foreach ( $choices_values as $key => $value ) {
|
66 |
-
$value['default'] = isset( $value['default'] ) ? $value['default'] : '';
|
67 |
-
$choices .= '<li data-key="' . absint( $key ) . '">';
|
68 |
-
$choices .= sprintf( '<input type="radio" name="fields[%s][choices][%s][default]" class="default" value="1" %s>', $field['id'], $key, checked( '1', $value['default'], false ) );
|
69 |
-
$choices .= '<span class="move"><i class="fa fa-bars"></i></span>';
|
70 |
-
$choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][label]" value="%s" class="label">', $field['id'], $key, esc_attr( $value['label'] ) );
|
71 |
-
$choices .= '<a class="add" href="#"><i class="fa fa-plus-circle"></i></a>';
|
72 |
-
$choices .= '<a class="remove" href="#"><i class="fa fa-minus-circle"></i></a>';
|
73 |
-
$choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][value]" value="%s" class="value">', $field['id'], $key, esc_attr( $value['value'] ) );
|
74 |
-
$choices .= '</li>';
|
75 |
-
}
|
76 |
-
$choices .= '</ul>';
|
77 |
-
$this->field_element( 'row', $field, array( 'slug' => 'choices', 'content' => $choices ) );
|
78 |
|
79 |
-
|
80 |
-
$this->field_option( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'close' ) );
|
82 |
|
83 |
//--------------------------------------------------------------------//
|
84 |
// Advanced field options
|
85 |
//--------------------------------------------------------------------//
|
86 |
|
|
|
87 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'open' ) );
|
88 |
|
89 |
// Show Values toggle option
|
@@ -92,9 +84,22 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
92 |
$show_values = $this->field_element( 'checkbox', $field, array( 'slug' => 'show_values', 'value' => $show_values, 'desc' => __( 'Show Values', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
93 |
$this->field_element( 'row', $field, array( 'slug' => 'show_values', 'content' => $show_values ) );
|
94 |
|
95 |
-
|
96 |
-
$this->field_option( '
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'close' ) );
|
99 |
}
|
100 |
|
@@ -106,17 +111,78 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
106 |
*/
|
107 |
public function field_preview( $field ) {
|
108 |
|
109 |
-
$values
|
|
|
110 |
|
|
|
111 |
$this->field_preview_option( 'label', $field );
|
112 |
|
|
|
113 |
echo '<ul class="primary-input">';
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
echo '</ul>';
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
$this->field_preview_option( 'description', $field );
|
121 |
}
|
122 |
|
@@ -136,6 +202,8 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
136 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
137 |
$field_data = '';
|
138 |
$form_id = absint( $form_data['id'] );
|
|
|
|
|
139 |
|
140 |
if ( !empty( $field_atts['input_data'] ) ) {
|
141 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
@@ -143,12 +211,62 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
143 |
}
|
144 |
}
|
145 |
|
146 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
printf( '<ul id="%s" class="%s" %s>', $field_id, $field_class, $field_data );
|
148 |
-
|
|
|
|
|
149 |
$selected = isset( $choice['default'] ) ? '1' : '0';
|
150 |
-
$val = isset( $field['show_values'] ) ?
|
|
|
151 |
printf( '<li class="choice-%d">', $key );
|
|
|
|
|
152 |
printf( '<input type="radio" id="wpforms-%s-field_%d_%d" name="wpforms[fields][%d]" value="%s" %s %s>',
|
153 |
$form_id,
|
154 |
$field['id'],
|
@@ -158,9 +276,12 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
158 |
checked( '1', $selected, false ),
|
159 |
$field_required
|
160 |
);
|
|
|
161 |
printf( '<label class="wpforms-field-label-inline" for="wpforms-%d-field_%d_%d">%s</label>', $form_id, $field['id'], $key, wp_kses_post( $choice['label'] ) );
|
|
|
162 |
echo '</li>';
|
163 |
}
|
|
|
164 |
echo '</ul>';
|
165 |
}
|
166 |
|
@@ -174,34 +295,70 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
174 |
*/
|
175 |
public function format( $field_id, $field_submit, $form_data ) {
|
176 |
|
177 |
-
|
178 |
-
$
|
|
|
|
|
|
|
179 |
|
180 |
-
|
181 |
-
// and not the labels. So we need to get the label values.
|
182 |
-
if ( !empty( $form_data['fields'][$field_id]['show_values'] ) && '1' == $form_data['fields'][$field_id]['show_values'] ) {
|
183 |
-
foreach( $form_data['fields'][$field_id]['choices'] as $choice ) {
|
184 |
-
if ( $choice['value'] == $field_submit ) {
|
185 |
-
$value = $choice['label'];
|
186 |
-
break;
|
187 |
-
}
|
188 |
-
}
|
189 |
-
$value = isset( $value ) ? sanitize_text_field( $value ) : '';
|
190 |
-
|
191 |
-
} else {
|
192 |
-
|
193 |
-
$value = $value_raw;
|
194 |
-
}
|
195 |
-
|
196 |
-
$name = !empty( $form_data['fields'][$field_id]['label'] ) ? sanitize_text_field( $form_data['fields'][$field_id]['label'] ) : '';
|
197 |
-
|
198 |
-
wpforms()->process->fields[$field_id] = array(
|
199 |
'name' => $name,
|
200 |
-
'value' =>
|
201 |
'value_raw' => $value_raw,
|
202 |
'id' => absint( $field_id ),
|
203 |
'type' => $this->type,
|
204 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
}
|
206 |
}
|
207 |
new WPForms_Field_Radio;
|
24 |
$this->order = 11;
|
25 |
$this->defaults = array(
|
26 |
1 => array(
|
27 |
+
'label' => __( 'First Choice', 'wpforms' ),
|
28 |
+
'value' => '',
|
29 |
'default' => '',
|
30 |
),
|
31 |
2 => array(
|
32 |
+
'label' => __( 'Second Choice', 'wpforms' ),
|
33 |
+
'value' => '',
|
34 |
'default' => '',
|
35 |
),
|
36 |
3 => array(
|
37 |
+
'label' => __( 'Third Choice', 'wpforms' ),
|
38 |
+
'value' => '',
|
39 |
'default' => '',
|
40 |
),
|
41 |
);
|
53 |
// Basic field options
|
54 |
//--------------------------------------------------------------------//
|
55 |
|
56 |
+
// Options open markup
|
57 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'open' ) );
|
|
|
58 |
|
59 |
+
// Label
|
60 |
+
$this->field_option( 'label', $field );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
+
// Choices
|
63 |
+
$this->field_option( 'choices', $field );
|
64 |
+
|
65 |
+
// Description
|
66 |
+
$this->field_option( 'description', $field );
|
67 |
+
|
68 |
+
// Required toggle
|
69 |
+
$this->field_option( 'required', $field );
|
70 |
+
|
71 |
+
// Options close markup
|
72 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'close' ) );
|
73 |
|
74 |
//--------------------------------------------------------------------//
|
75 |
// Advanced field options
|
76 |
//--------------------------------------------------------------------//
|
77 |
|
78 |
+
// Options open markup
|
79 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'open' ) );
|
80 |
|
81 |
// Show Values toggle option
|
84 |
$show_values = $this->field_element( 'checkbox', $field, array( 'slug' => 'show_values', 'value' => $show_values, 'desc' => __( 'Show Values', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
85 |
$this->field_element( 'row', $field, array( 'slug' => 'show_values', 'content' => $show_values ) );
|
86 |
|
87 |
+
// Input columns
|
88 |
+
$this->field_option( 'input_columns', $field );
|
89 |
+
|
90 |
+
// Hide label
|
91 |
+
$this->field_option( 'label_hide', $field );
|
92 |
+
|
93 |
+
// Custom CSS classes
|
94 |
+
$this->field_option( 'css', $field );
|
95 |
+
|
96 |
+
// Dynamic choice auto-populating toggle
|
97 |
+
$this->field_option( 'dynamic_choices', $field );
|
98 |
+
|
99 |
+
// Dynamic choice source
|
100 |
+
$this->field_option( 'dynamic_choices_source', $field );
|
101 |
+
|
102 |
+
// Options close markup
|
103 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'close' ) );
|
104 |
}
|
105 |
|
111 |
*/
|
112 |
public function field_preview( $field ) {
|
113 |
|
114 |
+
$values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
115 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
116 |
|
117 |
+
// Label
|
118 |
$this->field_preview_option( 'label', $field );
|
119 |
|
120 |
+
// Field radio elements
|
121 |
echo '<ul class="primary-input">';
|
122 |
+
|
123 |
+
// Check to see if this field is configured for Dynamic Choices,
|
124 |
+
// either auto populating from a post type or a taxonomy.
|
125 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_post_type'] ) ) {
|
126 |
+
|
127 |
+
// Post type dynamic populating
|
128 |
+
$source = $field['dynamic_post_type'];
|
129 |
+
$total = wp_count_posts( $source );
|
130 |
+
$total = $total->publish;
|
131 |
+
$args = array(
|
132 |
+
'post_type' => $source,
|
133 |
+
'posts_per_page' => 20,
|
134 |
+
'orderby' => 'title',
|
135 |
+
'order' => 'ASC' ,
|
136 |
+
);
|
137 |
+
$posts = get_posts( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $this->form_id ) );
|
138 |
+
$values = array();
|
139 |
+
|
140 |
+
foreach ( $posts as $post ) {
|
141 |
+
$values[] = array( 'label' => $post->post_title );
|
142 |
+
}
|
143 |
+
|
144 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
145 |
+
|
146 |
+
// Taxonomy dynamic populating
|
147 |
+
$source = $field['dynamic_taxonomy'];
|
148 |
+
$total = wp_count_terms( $source );
|
149 |
+
$args = array(
|
150 |
+
'taxonomy' => $source,
|
151 |
+
'hide_empty' => false,
|
152 |
+
'number' => 20
|
153 |
+
);
|
154 |
+
$terms = get_terms( apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $this->form_id ) );
|
155 |
+
$values = array();
|
156 |
+
|
157 |
+
foreach ( $terms as $term ) {
|
158 |
+
$values[] = array( 'label' => $term->name );
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
// Notify if currently empty
|
163 |
+
if ( empty( $values ) ) {
|
164 |
+
$values = array( 'label' => __( '(empty)', 'wpforms' ) );
|
165 |
+
}
|
166 |
+
|
167 |
+
// Individual radio options
|
168 |
+
foreach ( $values as $key => $value ) {
|
169 |
+
|
170 |
+
$default = isset( $value['default'] ) ? $value['default'] : '';
|
171 |
+
$selected = checked( '1', $default, false );
|
172 |
+
|
173 |
+
printf( '<li><input type="radio" %s disabled>%s</li>', $selected, $value['label'] );
|
174 |
+
}
|
175 |
+
|
176 |
echo '</ul>';
|
177 |
+
|
178 |
+
// Dynamic population is enabled and contains more than 20 items
|
179 |
+
if ( isset( $total ) && $total > 20 ) {
|
180 |
+
echo '<div class="wpforms-alert-dynamic wpforms-alert wpforms-alert-warning">';
|
181 |
+
printf( __( 'Showing the first 20 choices.<br> All %d choices will be displayed when viewing the form.', 'wpforms' ), absint( $total ) );
|
182 |
+
echo '</div>';
|
183 |
+
}
|
184 |
+
|
185 |
+
// Description
|
186 |
$this->field_preview_option( 'description', $field );
|
187 |
}
|
188 |
|
202 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
203 |
$field_data = '';
|
204 |
$form_id = absint( $form_data['id'] );
|
205 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
206 |
+
$choices = $field['choices'];
|
207 |
|
208 |
if ( !empty( $field_atts['input_data'] ) ) {
|
209 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
211 |
}
|
212 |
}
|
213 |
|
214 |
+
// Check to see if this field is configured for Dynamic Choices,
|
215 |
+
// either auto populating from a post type or a taxonomy.
|
216 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_post_type'] ) ) {
|
217 |
+
|
218 |
+
// Post type dynamic populating
|
219 |
+
$source = $field['dynamic_post_type'];
|
220 |
+
$args = array(
|
221 |
+
'post_type' => $source,
|
222 |
+
'posts_per_page' => -1,
|
223 |
+
'orderby' => 'title',
|
224 |
+
'order' => 'ASC' ,
|
225 |
+
);
|
226 |
+
$posts = apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $form_data['id'] );
|
227 |
+
$choices = array();
|
228 |
+
|
229 |
+
foreach ( $posts as $post ) {
|
230 |
+
$choices[] = array(
|
231 |
+
'value' => $post->ID,
|
232 |
+
'label' => $post->post_title
|
233 |
+
);
|
234 |
+
}
|
235 |
+
|
236 |
+
$field['show_values'] = true;
|
237 |
+
|
238 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
239 |
+
|
240 |
+
// Taxonomy dynamic populating
|
241 |
+
$source = $field['dynamic_taxonomy'];
|
242 |
+
$args = array(
|
243 |
+
'taxonomy' => $source,
|
244 |
+
'hide_empty' => false,
|
245 |
+
);
|
246 |
+
$terms = get_terms( apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $form_data['id'] ) );
|
247 |
+
$choices = array();
|
248 |
+
|
249 |
+
foreach ( $terms as $term ) {
|
250 |
+
$choices[] = array(
|
251 |
+
'value' => $term->term_id,
|
252 |
+
'label' => $term->name
|
253 |
+
);
|
254 |
+
}
|
255 |
+
|
256 |
+
$field['show_values'] = true;
|
257 |
+
}
|
258 |
+
|
259 |
+
// List
|
260 |
printf( '<ul id="%s" class="%s" %s>', $field_id, $field_class, $field_data );
|
261 |
+
|
262 |
+
foreach( $choices as $key => $choice ) {
|
263 |
+
|
264 |
$selected = isset( $choice['default'] ) ? '1' : '0';
|
265 |
+
$val = isset( $field['show_values'] ) ? esc_attr( $choice['value'] ) : esc_attr( $choice['label'] );
|
266 |
+
|
267 |
printf( '<li class="choice-%d">', $key );
|
268 |
+
|
269 |
+
// Radio elements
|
270 |
printf( '<input type="radio" id="wpforms-%s-field_%d_%d" name="wpforms[fields][%d]" value="%s" %s %s>',
|
271 |
$form_id,
|
272 |
$field['id'],
|
276 |
checked( '1', $selected, false ),
|
277 |
$field_required
|
278 |
);
|
279 |
+
|
280 |
printf( '<label class="wpforms-field-label-inline" for="wpforms-%d-field_%d_%d">%s</label>', $form_id, $field['id'], $key, wp_kses_post( $choice['label'] ) );
|
281 |
+
|
282 |
echo '</li>';
|
283 |
}
|
284 |
+
|
285 |
echo '</ul>';
|
286 |
}
|
287 |
|
295 |
*/
|
296 |
public function format( $field_id, $field_submit, $form_data ) {
|
297 |
|
298 |
+
$field = $form_data['fields'][$field_id];
|
299 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
300 |
+
$name = sanitize_text_field( $field['label'] );
|
301 |
+
$value_raw = sanitize_text_field( $field_submit );
|
302 |
+
$value = '';
|
303 |
|
304 |
+
$data = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
'name' => $name,
|
306 |
+
'value' => '',
|
307 |
'value_raw' => $value_raw,
|
308 |
'id' => absint( $field_id ),
|
309 |
'type' => $this->type,
|
310 |
);
|
311 |
+
|
312 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_post_type'] ) ) {
|
313 |
+
|
314 |
+
// Dynamic population is enabled using post type
|
315 |
+
$data['dynamic'] = 'post_type';
|
316 |
+
$data['dynamic_post_type'] = absint( $value_raw );
|
317 |
+
|
318 |
+
$source = $field['dynamic_post_type'];
|
319 |
+
$post = get_post( $value_raw );
|
320 |
+
|
321 |
+
if ( ! is_wp_error( $post ) && !empty( $post ) && $source == $post->post_type ) {
|
322 |
+
$data['value'] = esc_html( $post->post_title );
|
323 |
+
}
|
324 |
+
|
325 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
326 |
+
|
327 |
+
// Dynamic population is enabled using taxonomy
|
328 |
+
$data['dynamic'] = 'taxonomy';
|
329 |
+
$data['dynamic_taxonomy'] = absint( $value_raw );
|
330 |
+
|
331 |
+
$source = $field['dynamic_taxonomy'];
|
332 |
+
$term = get_term( $value_raw, $source );
|
333 |
+
|
334 |
+
if ( ! is_wp_error( $term ) && !empty( $term ) ) {
|
335 |
+
$data['value'] = esc_html( $term->name );
|
336 |
+
}
|
337 |
+
|
338 |
+
} else {
|
339 |
+
|
340 |
+
// Normal processing, dynamic population is off
|
341 |
+
|
342 |
+
// If show_values is true, that means values posted are the raw values
|
343 |
+
// and not the labels. So we need to get the label values.
|
344 |
+
if ( !empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
|
345 |
+
|
346 |
+
foreach ( $field['choices'] as $choice ) {
|
347 |
+
if ( $choice['value'] === $field_submit ) {
|
348 |
+
$value = $choice['label'];
|
349 |
+
break;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
$data['value'] = sanitize_text_field( $value );
|
354 |
+
|
355 |
+
} else {
|
356 |
+
$data['value'] = $value_raw;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
|
360 |
+
// Push field details to be saved
|
361 |
+
wpforms()->process->fields[$field_id] = $data;
|
362 |
}
|
363 |
}
|
364 |
new WPForms_Field_Radio;
|
includes/fields/class-select.php
CHANGED
@@ -53,49 +53,56 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
53 |
// Basic field options
|
54 |
//--------------------------------------------------------------------//
|
55 |
|
|
|
56 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'open' ) );
|
57 |
-
$this->field_option( 'label', $field );
|
58 |
|
59 |
-
//
|
60 |
-
$
|
61 |
-
|
62 |
-
|
63 |
-
$
|
64 |
-
$choices .= sprintf( '<ul data-next-id="%s" class="%s" data-field-id="%d" data-field-type="%s">', max( array_keys( $choices_values ) ) +1, $choices_class, $field['id'], $this->type );
|
65 |
-
foreach ( $choices_values as $key => $value ) {
|
66 |
-
$value['default'] = !empty( $choices_values['default'] ) ? $choices_values['default'] : '';
|
67 |
-
$choices .= '<li data-key="' . absint( $key ) . '">';
|
68 |
-
$choices .= sprintf( '<input type="radio" name="fields[%s][choices][%s][default]" class="default" value="1" %s>', $field['id'], $key, checked( '1', $value['default'], false ) );
|
69 |
-
$choices .= '<span class="move"><i class="fa fa-bars"></i></span>';
|
70 |
-
$choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][label]" value="%s" class="label">', $field['id'], $key, esc_attr( $value['label'] ) );
|
71 |
-
$choices .= '<a class="add" href="#"><i class="fa fa-plus-circle"></i></a>';
|
72 |
-
$choices .= '<a class="remove" href="#"><i class="fa fa-minus-circle"></i></a>';
|
73 |
-
$choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][value]" value="%s" class="value">', $field['id'], $key, esc_attr( $value['value'] ) );
|
74 |
-
$choices .= '</li>';
|
75 |
-
}
|
76 |
-
$choices .= '</ul>';
|
77 |
-
$this->field_element( 'row', $field, array( 'slug' => 'choices', 'content' => $choices ) );
|
78 |
|
79 |
-
|
80 |
-
$this->field_option( '
|
|
|
|
|
|
|
|
|
|
|
81 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'close' ) );
|
82 |
|
83 |
//--------------------------------------------------------------------//
|
84 |
// Advanced field options
|
85 |
//--------------------------------------------------------------------//
|
86 |
|
|
|
87 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'open' ) );
|
88 |
|
89 |
// Show Values toggle option
|
90 |
$tooltip = __( 'Check this to manual set form field values.', 'wpforms' );
|
91 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
92 |
$show_values = $this->field_element( 'checkbox', $field, array( 'slug' => 'show_values', 'value' => $show_values, 'desc' => __( 'Show Values', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
93 |
-
$this->field_element( 'row',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
-
|
96 |
-
$this->field_option( '
|
97 |
-
|
98 |
-
|
99 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'close' ) );
|
100 |
}
|
101 |
|
@@ -109,20 +116,72 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
109 |
|
110 |
$placeholder = !empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
|
111 |
$values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
|
|
112 |
|
|
|
113 |
$this->field_preview_option( 'label', $field );
|
114 |
|
|
|
115 |
echo '<select class="primary-input" disabled>';
|
|
|
|
|
116 |
if ( !empty( $placeholder ) ) {
|
117 |
printf( '<option value="" class="placeholder" selected>%s</option>', $placeholder );
|
118 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
foreach ( $values as $key => $value ) {
|
120 |
-
|
121 |
-
$
|
|
|
|
|
122 |
printf( '<option %s>%s</option>', $selected, $value['label'] );
|
123 |
}
|
|
|
124 |
echo '</select>';
|
125 |
|
|
|
126 |
$this->field_preview_option( 'description', $field );
|
127 |
}
|
128 |
|
@@ -141,7 +200,9 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
141 |
$field_required = !empty( $field['required'] ) ? ' required' : '';
|
142 |
$field_class = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_class'] ) );
|
143 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
144 |
-
$field_data = '';
|
|
|
|
|
145 |
|
146 |
if ( !empty( $field_atts['input_data'] ) ) {
|
147 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
@@ -157,14 +218,66 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
157 |
$field_required,
|
158 |
$field_data
|
159 |
);
|
|
|
|
|
160 |
if ( !empty( $field_placeholder ) ) {
|
161 |
printf('<option class="placeholder" selected disabled>%s</option>', $field_placeholder );
|
162 |
}
|
163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
$selected = isset( $choice['default'] ) && empty( $field_placeholder ) ? '1' : '0' ;
|
165 |
-
$val = isset( $field['show_values'] ) ?
|
|
|
166 |
printf( '<option value="%s" %s>%s</option>', $val, selected( '1', $selected, false ), $choice['label'] );
|
167 |
}
|
|
|
168 |
echo '</select>';
|
169 |
}
|
170 |
|
@@ -178,34 +291,70 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
178 |
*/
|
179 |
public function format( $field_id, $field_submit, $form_data ) {
|
180 |
|
181 |
-
|
182 |
-
$
|
|
|
|
|
|
|
183 |
|
184 |
-
|
185 |
-
// and not the labels. So we need to get the label values.
|
186 |
-
if ( !empty( $form_data['fields'][$field_id]['show_values'] ) && '1' == $form_data['fields'][$field_id]['show_values'] ) {
|
187 |
-
foreach( $form_data['fields'][$field_id]['choices'] as $choice ) {
|
188 |
-
if ( $choice['value'] == $field_submit ) {
|
189 |
-
$value = $choice['label'];
|
190 |
-
break;
|
191 |
-
}
|
192 |
-
}
|
193 |
-
$value = isset( $value ) ? sanitize_text_field( $value ) : '';
|
194 |
-
|
195 |
-
} else {
|
196 |
-
|
197 |
-
$value = $value_raw;
|
198 |
-
}
|
199 |
-
|
200 |
-
$name = !empty( $form_data['fields'][$field_id]['label'] ) ? sanitize_text_field( $form_data['fields'][$field_id]['label'] ) : '';
|
201 |
-
|
202 |
-
wpforms()->process->fields[$field_id] = array(
|
203 |
'name' => $name,
|
204 |
-
'value' =>
|
205 |
'value_raw' => $value_raw,
|
206 |
'id' => absint( $field_id ),
|
207 |
'type' => $this->type,
|
208 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
}
|
211 |
new WPForms_Field_Select;
|
53 |
// Basic field options
|
54 |
//--------------------------------------------------------------------//
|
55 |
|
56 |
+
// Options open markup
|
57 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'open' ) );
|
|
|
58 |
|
59 |
+
// Label
|
60 |
+
$this->field_option( 'label', $field );
|
61 |
+
|
62 |
+
// Choices
|
63 |
+
$this->field_option( 'choices', $field );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
+
// Description
|
66 |
+
$this->field_option( 'description', $field );
|
67 |
+
|
68 |
+
// Required toggle
|
69 |
+
$this->field_option( 'required', $field );
|
70 |
+
|
71 |
+
// Options close markup
|
72 |
$this->field_option( 'basic-options', $field, array( 'markup' => 'close' ) );
|
73 |
|
74 |
//--------------------------------------------------------------------//
|
75 |
// Advanced field options
|
76 |
//--------------------------------------------------------------------//
|
77 |
|
78 |
+
// Options open markup
|
79 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'open' ) );
|
80 |
|
81 |
// Show Values toggle option
|
82 |
$tooltip = __( 'Check this to manual set form field values.', 'wpforms' );
|
83 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
84 |
$show_values = $this->field_element( 'checkbox', $field, array( 'slug' => 'show_values', 'value' => $show_values, 'desc' => __( 'Show Values', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
85 |
+
$this->field_element( 'row', $field, array( 'slug' => 'show_values', 'content' => $show_values ) );
|
86 |
+
|
87 |
+
// Size
|
88 |
+
$this->field_option( 'size', $field );
|
89 |
+
|
90 |
+
// Placeholder
|
91 |
+
$this->field_option( 'placeholder', $field );
|
92 |
+
|
93 |
+
// Hide label
|
94 |
+
$this->field_option( 'label_hide', $field );
|
95 |
+
|
96 |
+
// Custom CSS classes
|
97 |
+
$this->field_option( 'css', $field );
|
98 |
+
|
99 |
+
// Dynamic choice auto-populating toggle
|
100 |
+
$this->field_option( 'dynamic_choices', $field );
|
101 |
|
102 |
+
// Dynamic choice source
|
103 |
+
$this->field_option( 'dynamic_choices_source', $field );
|
104 |
+
|
105 |
+
// Options close markup
|
106 |
$this->field_option( 'advanced-options', $field, array( 'markup' => 'close' ) );
|
107 |
}
|
108 |
|
116 |
|
117 |
$placeholder = !empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
|
118 |
$values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
119 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
120 |
|
121 |
+
// Label
|
122 |
$this->field_preview_option( 'label', $field );
|
123 |
|
124 |
+
// Field select element
|
125 |
echo '<select class="primary-input" disabled>';
|
126 |
+
|
127 |
+
// Optional placeholder
|
128 |
if ( !empty( $placeholder ) ) {
|
129 |
printf( '<option value="" class="placeholder" selected>%s</option>', $placeholder );
|
130 |
}
|
131 |
+
|
132 |
+
// Check to see if this field is configured for Dynamic Choices,
|
133 |
+
// either auto populating from a post type or a taxonomy.
|
134 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_post_type'] ) ) {
|
135 |
+
|
136 |
+
// Post type dynamic populating
|
137 |
+
$source = $field['dynamic_post_type'];
|
138 |
+
$args = array(
|
139 |
+
'post_type' => $source,
|
140 |
+
'posts_per_page' => 1,
|
141 |
+
'orderby' => 'title',
|
142 |
+
'order' => 'ASC' ,
|
143 |
+
);
|
144 |
+
$posts = get_posts( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $this->form_id ) );
|
145 |
+
$values = array();
|
146 |
+
|
147 |
+
foreach ( $posts as $post ) {
|
148 |
+
$values[] = array( 'label' => $post->post_title );
|
149 |
+
}
|
150 |
+
|
151 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
152 |
+
|
153 |
+
// Taxonomy dynamic populating
|
154 |
+
$source = $field['dynamic_taxonomy'];
|
155 |
+
$args = array(
|
156 |
+
'taxonomy' => $source,
|
157 |
+
'hide_empty' => false,
|
158 |
+
'number' => 1
|
159 |
+
);
|
160 |
+
$terms = get_terms( apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $this->form_id ) );
|
161 |
+
$values = array();
|
162 |
+
|
163 |
+
foreach ( $terms as $term ) {
|
164 |
+
$values[] = array( 'label' => $term->name );
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
// Notify if currently empty
|
169 |
+
if ( empty( $values ) ) {
|
170 |
+
$values = array( 'label' => __( '(empty)', 'wpforms' ) );
|
171 |
+
}
|
172 |
+
|
173 |
+
// Build the select options (even though user can only see 1st option)
|
174 |
foreach ( $values as $key => $value ) {
|
175 |
+
|
176 |
+
$default = isset( $value['default'] ) ? $value['default'] : '';
|
177 |
+
$selected = !empty( $placeholder ) ? '' : selected( '1', $default, false );
|
178 |
+
|
179 |
printf( '<option %s>%s</option>', $selected, $value['label'] );
|
180 |
}
|
181 |
+
|
182 |
echo '</select>';
|
183 |
|
184 |
+
// Description
|
185 |
$this->field_preview_option( 'description', $field );
|
186 |
}
|
187 |
|
200 |
$field_required = !empty( $field['required'] ) ? ' required' : '';
|
201 |
$field_class = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_class'] ) );
|
202 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
203 |
+
$field_data = '';
|
204 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
205 |
+
$choices = $field['choices'];
|
206 |
|
207 |
if ( !empty( $field_atts['input_data'] ) ) {
|
208 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
218 |
$field_required,
|
219 |
$field_data
|
220 |
);
|
221 |
+
|
222 |
+
// Optional placeholder
|
223 |
if ( !empty( $field_placeholder ) ) {
|
224 |
printf('<option class="placeholder" selected disabled>%s</option>', $field_placeholder );
|
225 |
}
|
226 |
+
|
227 |
+
// Check to see if this field is configured for Dynamic Choices,
|
228 |
+
// either auto populating from a post type or a taxonomy.
|
229 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_post_type'] ) ) {
|
230 |
+
|
231 |
+
// Post type dynamic populating
|
232 |
+
$source = $field['dynamic_post_type'];
|
233 |
+
$args = array(
|
234 |
+
'post_type' => $source,
|
235 |
+
'posts_per_page' => -1,
|
236 |
+
'orderby' => 'title',
|
237 |
+
'order' => 'ASC' ,
|
238 |
+
);
|
239 |
+
$posts = apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $form_data['id'] );
|
240 |
+
$choices = array();
|
241 |
+
|
242 |
+
foreach ( $posts as $post ) {
|
243 |
+
$choices[] = array(
|
244 |
+
'value' => $post->ID,
|
245 |
+
'label' => $post->post_title
|
246 |
+
);
|
247 |
+
}
|
248 |
+
|
249 |
+
$field['show_values'] = true;
|
250 |
+
|
251 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
252 |
+
|
253 |
+
// Taxonomy dynamic populating
|
254 |
+
$source = $field['dynamic_taxonomy'];
|
255 |
+
$args = array(
|
256 |
+
'taxonomy' => $source,
|
257 |
+
'hide_empty' => false,
|
258 |
+
);
|
259 |
+
$terms = get_terms( apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $form_data['id'] ) );
|
260 |
+
$choices = array();
|
261 |
+
|
262 |
+
foreach ( $terms as $term ) {
|
263 |
+
$choices[] = array(
|
264 |
+
'value' => $term->term_id,
|
265 |
+
'label' => $term->name
|
266 |
+
);
|
267 |
+
}
|
268 |
+
|
269 |
+
$field['show_values'] = true;
|
270 |
+
}
|
271 |
+
|
272 |
+
// Build the select options
|
273 |
+
foreach ( $choices as $key => $choice ) {
|
274 |
+
|
275 |
$selected = isset( $choice['default'] ) && empty( $field_placeholder ) ? '1' : '0' ;
|
276 |
+
$val = isset( $field['show_values'] ) ? esc_attr( $choice['value'] ) : esc_attr( $choice['label'] );
|
277 |
+
|
278 |
printf( '<option value="%s" %s>%s</option>', $val, selected( '1', $selected, false ), $choice['label'] );
|
279 |
}
|
280 |
+
|
281 |
echo '</select>';
|
282 |
}
|
283 |
|
291 |
*/
|
292 |
public function format( $field_id, $field_submit, $form_data ) {
|
293 |
|
294 |
+
$field = $form_data['fields'][$field_id];
|
295 |
+
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
296 |
+
$name = sanitize_text_field( $field['label'] );
|
297 |
+
$value_raw = sanitize_text_field( $field_submit );
|
298 |
+
$value = '';
|
299 |
|
300 |
+
$data = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
'name' => $name,
|
302 |
+
'value' => '',
|
303 |
'value_raw' => $value_raw,
|
304 |
'id' => absint( $field_id ),
|
305 |
'type' => $this->type,
|
306 |
);
|
307 |
+
|
308 |
+
if ( 'post_type' == $dynamic && !empty( $field['dynamic_post_type'] ) ) {
|
309 |
+
|
310 |
+
// Dynamic population is enabled using post type
|
311 |
+
$data['dynamic'] = 'post_type';
|
312 |
+
$data['dynamic_post_type'] = absint( $value_raw );
|
313 |
+
|
314 |
+
$source = $field['dynamic_post_type'];
|
315 |
+
$post = get_post( $value_raw );
|
316 |
+
|
317 |
+
if ( ! is_wp_error( $post ) && !empty( $post ) && $source == $post->post_type ) {
|
318 |
+
$data['value'] = esc_html( $post->post_title );
|
319 |
+
}
|
320 |
+
|
321 |
+
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
322 |
+
|
323 |
+
// Dynamic population is enabled using taxonomy
|
324 |
+
$data['dynamic'] = 'taxonomy';
|
325 |
+
$data['dynamic_taxonomy'] = absint( $value_raw );
|
326 |
+
|
327 |
+
$source = $field['dynamic_taxonomy'];
|
328 |
+
$term = get_term( $value_raw, $source );
|
329 |
+
|
330 |
+
if ( ! is_wp_error( $term ) && !empty( $term ) ) {
|
331 |
+
$data['value'] = esc_html( $term->name );
|
332 |
+
}
|
333 |
+
|
334 |
+
} else {
|
335 |
+
|
336 |
+
// Normal processing, dynamic population is off
|
337 |
+
|
338 |
+
// If show_values is true, that means values posted are the raw values
|
339 |
+
// and not the labels. So we need to get the label values.
|
340 |
+
if ( !empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
|
341 |
+
|
342 |
+
foreach ( $field['choices'] as $choice ) {
|
343 |
+
if ( $choice['value'] === $field_submit ) {
|
344 |
+
$value = $choice['label'];
|
345 |
+
break;
|
346 |
+
}
|
347 |
+
}
|
348 |
+
|
349 |
+
$data['value'] = sanitize_text_field( $value );
|
350 |
+
|
351 |
+
} else {
|
352 |
+
$data['value'] = $value_raw;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
// Push field details to be saved
|
357 |
+
wpforms()->process->fields[$field_id] = $data;
|
358 |
}
|
359 |
}
|
360 |
new WPForms_Field_Select;
|
languages/wpforms.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the WPForms package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WPForms 1.2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms\n"
|
7 |
-
"POT-Creation-Date: 2016-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,233 +12,247 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: includes/admin/ajax-actions.php:
|
16 |
msgid "You do no have permission."
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: includes/admin/ajax-actions.php:
|
20 |
msgid "No data provided"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: includes/admin/ajax-actions.php:
|
24 |
msgid "An error occured and the form could not be saved"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: includes/admin/ajax-actions.php:
|
28 |
msgid "No form title provided"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: includes/admin/ajax-actions.php:
|
32 |
msgid "Error creating form"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: includes/admin/ajax-actions.php:
|
36 |
msgid "No form ID provided"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: includes/admin/ajax-actions.php:
|
40 |
msgid "Error updating form template"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: includes/admin/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
#: includes/admin/class-editor.php:96
|
45 |
#: pro/includes/admin/entries/class-entries.php:977
|
46 |
msgid "Cancel"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: includes/admin/builder/class-builder.php:
|
50 |
msgid "OK"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: includes/admin/builder/class-builder.php:
|
54 |
#: includes/admin/class-editor.php:70
|
55 |
msgid "Close"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: includes/admin/builder/class-builder.php:
|
59 |
msgid ""
|
60 |
"Due to form changes, conditional logic rules have been removed or updated:"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: includes/admin/builder/class-builder.php:
|
64 |
#: pro/includes/admin/entries/class-entries-table.php:167
|
65 |
msgid "Field"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: includes/admin/builder/class-builder.php:
|
69 |
msgid "Field Locked"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: includes/admin/builder/class-builder.php:
|
73 |
msgid "This field cannot be deleted because it required by the form template."
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: includes/admin/builder/class-builder.php:
|
77 |
msgid "Available Fields"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: includes/admin/builder/class-builder.php:
|
81 |
msgid "No fields available"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: includes/admin/builder/class-builder.php:
|
85 |
msgid "Heads up!"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: includes/admin/builder/class-builder.php:
|
89 |
msgid "No email fields"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: includes/admin/builder/class-builder.php:
|
93 |
msgid "Are you sure you want to delete this notification?"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: includes/admin/builder/class-builder.php:
|
97 |
msgid "Enter a notification name"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: includes/admin/builder/class-builder.php:
|
101 |
msgid "Eg: User Confirmation"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: includes/admin/builder/class-builder.php:
|
105 |
msgid "You must provide a notification name"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: includes/admin/builder/class-builder.php:
|
109 |
msgid ""
|
110 |
"Form must contain one notification. To disable all notifications use the "
|
111 |
"setting Notifications dropdown setting."
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: includes/admin/builder/class-builder.php:
|
115 |
#: lite/includes/admin/class-settings.php:131
|
116 |
#: pro/includes/admin/class-settings.php:135
|
117 |
msgid "Saving ..."
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: includes/admin/builder/class-builder.php:
|
121 |
msgid "Saved!"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: includes/admin/builder/class-builder.php:
|
125 |
msgid "Save and Exit"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: includes/admin/builder/class-builder.php:
|
129 |
-
#: includes/admin/builder/class-builder.php:
|
130 |
msgid "Loading"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: includes/admin/builder/class-builder.php:
|
134 |
msgid "Use Template"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: includes/admin/builder/class-builder.php:
|
138 |
msgid ""
|
139 |
"Changing templates on an existing form will DELETE existing form fields. Are "
|
140 |
"you sure you want apply the new template?"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: includes/admin/builder/class-builder.php:
|
144 |
msgid ""
|
145 |
"You are almost done. To embed this form on your site, please paste the "
|
146 |
"following shortcode inside a post or page."
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: includes/admin/builder/class-builder.php:
|
150 |
msgid "Or you can follow the instructions in this video."
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: includes/admin/builder/class-builder.php:
|
154 |
-
#: includes/admin/builder/class-builder.php:
|
155 |
msgid "Exit"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: includes/admin/builder/class-builder.php:
|
159 |
msgid "If you exit without saving, your changes will be lost."
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: includes/admin/builder/class-builder.php:
|
163 |
msgid "Are you sure you want to delete this field?"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: includes/admin/builder/class-builder.php:
|
167 |
msgid "Please enter a form title."
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: includes/admin/builder/class-builder.php:
|
171 |
msgid "This item must contain at least one choice."
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: includes/admin/builder/class-builder.php:
|
175 |
-
#: includes/fields/class-base.php:
|
176 |
-
#: pro/wpforms-pro.php:
|
177 |
msgid "Off"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: includes/admin/builder/class-builder.php:
|
181 |
-
#: includes/fields/class-base.php:
|
182 |
-
#: pro/wpforms-pro.php:
|
183 |
msgid "On"
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: includes/admin/builder/class-builder.php:
|
187 |
#: includes/templates/class-suggestion.php:59
|
188 |
msgid "Other"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: includes/admin/builder/class-builder.php:
|
192 |
#: includes/class-frontend.php:482
|
193 |
#: pro/includes/fields/class-page-break.php:144
|
194 |
msgid "Previous"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: includes/admin/builder/class-builder.php:
|
198 |
-
#: includes/admin/builder/functions.php:210 includes/fields/class-base.php:
|
199 |
msgid "Show Smart Tags"
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: includes/admin/builder/class-builder.php:
|
203 |
msgid "Hide Smart Tags"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: includes/admin/builder/class-builder.php:
|
207 |
msgid "-- Select Field --"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: includes/admin/builder/class-builder.php:
|
211 |
-
#: pro/includes/class-provider.php:
|
212 |
msgid "-- Select Choice --"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: includes/admin/builder/class-builder.php:
|
216 |
msgid "Now editing"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: includes/admin/builder/class-builder.php:
|
220 |
#: pro/includes/admin/entries/class-entries.php:511
|
221 |
msgid "Preview Form"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: includes/admin/builder/class-builder.php:
|
225 |
#: includes/admin/overview/class-overview-table.php:159
|
226 |
msgid "Preview"
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: includes/admin/builder/class-builder.php:
|
230 |
msgid "Embed Form"
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: includes/admin/builder/class-builder.php:
|
234 |
msgid "Embed"
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: includes/admin/builder/class-builder.php:
|
238 |
msgid "Save Form"
|
239 |
msgstr ""
|
240 |
|
241 |
-
#: includes/admin/builder/class-builder.php:
|
242 |
#: pro/includes/admin/class-settings.php:441
|
243 |
msgid "Save"
|
244 |
msgstr ""
|
@@ -291,17 +305,17 @@ msgid "You don't have any fields yet. Add some!"
|
|
291 |
msgstr ""
|
292 |
|
293 |
#: includes/admin/builder/panels/class-fields.php:250
|
294 |
-
#: includes/fields/class-base.php:
|
295 |
msgid "Delete Field"
|
296 |
msgstr ""
|
297 |
|
298 |
#: includes/admin/builder/panels/class-fields.php:252
|
299 |
-
#: includes/fields/class-base.php:
|
300 |
msgid "Click to edit. Drag to reorder."
|
301 |
msgstr ""
|
302 |
|
303 |
#: includes/admin/builder/panels/class-settings.php:21
|
304 |
-
#: includes/admin/class-menu.php:84 lite/includes/admin/class-settings.php:
|
305 |
#: pro/includes/admin/class-settings.php:696
|
306 |
msgid "Settings"
|
307 |
msgstr ""
|
@@ -314,13 +328,13 @@ msgid "General"
|
|
314 |
msgstr ""
|
315 |
|
316 |
#: includes/admin/builder/panels/class-settings.php:58
|
317 |
-
#: lite/wpforms-lite.php:60 lite/wpforms-lite.php:70 pro/wpforms-pro.php:
|
318 |
-
#: pro/wpforms-pro.php:
|
319 |
msgid "Notifications"
|
320 |
msgstr ""
|
321 |
|
322 |
#: includes/admin/builder/panels/class-settings.php:59
|
323 |
-
#: includes/admin/builder/panels/class-settings.php:
|
324 |
msgid "Confirmation"
|
325 |
msgstr ""
|
326 |
|
@@ -357,58 +371,68 @@ msgid "Submit Button Text"
|
|
357 |
msgstr ""
|
358 |
|
359 |
#: includes/admin/builder/panels/class-settings.php:132
|
360 |
-
msgid "Submit Button
|
361 |
msgstr ""
|
362 |
|
363 |
#: includes/admin/builder/panels/class-settings.php:133
|
364 |
msgid ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
"Enter CSS class names for the form submit button. Multiple names should be "
|
366 |
"seperated with spaces."
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: includes/admin/builder/panels/class-settings.php:
|
370 |
msgid "Enable anti-spam honeypot"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: includes/admin/builder/panels/class-settings.php:
|
374 |
msgid "Enable reCAPTCHA"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: includes/admin/builder/panels/class-settings.php:
|
378 |
msgid "Confirmation Type"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: includes/admin/builder/panels/class-settings.php:
|
382 |
#: includes/templates/class-suggestion.php:74 lite/wpforms-lite.php:172
|
383 |
-
#: pro/wpforms-pro.php:
|
384 |
msgid "Message"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: includes/admin/builder/panels/class-settings.php:
|
388 |
msgid "Show Page"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: includes/admin/builder/panels/class-settings.php:
|
392 |
msgid "Go to URL (Redirect)"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: includes/admin/builder/panels/class-settings.php:
|
396 |
msgid "Confirmation Message"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: includes/admin/builder/panels/class-settings.php:
|
400 |
msgid "Thanks for contacting us! We will be in touch with you shortly."
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: includes/admin/builder/panels/class-settings.php:
|
404 |
msgid "Automatically scroll to the confirmation message"
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: includes/admin/builder/panels/class-settings.php:
|
408 |
msgid "Confirmation Page"
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: includes/admin/builder/panels/class-settings.php:
|
412 |
msgid "Confirmation Redirect URL"
|
413 |
msgstr ""
|
414 |
|
@@ -477,9 +501,9 @@ msgid ""
|
|
477 |
"a>?"
|
478 |
msgstr ""
|
479 |
|
480 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.2.
|
481 |
#. Plugin Name of the plugin/theme
|
482 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.2.
|
483 |
#. Author of the plugin/theme
|
484 |
#: includes/admin/class-menu.php:39 includes/admin/class-menu.php:40
|
485 |
#: includes/admin/class-menu.php:51
|
@@ -496,7 +520,7 @@ msgstr ""
|
|
496 |
|
497 |
#: includes/admin/class-menu.php:62
|
498 |
#: includes/admin/overview/class-overview.php:148
|
499 |
-
#: pro/includes/class-provider.php:
|
500 |
msgid "Add New"
|
501 |
msgstr ""
|
502 |
|
@@ -506,7 +530,7 @@ msgstr ""
|
|
506 |
|
507 |
#: includes/admin/class-menu.php:72
|
508 |
#: includes/admin/overview/class-overview-table.php:152
|
509 |
-
#: pro/includes/admin/entries/class-entries.php:410 pro/wpforms-pro.php:
|
510 |
msgid "Entries"
|
511 |
msgstr ""
|
512 |
|
@@ -641,7 +665,7 @@ msgstr ""
|
|
641 |
#: includes/admin/overview/class-overview-table.php:191
|
642 |
#: pro/includes/admin/entries/class-entries-table.php:328
|
643 |
#: pro/includes/admin/entries/class-entries-table.php:349
|
644 |
-
#: pro/includes/admin/entries/class-entries.php:
|
645 |
msgid "Delete"
|
646 |
msgstr ""
|
647 |
|
@@ -758,7 +782,7 @@ msgid "WPForms honeypot field triggered."
|
|
758 |
msgstr ""
|
759 |
|
760 |
#: includes/class-process.php:339 lite/wpforms-lite.php:52
|
761 |
-
#: pro/wpforms-pro.php:
|
762 |
msgid "New %s Entry"
|
763 |
msgstr ""
|
764 |
|
@@ -792,7 +816,7 @@ msgstr ""
|
|
792 |
#: pro/includes/fields/class-date-time.php:48
|
793 |
#: pro/includes/fields/class-date-time.php:77
|
794 |
#: pro/includes/fields/class-date-time.php:155
|
795 |
-
#: pro/includes/fields/class-date-time.php:
|
796 |
msgid "Date"
|
797 |
msgstr ""
|
798 |
|
@@ -862,151 +886,189 @@ msgstr ""
|
|
862 |
msgid "Sent from <a href=\"%s\" style=\"color:#bbbbbb;\">%s</a>"
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: includes/fields/class-base.php:
|
866 |
msgid ""
|
867 |
"Enter text for the form field label. Field labels are recommended and can be "
|
868 |
"hidden in the Advanced Settings."
|
869 |
msgstr ""
|
870 |
|
871 |
-
#: includes/fields/class-base.php:
|
872 |
msgid "Label"
|
873 |
msgstr ""
|
874 |
|
875 |
-
#: includes/fields/class-base.php:
|
876 |
msgid "Enter text for the form field description."
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: includes/fields/class-base.php:
|
880 |
msgid "Description"
|
881 |
msgstr ""
|
882 |
|
883 |
-
#: includes/fields/class-base.php:
|
884 |
msgid ""
|
885 |
"Check this option to mark the field required. A form will not submit unless "
|
886 |
"all required fields are provided."
|
887 |
msgstr ""
|
888 |
|
889 |
-
#: includes/fields/class-base.php:
|
890 |
msgid "Required"
|
891 |
msgstr ""
|
892 |
|
893 |
-
#: includes/fields/class-base.php:
|
894 |
msgid "Enter code for the form field."
|
895 |
msgstr ""
|
896 |
|
897 |
-
#: includes/fields/class-base.php:
|
898 |
msgid "Code"
|
899 |
msgstr ""
|
900 |
|
901 |
-
#: includes/fields/class-base.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
msgid "Enter text for the default form field value."
|
903 |
msgstr ""
|
904 |
|
905 |
-
#: includes/fields/class-base.php:
|
906 |
#: includes/fields/class-name.php:96 includes/fields/class-name.php:111
|
907 |
-
#: includes/fields/class-name.php:126
|
908 |
-
#: pro/includes/fields/class-address.php:
|
909 |
-
#: pro/includes/fields/class-address.php:
|
910 |
-
#: pro/includes/fields/class-address.php:
|
911 |
-
#: pro/includes/fields/class-address.php:
|
912 |
-
#: pro/includes/fields/class-address.php:
|
913 |
-
#: pro/includes/fields/class-address.php:
|
914 |
msgid "Default Value"
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: includes/fields/class-base.php:
|
918 |
msgid "Select the default form field size."
|
919 |
msgstr ""
|
920 |
|
921 |
-
#: includes/fields/class-base.php:
|
922 |
msgid "Small"
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: includes/fields/class-base.php:
|
926 |
msgid "Medium"
|
927 |
msgstr ""
|
928 |
|
929 |
-
#: includes/fields/class-base.php:
|
930 |
msgid "Large"
|
931 |
msgstr ""
|
932 |
|
933 |
-
#: includes/fields/class-base.php:
|
934 |
msgid "Field Size"
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: includes/fields/class-base.php:
|
938 |
msgid "Advanced Options"
|
939 |
msgstr ""
|
940 |
|
941 |
-
#: includes/fields/class-base.php:
|
942 |
msgid "Enter text for the form field placeholder."
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: includes/fields/class-base.php:
|
946 |
msgid "Placeholder Text"
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: includes/fields/class-base.php:
|
950 |
msgid ""
|
951 |
"Enter CSS class names for the form field container. Class names should be "
|
952 |
"seperated with spaces."
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: includes/fields/class-base.php:
|
956 |
msgid "CSS Classes"
|
957 |
msgstr ""
|
958 |
|
959 |
-
#: includes/fields/class-base.php:
|
960 |
msgid "Check this option to hide the form field label."
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: includes/fields/class-base.php:
|
964 |
msgid "Hide Label"
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: includes/fields/class-base.php:
|
968 |
msgid "Check this option to hide the form field sub-label."
|
969 |
msgstr ""
|
970 |
|
971 |
-
#: includes/fields/class-base.php:
|
972 |
msgid "Hide Sub-Labels"
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: includes/fields/class-base.php:
|
976 |
msgid "Select the layout for displaying field choices."
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: includes/fields/class-base.php:
|
980 |
msgid "One Column"
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: includes/fields/class-base.php:
|
984 |
msgid "Two Columns"
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: includes/fields/class-base.php:
|
988 |
msgid "Three Columns"
|
989 |
msgstr ""
|
990 |
|
991 |
-
#: includes/fields/class-base.php:
|
992 |
msgid "Choice Layout"
|
993 |
msgstr ""
|
994 |
|
995 |
-
#: includes/fields/class-base.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
996 |
msgid "No form ID found"
|
997 |
msgstr ""
|
998 |
|
999 |
-
#: includes/fields/class-base.php:
|
1000 |
msgid "No field type found"
|
1001 |
msgstr ""
|
1002 |
|
1003 |
-
#: includes/fields/class-base.php:
|
1004 |
#: includes/fields/class-name.php:311 includes/fields/class-number.php:127
|
1005 |
-
#: pro/includes/fields/class-address.php:
|
1006 |
-
#: pro/includes/fields/class-date-time.php:
|
1007 |
#: pro/includes/fields/class-file-upload.php:217
|
1008 |
#: pro/includes/fields/class-payment-multiple.php:177
|
1009 |
-
#: pro/includes/fields/class-payment-single.php:
|
1010 |
#: pro/includes/fields/class-url.php:126
|
1011 |
msgid "This field is required"
|
1012 |
msgstr ""
|
@@ -1030,23 +1092,24 @@ msgstr ""
|
|
1030 |
msgid "Third Choice"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
-
#: includes/fields/class-checkbox.php:
|
1034 |
-
|
1035 |
-
msgid "Add choices for the form field."
|
1036 |
msgstr ""
|
1037 |
|
1038 |
-
#: includes/fields/class-checkbox.php:
|
1039 |
-
#: includes/fields/class-select.php:
|
1040 |
-
msgid "
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: includes/fields/class-checkbox.php:
|
1044 |
-
|
|
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: includes/fields/class-checkbox.php:
|
1048 |
-
|
1049 |
-
|
|
|
1050 |
msgstr ""
|
1051 |
|
1052 |
#: includes/fields/class-email.php:21
|
@@ -1079,7 +1142,7 @@ msgstr ""
|
|
1079 |
msgid "First Middle Last"
|
1080 |
msgstr ""
|
1081 |
|
1082 |
-
#: includes/fields/class-name.php:53
|
1083 |
#: pro/includes/fields/class-date-time.php:51
|
1084 |
#: pro/includes/fields/class-date-time.php:88
|
1085 |
#: pro/includes/fields/class-date-time.php:118
|
@@ -1093,13 +1156,12 @@ msgstr ""
|
|
1093 |
|
1094 |
#: includes/fields/class-name.php:77 includes/fields/class-name.php:92
|
1095 |
#: includes/fields/class-name.php:107 includes/fields/class-name.php:122
|
1096 |
-
#: pro/includes/fields/class-address.php:
|
1097 |
-
#: pro/includes/fields/class-address.php:
|
1098 |
-
#: pro/includes/fields/class-address.php:
|
1099 |
-
#: pro/includes/fields/class-address.php:
|
1100 |
-
#: pro/includes/fields/class-address.php:
|
1101 |
-
#: pro/includes/fields/class-address.php:
|
1102 |
-
#: pro/includes/fields/class-address.php:176
|
1103 |
#: pro/includes/fields/class-date-time.php:80
|
1104 |
#: pro/includes/fields/class-date-time.php:110
|
1105 |
msgid "Placeholder"
|
@@ -1130,17 +1192,17 @@ msgid "Last name field advanced options."
|
|
1130 |
msgstr ""
|
1131 |
|
1132 |
#: includes/fields/class-name.php:160 includes/fields/class-name.php:242
|
1133 |
-
#: pro/includes/class-provider.php:
|
1134 |
msgid "First"
|
1135 |
msgstr ""
|
1136 |
|
1137 |
#: includes/fields/class-name.php:164 includes/fields/class-name.php:260
|
1138 |
-
#: pro/includes/class-provider.php:
|
1139 |
msgid "Middle"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
#: includes/fields/class-name.php:168 includes/fields/class-name.php:287
|
1143 |
-
#: pro/includes/class-provider.php:
|
1144 |
msgid "Last"
|
1145 |
msgstr ""
|
1146 |
|
@@ -1156,7 +1218,7 @@ msgstr ""
|
|
1156 |
msgid "Multiple Choice"
|
1157 |
msgstr ""
|
1158 |
|
1159 |
-
#: includes/fields/class-radio.php:
|
1160 |
msgid "Check this to manually set form field values."
|
1161 |
msgstr ""
|
1162 |
|
@@ -1182,6 +1244,16 @@ msgid ""
|
|
1182 |
"builder."
|
1183 |
msgstr ""
|
1184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1185 |
#: includes/templates/class-contact.php:20
|
1186 |
msgid "Simple Contact Form"
|
1187 |
msgstr ""
|
@@ -1387,41 +1459,49 @@ msgstr ""
|
|
1387 |
msgid "Save General Settings"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
-
#: lite/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1391 |
msgid "Default Notification"
|
1392 |
msgstr ""
|
1393 |
|
1394 |
-
#: lite/wpforms-lite.php:91 pro/wpforms-pro.php:
|
1395 |
msgid "Send To Email Address"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
-
#: lite/wpforms-lite.php:94 pro/wpforms-pro.php:
|
1399 |
msgid ""
|
1400 |
"Enter the email address to receive form entry notifications. For multiple "
|
1401 |
"notifications, seperate email addresses with a comma."
|
1402 |
msgstr ""
|
1403 |
|
1404 |
-
#: lite/wpforms-lite.php:109 pro/wpforms-pro.php:
|
1405 |
msgid "Email Subject"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
-
#: lite/wpforms-lite.php:111 pro/wpforms-pro.php:
|
1409 |
msgid "New Entry: "
|
1410 |
msgstr ""
|
1411 |
|
1412 |
-
#: lite/wpforms-lite.php:125 pro/wpforms-pro.php:
|
1413 |
msgid "From Name"
|
1414 |
msgstr ""
|
1415 |
|
1416 |
-
#: lite/wpforms-lite.php:141 pro/wpforms-pro.php:
|
1417 |
msgid "From Email"
|
1418 |
msgstr ""
|
1419 |
|
1420 |
-
#: lite/wpforms-lite.php:157 pro/wpforms-pro.php:
|
1421 |
msgid "Reply-To"
|
1422 |
msgstr ""
|
1423 |
|
1424 |
-
#: lite/wpforms-lite.php:182 pro/wpforms-pro.php:
|
1425 |
msgid ""
|
1426 |
"To display all form fields, use the <code>{all_fields}</code> Smart Tag."
|
1427 |
msgstr ""
|
@@ -1777,15 +1857,19 @@ msgid "Please upload a valid .json form export file."
|
|
1777 |
msgstr ""
|
1778 |
|
1779 |
#: pro/includes/admin/class-settings.php:590
|
1780 |
-
#: pro/includes/admin/entries/class-entries-export.php:
|
1781 |
msgid "Error"
|
1782 |
msgstr ""
|
1783 |
|
1784 |
#: pro/includes/admin/entries/class-entries-export.php:173
|
|
|
|
|
|
|
|
|
1785 |
msgid "ID"
|
1786 |
msgstr ""
|
1787 |
|
1788 |
-
#: pro/includes/admin/entries/class-entries-export.php:
|
1789 |
msgid "You do not have permission to export entries."
|
1790 |
msgstr ""
|
1791 |
|
@@ -1811,12 +1895,12 @@ msgid "Total"
|
|
1811 |
msgstr ""
|
1812 |
|
1813 |
#: pro/includes/admin/entries/class-entries-table.php:130
|
1814 |
-
#: pro/includes/admin/entries/class-entries.php:
|
1815 |
msgid "Actions"
|
1816 |
msgstr ""
|
1817 |
|
1818 |
#: pro/includes/admin/entries/class-entries-table.php:256
|
1819 |
-
#: pro/includes/admin/entries/class-entries.php:
|
1820 |
msgid "Unknown"
|
1821 |
msgstr ""
|
1822 |
|
@@ -1857,17 +1941,17 @@ msgid "Mark Read"
|
|
1857 |
msgstr ""
|
1858 |
|
1859 |
#: pro/includes/admin/entries/class-entries-table.php:344
|
1860 |
-
#: pro/includes/admin/entries/class-entries.php:
|
1861 |
msgid "Mark Unread"
|
1862 |
msgstr ""
|
1863 |
|
1864 |
#: pro/includes/admin/entries/class-entries-table.php:345
|
1865 |
-
#: pro/includes/admin/entries/class-entries.php:
|
1866 |
msgid "Star"
|
1867 |
msgstr ""
|
1868 |
|
1869 |
#: pro/includes/admin/entries/class-entries-table.php:346
|
1870 |
-
#: pro/includes/admin/entries/class-entries.php:
|
1871 |
msgid "Unstar"
|
1872 |
msgstr ""
|
1873 |
|
@@ -2025,96 +2109,91 @@ msgstr ""
|
|
2025 |
msgid "No notes."
|
2026 |
msgstr ""
|
2027 |
|
2028 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2029 |
-
#: pro/includes/admin/entries/class-entries.php:1086
|
2030 |
-
msgid "M j, Y @ g:ia"
|
2031 |
-
msgstr ""
|
2032 |
-
|
2033 |
-
#: pro/includes/admin/entries/class-entries.php:1012
|
2034 |
msgid "Added by"
|
2035 |
msgstr ""
|
2036 |
|
2037 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2038 |
msgid "on"
|
2039 |
msgstr ""
|
2040 |
|
2041 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2042 |
msgid "Debug Information"
|
2043 |
msgstr ""
|
2044 |
|
2045 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2046 |
msgid "Entry Details"
|
2047 |
msgstr ""
|
2048 |
|
2049 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2050 |
msgid "Entry ID:"
|
2051 |
msgstr ""
|
2052 |
|
2053 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2054 |
msgid "Submitted on:"
|
2055 |
msgstr ""
|
2056 |
|
2057 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2058 |
msgid "Modified on:"
|
2059 |
msgstr ""
|
2060 |
|
2061 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2062 |
msgid "M j, Y @ H:i"
|
2063 |
msgstr ""
|
2064 |
|
2065 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2066 |
msgid "User:"
|
2067 |
msgstr ""
|
2068 |
|
2069 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2070 |
msgid "User IP:"
|
2071 |
msgstr ""
|
2072 |
|
2073 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2074 |
msgid "Stripe"
|
2075 |
msgstr ""
|
2076 |
|
2077 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2078 |
msgid "PayPal Standard"
|
2079 |
msgstr ""
|
2080 |
|
2081 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2082 |
msgid "Payment Details"
|
2083 |
msgstr ""
|
2084 |
|
2085 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2086 |
msgid " Status:"
|
2087 |
msgstr ""
|
2088 |
|
2089 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2090 |
msgid " Total:"
|
2091 |
msgstr ""
|
2092 |
|
2093 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2094 |
msgid " Gateway:"
|
2095 |
msgstr ""
|
2096 |
|
2097 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2098 |
msgid "Test"
|
2099 |
msgstr ""
|
2100 |
|
2101 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2102 |
msgid "Transaction ID:"
|
2103 |
msgstr ""
|
2104 |
|
2105 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2106 |
msgid "Note:"
|
2107 |
msgstr ""
|
2108 |
|
2109 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2110 |
msgid "Print"
|
2111 |
msgstr ""
|
2112 |
|
2113 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2114 |
msgid "Export (CSV)"
|
2115 |
msgstr ""
|
2116 |
|
2117 |
-
#: pro/includes/admin/entries/class-entries.php:
|
2118 |
msgid "Resend Notifications"
|
2119 |
msgstr ""
|
2120 |
|
@@ -2122,107 +2201,107 @@ msgstr ""
|
|
2122 |
msgid "Connection"
|
2123 |
msgstr ""
|
2124 |
|
2125 |
-
#: pro/includes/class-provider.php:149 pro/includes/class-provider.php:
|
2126 |
-
#: pro/includes/class-provider.php:
|
2127 |
msgid "You do not have permission"
|
2128 |
msgstr ""
|
2129 |
|
2130 |
-
#: pro/includes/class-provider.php:
|
2131 |
msgid "Full"
|
2132 |
msgstr ""
|
2133 |
|
2134 |
-
#: pro/includes/class-provider.php:
|
2135 |
msgid "Select Account"
|
2136 |
msgstr ""
|
2137 |
|
2138 |
-
#: pro/includes/class-provider.php:
|
2139 |
msgid "Add New Account"
|
2140 |
msgstr ""
|
2141 |
|
2142 |
-
#: pro/includes/class-provider.php:
|
2143 |
msgid "Select List"
|
2144 |
msgstr ""
|
2145 |
|
2146 |
-
#: pro/includes/class-provider.php:
|
2147 |
msgid "Select Groups"
|
2148 |
msgstr ""
|
2149 |
|
2150 |
-
#: pro/includes/class-provider.php:
|
2151 |
msgid ""
|
2152 |
"We also noticed that you have some segments in your list. You can select "
|
2153 |
"specific list segments below if needed. This is optional."
|
2154 |
msgstr ""
|
2155 |
|
2156 |
-
#: pro/includes/class-provider.php:
|
2157 |
msgid "List Fields"
|
2158 |
msgstr ""
|
2159 |
|
2160 |
-
#: pro/includes/class-provider.php:
|
2161 |
msgid "Available Form Fields"
|
2162 |
msgstr ""
|
2163 |
|
2164 |
-
#: pro/includes/class-provider.php:
|
2165 |
msgid "Conditional Logic"
|
2166 |
msgstr ""
|
2167 |
|
2168 |
-
#: pro/includes/class-provider.php:
|
2169 |
msgid "Enable conditional logic"
|
2170 |
msgstr ""
|
2171 |
|
2172 |
-
#: pro/includes/class-provider.php:
|
2173 |
msgid "Process this form if"
|
2174 |
msgstr ""
|
2175 |
|
2176 |
-
#: pro/includes/class-provider.php:
|
2177 |
msgid "-- Select field --"
|
2178 |
msgstr ""
|
2179 |
|
2180 |
-
#: pro/includes/class-provider.php:
|
2181 |
msgid "is"
|
2182 |
msgstr ""
|
2183 |
|
2184 |
-
#: pro/includes/class-provider.php:
|
2185 |
msgid "is not"
|
2186 |
msgstr ""
|
2187 |
|
2188 |
-
#: pro/includes/class-provider.php:
|
2189 |
msgid "AND"
|
2190 |
msgstr ""
|
2191 |
|
2192 |
-
#: pro/includes/class-provider.php:
|
2193 |
msgid "Add rule group"
|
2194 |
msgstr ""
|
2195 |
|
2196 |
-
#: pro/includes/class-provider.php:
|
2197 |
msgid "Missing data"
|
2198 |
msgstr ""
|
2199 |
|
2200 |
-
#: pro/includes/class-provider.php:
|
2201 |
msgid "Connection missing"
|
2202 |
msgstr ""
|
2203 |
|
2204 |
-
#: pro/includes/class-provider.php:
|
2205 |
msgid "Connected on: "
|
2206 |
msgstr ""
|
2207 |
|
2208 |
-
#: pro/includes/class-provider.php:
|
2209 |
msgid "Disconnect "
|
2210 |
msgstr ""
|
2211 |
|
2212 |
-
#: pro/includes/class-provider.php:
|
2213 |
msgid "Integrate %s with WPForms"
|
2214 |
msgstr ""
|
2215 |
|
2216 |
-
#: pro/includes/class-provider.php:
|
2217 |
msgid "Connected"
|
2218 |
msgstr ""
|
2219 |
|
2220 |
-
#: pro/includes/class-provider.php:
|
2221 |
msgid ""
|
2222 |
"Please fill out all of the fields below to add your new provider account."
|
2223 |
msgstr ""
|
2224 |
|
2225 |
-
#: pro/includes/class-provider.php:
|
2226 |
msgid "Connect to"
|
2227 |
msgstr ""
|
2228 |
|
@@ -2231,58 +2310,66 @@ msgstr ""
|
|
2231 |
msgid "Address"
|
2232 |
msgstr ""
|
2233 |
|
2234 |
-
#: pro/includes/fields/class-address.php:
|
2235 |
-
msgid "
|
2236 |
msgstr ""
|
2237 |
|
2238 |
-
#: pro/includes/fields/class-address.php:
|
2239 |
-
#: pro/includes/fields/class-address.php:
|
2240 |
-
#: pro/includes/fields/class-address.php:
|
2241 |
msgid "Address Line 1"
|
2242 |
msgstr ""
|
2243 |
|
2244 |
-
#: pro/includes/fields/class-address.php:
|
2245 |
-
#: pro/includes/fields/class-address.php:
|
2246 |
-
#: pro/includes/fields/class-address.php:
|
2247 |
msgid "Address Line 2"
|
2248 |
msgstr ""
|
2249 |
|
2250 |
-
#: pro/includes/fields/class-address.php:
|
2251 |
-
#: pro/includes/fields/class-address.php:
|
2252 |
-
#: pro/includes/fields/class-address.php:
|
2253 |
msgid "City"
|
2254 |
msgstr ""
|
2255 |
|
2256 |
-
#: pro/includes/fields/class-address.php:
|
2257 |
-
#: pro/includes/fields/class-address.php:
|
2258 |
-
#: pro/includes/fields/class-address.php:
|
2259 |
msgid "State"
|
2260 |
msgstr ""
|
2261 |
|
2262 |
-
#: pro/includes/fields/class-address.php:
|
2263 |
-
|
2264 |
-
#: pro/includes/fields/class-address.php:472
|
2265 |
-
msgid "State / Province / Region"
|
2266 |
msgstr ""
|
2267 |
|
2268 |
-
#: pro/includes/fields/class-address.php:
|
2269 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2270 |
msgstr ""
|
2271 |
|
2272 |
-
#: pro/includes/fields/class-address.php:
|
2273 |
-
#: pro/includes/fields/class-address.php:
|
2274 |
-
#: pro/includes/fields/class-address.php:540
|
2275 |
msgid "Country"
|
2276 |
msgstr ""
|
2277 |
|
2278 |
-
#: pro/includes/fields/class-address.php:
|
2279 |
-
|
2280 |
-
|
|
|
|
|
|
|
2281 |
msgstr ""
|
2282 |
|
2283 |
-
#: pro/includes/fields/class-address.php:
|
2284 |
-
|
2285 |
-
msgid "Zip / Postal Code"
|
2286 |
msgstr ""
|
2287 |
|
2288 |
#: pro/includes/fields/class-date-time.php:21
|
@@ -2300,7 +2387,7 @@ msgstr ""
|
|
2300 |
#: pro/includes/fields/class-date-time.php:49
|
2301 |
#: pro/includes/fields/class-date-time.php:107
|
2302 |
#: pro/includes/fields/class-date-time.php:159
|
2303 |
-
#: pro/includes/fields/class-date-time.php:
|
2304 |
msgid "Time"
|
2305 |
msgstr ""
|
2306 |
|
@@ -2632,18 +2719,18 @@ msgstr ""
|
|
2632 |
msgid "Item Type"
|
2633 |
msgstr ""
|
2634 |
|
2635 |
-
#: pro/includes/fields/class-payment-single.php:
|
2636 |
-
#: pro/includes/fields/class-payment-single.php:
|
2637 |
msgid "Price"
|
2638 |
msgstr ""
|
2639 |
|
2640 |
-
#: pro/includes/fields/class-payment-single.php:
|
2641 |
msgid ""
|
2642 |
"Note: Item type is set to hidden and will not be visible when viewing the "
|
2643 |
"form."
|
2644 |
msgstr ""
|
2645 |
|
2646 |
-
#: pro/includes/fields/class-payment-single.php:
|
2647 |
msgid "Amount mismatch"
|
2648 |
msgstr ""
|
2649 |
|
@@ -2839,31 +2926,31 @@ msgstr ""
|
|
2839 |
msgid "Click the marketing tab to configure your newsletter service provider"
|
2840 |
msgstr ""
|
2841 |
|
2842 |
-
#: pro/wpforms-pro.php:
|
2843 |
msgid "Disable storing entry information in WordPress"
|
2844 |
msgstr ""
|
2845 |
|
2846 |
-
#: pro/wpforms-pro.php:
|
2847 |
msgid "Add New Notification"
|
2848 |
msgstr ""
|
2849 |
|
2850 |
-
#: pro/wpforms-pro.php:
|
2851 |
msgid "Send"
|
2852 |
msgstr ""
|
2853 |
|
2854 |
-
#: pro/wpforms-pro.php:
|
2855 |
msgid "Don't send"
|
2856 |
msgstr ""
|
2857 |
|
2858 |
-
#: pro/wpforms-pro.php:
|
2859 |
msgid "this notification if"
|
2860 |
msgstr ""
|
2861 |
|
2862 |
-
#: pro/wpforms-pro.php:
|
2863 |
msgid "Email notifications"
|
2864 |
msgstr ""
|
2865 |
|
2866 |
-
#: pro/wpforms-pro.php:
|
2867 |
msgid ""
|
2868 |
"Install the <a href=\"%s\">Conditional Logic add-on</a> to enable "
|
2869 |
"conditional logic for Email Notifications."
|
@@ -2873,9 +2960,9 @@ msgstr ""
|
|
2873 |
msgid "Please deactivate WPForms Lite before activating WPForms"
|
2874 |
msgstr ""
|
2875 |
|
2876 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.2.
|
2877 |
#. Plugin URI of the plugin/theme
|
2878 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.2.
|
2879 |
#. Author URI of the plugin/theme
|
2880 |
msgid "https://wpforms.com"
|
2881 |
msgstr ""
|
2 |
# This file is distributed under the same license as the WPForms package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPForms 1.2.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms\n"
|
7 |
+
"POT-Creation-Date: 2016-09-15 15:59:36+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: includes/admin/ajax-actions.php:24 includes/fields/class-base.php:667
|
16 |
msgid "You do no have permission."
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: includes/admin/ajax-actions.php:28
|
20 |
msgid "No data provided"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: includes/admin/ajax-actions.php:65
|
24 |
msgid "An error occured and the form could not be saved"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: includes/admin/ajax-actions.php:89
|
28 |
msgid "No form title provided"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: includes/admin/ajax-actions.php:114
|
32 |
msgid "Error creating form"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: includes/admin/ajax-actions.php:131
|
36 |
msgid "No form ID provided"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: includes/admin/ajax-actions.php:143
|
40 |
msgid "Error updating form template"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: includes/admin/ajax-actions.php:217 includes/fields/class-base.php:387
|
44 |
+
msgid "post type"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: includes/admin/ajax-actions.php:236 includes/fields/class-base.php:394
|
48 |
+
msgid "taxonomy"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: includes/admin/builder/class-builder.php:260
|
52 |
+
msgid ""
|
53 |
+
"The {source} {type} contains over {limit} items ({total}). This may make the "
|
54 |
+
"field difficult for your vistors to use and/or cause the form to be slow."
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: includes/admin/builder/class-builder.php:261
|
58 |
#: includes/admin/class-editor.php:96
|
59 |
#: pro/includes/admin/entries/class-entries.php:977
|
60 |
msgid "Cancel"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: includes/admin/builder/class-builder.php:262
|
64 |
msgid "OK"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: includes/admin/builder/class-builder.php:263
|
68 |
#: includes/admin/class-editor.php:70
|
69 |
msgid "Close"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: includes/admin/builder/class-builder.php:264
|
73 |
msgid ""
|
74 |
"Due to form changes, conditional logic rules have been removed or updated:"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/admin/builder/class-builder.php:265
|
78 |
#: pro/includes/admin/entries/class-entries-table.php:167
|
79 |
msgid "Field"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: includes/admin/builder/class-builder.php:266
|
83 |
msgid "Field Locked"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: includes/admin/builder/class-builder.php:267
|
87 |
msgid "This field cannot be deleted because it required by the form template."
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: includes/admin/builder/class-builder.php:268
|
91 |
msgid "Available Fields"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: includes/admin/builder/class-builder.php:269
|
95 |
msgid "No fields available"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: includes/admin/builder/class-builder.php:270
|
99 |
msgid "Heads up!"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: includes/admin/builder/class-builder.php:272
|
103 |
msgid "No email fields"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: includes/admin/builder/class-builder.php:273
|
107 |
msgid "Are you sure you want to delete this notification?"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: includes/admin/builder/class-builder.php:274
|
111 |
msgid "Enter a notification name"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: includes/admin/builder/class-builder.php:275
|
115 |
msgid "Eg: User Confirmation"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: includes/admin/builder/class-builder.php:276
|
119 |
msgid "You must provide a notification name"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: includes/admin/builder/class-builder.php:277
|
123 |
msgid ""
|
124 |
"Form must contain one notification. To disable all notifications use the "
|
125 |
"setting Notifications dropdown setting."
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: includes/admin/builder/class-builder.php:278
|
129 |
#: lite/includes/admin/class-settings.php:131
|
130 |
#: pro/includes/admin/class-settings.php:135
|
131 |
msgid "Saving ..."
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: includes/admin/builder/class-builder.php:279
|
135 |
msgid "Saved!"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: includes/admin/builder/class-builder.php:280
|
139 |
msgid "Save and Exit"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: includes/admin/builder/class-builder.php:281
|
143 |
+
#: includes/admin/builder/class-builder.php:342
|
144 |
msgid "Loading"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: includes/admin/builder/class-builder.php:287
|
148 |
msgid "Use Template"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: includes/admin/builder/class-builder.php:288
|
152 |
msgid ""
|
153 |
"Changing templates on an existing form will DELETE existing form fields. Are "
|
154 |
"you sure you want apply the new template?"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: includes/admin/builder/class-builder.php:289
|
158 |
msgid ""
|
159 |
"You are almost done. To embed this form on your site, please paste the "
|
160 |
"following shortcode inside a post or page."
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: includes/admin/builder/class-builder.php:290
|
164 |
msgid "Or you can follow the instructions in this video."
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: includes/admin/builder/class-builder.php:291
|
168 |
+
#: includes/admin/builder/class-builder.php:392
|
169 |
msgid "Exit"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: includes/admin/builder/class-builder.php:293
|
173 |
msgid "If you exit without saving, your changes will be lost."
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: includes/admin/builder/class-builder.php:294
|
177 |
msgid "Are you sure you want to delete this field?"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: includes/admin/builder/class-builder.php:295
|
181 |
msgid "Please enter a form title."
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: includes/admin/builder/class-builder.php:296
|
185 |
msgid "This item must contain at least one choice."
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: includes/admin/builder/class-builder.php:297
|
189 |
+
#: includes/fields/class-base.php:239 includes/fields/class-base.php:523
|
190 |
+
#: lite/wpforms-lite.php:75 pro/wpforms-pro.php:258
|
191 |
msgid "Off"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: includes/admin/builder/class-builder.php:298
|
195 |
+
#: includes/fields/class-base.php:239 lite/wpforms-lite.php:74
|
196 |
+
#: pro/wpforms-pro.php:257
|
197 |
msgid "On"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: includes/admin/builder/class-builder.php:299
|
201 |
#: includes/templates/class-suggestion.php:59
|
202 |
msgid "Other"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: includes/admin/builder/class-builder.php:300
|
206 |
#: includes/class-frontend.php:482
|
207 |
#: pro/includes/fields/class-page-break.php:144
|
208 |
msgid "Previous"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: includes/admin/builder/class-builder.php:303
|
212 |
+
#: includes/admin/builder/functions.php:210 includes/fields/class-base.php:424
|
213 |
msgid "Show Smart Tags"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: includes/admin/builder/class-builder.php:304
|
217 |
msgid "Hide Smart Tags"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: includes/admin/builder/class-builder.php:305
|
221 |
msgid "-- Select Field --"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: includes/admin/builder/class-builder.php:306
|
225 |
+
#: pro/includes/class-provider.php:944
|
226 |
msgid "-- Select Choice --"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: includes/admin/builder/class-builder.php:365
|
230 |
msgid "Now editing"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: includes/admin/builder/class-builder.php:375
|
234 |
#: pro/includes/admin/entries/class-entries.php:511
|
235 |
msgid "Preview Form"
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: includes/admin/builder/class-builder.php:377
|
239 |
#: includes/admin/overview/class-overview-table.php:159
|
240 |
msgid "Preview"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: includes/admin/builder/class-builder.php:380
|
244 |
msgid "Embed Form"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: includes/admin/builder/class-builder.php:382
|
248 |
msgid "Embed"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: includes/admin/builder/class-builder.php:385
|
252 |
msgid "Save Form"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: includes/admin/builder/class-builder.php:387
|
256 |
#: pro/includes/admin/class-settings.php:441
|
257 |
msgid "Save"
|
258 |
msgstr ""
|
305 |
msgstr ""
|
306 |
|
307 |
#: includes/admin/builder/panels/class-fields.php:250
|
308 |
+
#: includes/fields/class-base.php:703
|
309 |
msgid "Delete Field"
|
310 |
msgstr ""
|
311 |
|
312 |
#: includes/admin/builder/panels/class-fields.php:252
|
313 |
+
#: includes/fields/class-base.php:704
|
314 |
msgid "Click to edit. Drag to reorder."
|
315 |
msgstr ""
|
316 |
|
317 |
#: includes/admin/builder/panels/class-settings.php:21
|
318 |
+
#: includes/admin/class-menu.php:84 lite/includes/admin/class-settings.php:388
|
319 |
#: pro/includes/admin/class-settings.php:696
|
320 |
msgid "Settings"
|
321 |
msgstr ""
|
328 |
msgstr ""
|
329 |
|
330 |
#: includes/admin/builder/panels/class-settings.php:58
|
331 |
+
#: lite/wpforms-lite.php:60 lite/wpforms-lite.php:70 pro/wpforms-pro.php:244
|
332 |
+
#: pro/wpforms-pro.php:253
|
333 |
msgid "Notifications"
|
334 |
msgstr ""
|
335 |
|
336 |
#: includes/admin/builder/panels/class-settings.php:59
|
337 |
+
#: includes/admin/builder/panels/class-settings.php:263
|
338 |
msgid "Confirmation"
|
339 |
msgstr ""
|
340 |
|
371 |
msgstr ""
|
372 |
|
373 |
#: includes/admin/builder/panels/class-settings.php:132
|
374 |
+
msgid "Submit Button Processing Text"
|
375 |
msgstr ""
|
376 |
|
377 |
#: includes/admin/builder/panels/class-settings.php:133
|
378 |
msgid ""
|
379 |
+
"Enter the submit button text you would like the button display while the "
|
380 |
+
"form submit is processing."
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: includes/admin/builder/panels/class-settings.php:140
|
384 |
+
msgid "Submit Button CSS Class"
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: includes/admin/builder/panels/class-settings.php:141
|
388 |
+
msgid ""
|
389 |
"Enter CSS class names for the form submit button. Multiple names should be "
|
390 |
"seperated with spaces."
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: includes/admin/builder/panels/class-settings.php:148
|
394 |
msgid "Enable anti-spam honeypot"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: includes/admin/builder/panels/class-settings.php:158
|
398 |
msgid "Enable reCAPTCHA"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: includes/admin/builder/panels/class-settings.php:270
|
402 |
msgid "Confirmation Type"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: includes/admin/builder/panels/class-settings.php:274
|
406 |
#: includes/templates/class-suggestion.php:74 lite/wpforms-lite.php:172
|
407 |
+
#: pro/wpforms-pro.php:361
|
408 |
msgid "Message"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: includes/admin/builder/panels/class-settings.php:275
|
412 |
msgid "Show Page"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: includes/admin/builder/panels/class-settings.php:276
|
416 |
msgid "Go to URL (Redirect)"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: includes/admin/builder/panels/class-settings.php:285
|
420 |
msgid "Confirmation Message"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: includes/admin/builder/panels/class-settings.php:287
|
424 |
msgid "Thanks for contacting us! We will be in touch with you shortly."
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: includes/admin/builder/panels/class-settings.php:298
|
428 |
msgid "Automatically scroll to the confirmation message"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: includes/admin/builder/panels/class-settings.php:311
|
432 |
msgid "Confirmation Page"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: includes/admin/builder/panels/class-settings.php:319
|
436 |
msgid "Confirmation Redirect URL"
|
437 |
msgstr ""
|
438 |
|
501 |
"a>?"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.2.8) #-#-#-#-#
|
505 |
#. Plugin Name of the plugin/theme
|
506 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.2.8) #-#-#-#-#
|
507 |
#. Author of the plugin/theme
|
508 |
#: includes/admin/class-menu.php:39 includes/admin/class-menu.php:40
|
509 |
#: includes/admin/class-menu.php:51
|
520 |
|
521 |
#: includes/admin/class-menu.php:62
|
522 |
#: includes/admin/overview/class-overview.php:148
|
523 |
+
#: pro/includes/class-provider.php:1083
|
524 |
msgid "Add New"
|
525 |
msgstr ""
|
526 |
|
530 |
|
531 |
#: includes/admin/class-menu.php:72
|
532 |
#: includes/admin/overview/class-overview-table.php:152
|
533 |
+
#: pro/includes/admin/entries/class-entries.php:410 pro/wpforms-pro.php:199
|
534 |
msgid "Entries"
|
535 |
msgstr ""
|
536 |
|
665 |
#: includes/admin/overview/class-overview-table.php:191
|
666 |
#: pro/includes/admin/entries/class-entries-table.php:328
|
667 |
#: pro/includes/admin/entries/class-entries-table.php:349
|
668 |
+
#: pro/includes/admin/entries/class-entries.php:1013
|
669 |
msgid "Delete"
|
670 |
msgstr ""
|
671 |
|
782 |
msgstr ""
|
783 |
|
784 |
#: includes/class-process.php:339 lite/wpforms-lite.php:52
|
785 |
+
#: pro/wpforms-pro.php:237
|
786 |
msgid "New %s Entry"
|
787 |
msgstr ""
|
788 |
|
816 |
#: pro/includes/fields/class-date-time.php:48
|
817 |
#: pro/includes/fields/class-date-time.php:77
|
818 |
#: pro/includes/fields/class-date-time.php:155
|
819 |
+
#: pro/includes/fields/class-date-time.php:218
|
820 |
msgid "Date"
|
821 |
msgstr ""
|
822 |
|
886 |
msgid "Sent from <a href=\"%s\" style=\"color:#bbbbbb;\">%s</a>"
|
887 |
msgstr ""
|
888 |
|
889 |
+
#: includes/fields/class-base.php:299
|
890 |
msgid ""
|
891 |
"Enter text for the form field label. Field labels are recommended and can be "
|
892 |
"hidden in the Advanced Settings."
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: includes/fields/class-base.php:300
|
896 |
msgid "Label"
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: includes/fields/class-base.php:309
|
900 |
msgid "Enter text for the form field description."
|
901 |
msgstr ""
|
902 |
|
903 |
+
#: includes/fields/class-base.php:310
|
904 |
msgid "Description"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: includes/fields/class-base.php:320
|
908 |
msgid ""
|
909 |
"Check this option to mark the field required. A form will not submit unless "
|
910 |
"all required fields are provided."
|
911 |
msgstr ""
|
912 |
|
913 |
+
#: includes/fields/class-base.php:321
|
914 |
msgid "Required"
|
915 |
msgstr ""
|
916 |
|
917 |
+
#: includes/fields/class-base.php:337
|
918 |
msgid "Enter code for the form field."
|
919 |
msgstr ""
|
920 |
|
921 |
+
#: includes/fields/class-base.php:338
|
922 |
msgid "Code"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: includes/fields/class-base.php:347
|
926 |
+
msgid "Add choices for the form field."
|
927 |
+
msgstr ""
|
928 |
+
|
929 |
+
#: includes/fields/class-base.php:359
|
930 |
+
msgid "Choices"
|
931 |
+
msgstr ""
|
932 |
+
|
933 |
+
#: includes/fields/class-base.php:401
|
934 |
+
msgid ""
|
935 |
+
"Choices are dynamically populated from the <span class=\"dynamic-name\">%s</"
|
936 |
+
"span> <span class=\"dynamic-type\">%s</span>"
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: includes/fields/class-base.php:423
|
940 |
msgid "Enter text for the default form field value."
|
941 |
msgstr ""
|
942 |
|
943 |
+
#: includes/fields/class-base.php:425 includes/fields/class-name.php:81
|
944 |
#: includes/fields/class-name.php:96 includes/fields/class-name.php:111
|
945 |
+
#: includes/fields/class-name.php:126
|
946 |
+
#: pro/includes/fields/class-address.php:117
|
947 |
+
#: pro/includes/fields/class-address.php:133
|
948 |
+
#: pro/includes/fields/class-address.php:151
|
949 |
+
#: pro/includes/fields/class-address.php:166
|
950 |
+
#: pro/includes/fields/class-address.php:181
|
951 |
+
#: pro/includes/fields/class-address.php:198
|
952 |
msgid "Default Value"
|
953 |
msgstr ""
|
954 |
|
955 |
+
#: includes/fields/class-base.php:435
|
956 |
msgid "Select the default form field size."
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: includes/fields/class-base.php:437
|
960 |
msgid "Small"
|
961 |
msgstr ""
|
962 |
|
963 |
+
#: includes/fields/class-base.php:438
|
964 |
msgid "Medium"
|
965 |
msgstr ""
|
966 |
|
967 |
+
#: includes/fields/class-base.php:439
|
968 |
msgid "Large"
|
969 |
msgstr ""
|
970 |
|
971 |
+
#: includes/fields/class-base.php:441
|
972 |
msgid "Field Size"
|
973 |
msgstr ""
|
974 |
|
975 |
+
#: includes/fields/class-base.php:454
|
976 |
msgid "Advanced Options"
|
977 |
msgstr ""
|
978 |
|
979 |
+
#: includes/fields/class-base.php:465
|
980 |
msgid "Enter text for the form field placeholder."
|
981 |
msgstr ""
|
982 |
|
983 |
+
#: includes/fields/class-base.php:466
|
984 |
msgid "Placeholder Text"
|
985 |
msgstr ""
|
986 |
|
987 |
+
#: includes/fields/class-base.php:475
|
988 |
msgid ""
|
989 |
"Enter CSS class names for the form field container. Class names should be "
|
990 |
"seperated with spaces."
|
991 |
msgstr ""
|
992 |
|
993 |
+
#: includes/fields/class-base.php:477
|
994 |
msgid "CSS Classes"
|
995 |
msgstr ""
|
996 |
|
997 |
+
#: includes/fields/class-base.php:486
|
998 |
msgid "Check this option to hide the form field label."
|
999 |
msgstr ""
|
1000 |
|
1001 |
+
#: includes/fields/class-base.php:488
|
1002 |
msgid "Hide Label"
|
1003 |
msgstr ""
|
1004 |
|
1005 |
+
#: includes/fields/class-base.php:496
|
1006 |
msgid "Check this option to hide the form field sub-label."
|
1007 |
msgstr ""
|
1008 |
|
1009 |
+
#: includes/fields/class-base.php:498
|
1010 |
msgid "Hide Sub-Labels"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
+
#: includes/fields/class-base.php:506
|
1014 |
msgid "Select the layout for displaying field choices."
|
1015 |
msgstr ""
|
1016 |
|
1017 |
+
#: includes/fields/class-base.php:508
|
1018 |
msgid "One Column"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
+
#: includes/fields/class-base.php:509
|
1022 |
msgid "Two Columns"
|
1023 |
msgstr ""
|
1024 |
|
1025 |
+
#: includes/fields/class-base.php:510
|
1026 |
msgid "Three Columns"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
+
#: includes/fields/class-base.php:512
|
1030 |
msgid "Choice Layout"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
+
#: includes/fields/class-base.php:521
|
1034 |
+
msgid "Select auto-populate method to use."
|
1035 |
+
msgstr ""
|
1036 |
+
|
1037 |
+
#: includes/fields/class-base.php:524 includes/fields/class-base.php:543
|
1038 |
+
msgid "Post Type"
|
1039 |
+
msgstr ""
|
1040 |
+
|
1041 |
+
#: includes/fields/class-base.php:525 includes/fields/class-base.php:549
|
1042 |
+
msgid "Taxonomy"
|
1043 |
+
msgstr ""
|
1044 |
+
|
1045 |
+
#: includes/fields/class-base.php:527
|
1046 |
+
msgid "Dynamic Choices"
|
1047 |
+
msgstr ""
|
1048 |
+
|
1049 |
+
#: includes/fields/class-base.php:554
|
1050 |
+
msgid "Select %s to use for auto-populating field choices."
|
1051 |
+
msgstr ""
|
1052 |
+
|
1053 |
+
#: includes/fields/class-base.php:555
|
1054 |
+
msgid "Dynamic %s Source"
|
1055 |
+
msgstr ""
|
1056 |
+
|
1057 |
+
#: includes/fields/class-base.php:671
|
1058 |
msgid "No form ID found"
|
1059 |
msgstr ""
|
1060 |
|
1061 |
+
#: includes/fields/class-base.php:675
|
1062 |
msgid "No field type found"
|
1063 |
msgstr ""
|
1064 |
|
1065 |
+
#: includes/fields/class-base.php:750 includes/fields/class-email.php:128
|
1066 |
#: includes/fields/class-name.php:311 includes/fields/class-number.php:127
|
1067 |
+
#: pro/includes/fields/class-address.php:624
|
1068 |
+
#: pro/includes/fields/class-date-time.php:293
|
1069 |
#: pro/includes/fields/class-file-upload.php:217
|
1070 |
#: pro/includes/fields/class-payment-multiple.php:177
|
1071 |
+
#: pro/includes/fields/class-payment-single.php:189
|
1072 |
#: pro/includes/fields/class-url.php:126
|
1073 |
msgid "This field is required"
|
1074 |
msgstr ""
|
1092 |
msgid "Third Choice"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
+
#: includes/fields/class-checkbox.php:82 includes/fields/class-select.php:82
|
1096 |
+
msgid "Check this to manual set form field values."
|
|
|
1097 |
msgstr ""
|
1098 |
|
1099 |
+
#: includes/fields/class-checkbox.php:84 includes/fields/class-radio.php:84
|
1100 |
+
#: includes/fields/class-select.php:84
|
1101 |
+
msgid "Show Values"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: includes/fields/class-checkbox.php:164 includes/fields/class-radio.php:164
|
1105 |
+
#: includes/fields/class-select.php:170
|
1106 |
+
msgid "(empty)"
|
1107 |
msgstr ""
|
1108 |
|
1109 |
+
#: includes/fields/class-checkbox.php:181 includes/fields/class-radio.php:181
|
1110 |
+
msgid ""
|
1111 |
+
"Showing the first 20 choices.<br> All %d choices will be displayed when "
|
1112 |
+
"viewing the form."
|
1113 |
msgstr ""
|
1114 |
|
1115 |
#: includes/fields/class-email.php:21
|
1142 |
msgid "First Middle Last"
|
1143 |
msgstr ""
|
1144 |
|
1145 |
+
#: includes/fields/class-name.php:53
|
1146 |
#: pro/includes/fields/class-date-time.php:51
|
1147 |
#: pro/includes/fields/class-date-time.php:88
|
1148 |
#: pro/includes/fields/class-date-time.php:118
|
1156 |
|
1157 |
#: includes/fields/class-name.php:77 includes/fields/class-name.php:92
|
1158 |
#: includes/fields/class-name.php:107 includes/fields/class-name.php:122
|
1159 |
+
#: pro/includes/fields/class-address.php:113
|
1160 |
+
#: pro/includes/fields/class-address.php:129
|
1161 |
+
#: pro/includes/fields/class-address.php:147
|
1162 |
+
#: pro/includes/fields/class-address.php:162
|
1163 |
+
#: pro/includes/fields/class-address.php:177
|
1164 |
+
#: pro/includes/fields/class-address.php:194
|
|
|
1165 |
#: pro/includes/fields/class-date-time.php:80
|
1166 |
#: pro/includes/fields/class-date-time.php:110
|
1167 |
msgid "Placeholder"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
#: includes/fields/class-name.php:160 includes/fields/class-name.php:242
|
1195 |
+
#: pro/includes/class-provider.php:447
|
1196 |
msgid "First"
|
1197 |
msgstr ""
|
1198 |
|
1199 |
#: includes/fields/class-name.php:164 includes/fields/class-name.php:260
|
1200 |
+
#: pro/includes/class-provider.php:459
|
1201 |
msgid "Middle"
|
1202 |
msgstr ""
|
1203 |
|
1204 |
#: includes/fields/class-name.php:168 includes/fields/class-name.php:287
|
1205 |
+
#: pro/includes/class-provider.php:471
|
1206 |
msgid "Last"
|
1207 |
msgstr ""
|
1208 |
|
1218 |
msgid "Multiple Choice"
|
1219 |
msgstr ""
|
1220 |
|
1221 |
+
#: includes/fields/class-radio.php:82
|
1222 |
msgid "Check this to manually set form field values."
|
1223 |
msgstr ""
|
1224 |
|
1244 |
"builder."
|
1245 |
msgstr ""
|
1246 |
|
1247 |
+
#: includes/templates/class-blank.php:32
|
1248 |
+
#: includes/templates/class-contact.php:63
|
1249 |
+
#: includes/templates/class-suggestion.php:88
|
1250 |
+
#: pro/includes/templates/class-donation.php:65
|
1251 |
+
#: pro/includes/templates/class-order.php:99
|
1252 |
+
#: pro/includes/templates/class-request-quote.php:69
|
1253 |
+
#: pro/includes/templates/class-subscribe.php:50
|
1254 |
+
msgid "Sending..."
|
1255 |
+
msgstr ""
|
1256 |
+
|
1257 |
#: includes/templates/class-contact.php:20
|
1258 |
msgid "Simple Contact Form"
|
1259 |
msgstr ""
|
1459 |
msgid "Save General Settings"
|
1460 |
msgstr ""
|
1461 |
|
1462 |
+
#: lite/includes/admin/class-settings.php:418
|
1463 |
+
#: lite/includes/admin/class-settings.php:422
|
1464 |
+
#: pro/includes/admin/class-settings.php:726
|
1465 |
+
#: pro/includes/admin/class-settings.php:730
|
1466 |
+
#: pro/includes/admin/entries/class-entries.php:1088
|
1467 |
+
msgid "M j, Y @ g:ia"
|
1468 |
+
msgstr ""
|
1469 |
+
|
1470 |
+
#: lite/wpforms-lite.php:83 pro/wpforms-pro.php:265
|
1471 |
msgid "Default Notification"
|
1472 |
msgstr ""
|
1473 |
|
1474 |
+
#: lite/wpforms-lite.php:91 pro/wpforms-pro.php:280
|
1475 |
msgid "Send To Email Address"
|
1476 |
msgstr ""
|
1477 |
|
1478 |
+
#: lite/wpforms-lite.php:94 pro/wpforms-pro.php:283
|
1479 |
msgid ""
|
1480 |
"Enter the email address to receive form entry notifications. For multiple "
|
1481 |
"notifications, seperate email addresses with a comma."
|
1482 |
msgstr ""
|
1483 |
|
1484 |
+
#: lite/wpforms-lite.php:109 pro/wpforms-pro.php:298
|
1485 |
msgid "Email Subject"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
+
#: lite/wpforms-lite.php:111 pro/wpforms-pro.php:300
|
1489 |
msgid "New Entry: "
|
1490 |
msgstr ""
|
1491 |
|
1492 |
+
#: lite/wpforms-lite.php:125 pro/wpforms-pro.php:314
|
1493 |
msgid "From Name"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
+
#: lite/wpforms-lite.php:141 pro/wpforms-pro.php:330
|
1497 |
msgid "From Email"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
+
#: lite/wpforms-lite.php:157 pro/wpforms-pro.php:346
|
1501 |
msgid "Reply-To"
|
1502 |
msgstr ""
|
1503 |
|
1504 |
+
#: lite/wpforms-lite.php:182 pro/wpforms-pro.php:371
|
1505 |
msgid ""
|
1506 |
"To display all form fields, use the <code>{all_fields}</code> Smart Tag."
|
1507 |
msgstr ""
|
1857 |
msgstr ""
|
1858 |
|
1859 |
#: pro/includes/admin/class-settings.php:590
|
1860 |
+
#: pro/includes/admin/entries/class-entries-export.php:298
|
1861 |
msgid "Error"
|
1862 |
msgstr ""
|
1863 |
|
1864 |
#: pro/includes/admin/entries/class-entries-export.php:173
|
1865 |
+
msgid "Date GMT"
|
1866 |
+
msgstr ""
|
1867 |
+
|
1868 |
+
#: pro/includes/admin/entries/class-entries-export.php:174
|
1869 |
msgid "ID"
|
1870 |
msgstr ""
|
1871 |
|
1872 |
+
#: pro/includes/admin/entries/class-entries-export.php:298
|
1873 |
msgid "You do not have permission to export entries."
|
1874 |
msgstr ""
|
1875 |
|
1895 |
msgstr ""
|
1896 |
|
1897 |
#: pro/includes/admin/entries/class-entries-table.php:130
|
1898 |
+
#: pro/includes/admin/entries/class-entries.php:1305
|
1899 |
msgid "Actions"
|
1900 |
msgstr ""
|
1901 |
|
1902 |
#: pro/includes/admin/entries/class-entries-table.php:256
|
1903 |
+
#: pro/includes/admin/entries/class-entries.php:1156
|
1904 |
msgid "Unknown"
|
1905 |
msgstr ""
|
1906 |
|
1941 |
msgstr ""
|
1942 |
|
1943 |
#: pro/includes/admin/entries/class-entries-table.php:344
|
1944 |
+
#: pro/includes/admin/entries/class-entries.php:1336
|
1945 |
msgid "Mark Unread"
|
1946 |
msgstr ""
|
1947 |
|
1948 |
#: pro/includes/admin/entries/class-entries-table.php:345
|
1949 |
+
#: pro/includes/admin/entries/class-entries.php:1288
|
1950 |
msgid "Star"
|
1951 |
msgstr ""
|
1952 |
|
1953 |
#: pro/includes/admin/entries/class-entries-table.php:346
|
1954 |
+
#: pro/includes/admin/entries/class-entries.php:1288
|
1955 |
msgid "Unstar"
|
1956 |
msgstr ""
|
1957 |
|
2109 |
msgid "No notes."
|
2110 |
msgstr ""
|
2111 |
|
2112 |
+
#: pro/includes/admin/entries/class-entries.php:1013
|
|
|
|
|
|
|
|
|
|
|
2113 |
msgid "Added by"
|
2114 |
msgstr ""
|
2115 |
|
2116 |
+
#: pro/includes/admin/entries/class-entries.php:1013
|
2117 |
msgid "on"
|
2118 |
msgstr ""
|
2119 |
|
2120 |
+
#: pro/includes/admin/entries/class-entries.php:1046
|
2121 |
msgid "Debug Information"
|
2122 |
msgstr ""
|
2123 |
|
2124 |
+
#: pro/includes/admin/entries/class-entries.php:1073
|
2125 |
msgid "Entry Details"
|
2126 |
msgstr ""
|
2127 |
|
2128 |
+
#: pro/includes/admin/entries/class-entries.php:1081
|
2129 |
msgid "Entry ID:"
|
2130 |
msgstr ""
|
2131 |
|
2132 |
+
#: pro/includes/admin/entries/class-entries.php:1087
|
2133 |
msgid "Submitted on:"
|
2134 |
msgstr ""
|
2135 |
|
2136 |
+
#: pro/includes/admin/entries/class-entries.php:1094
|
2137 |
msgid "Modified on:"
|
2138 |
msgstr ""
|
2139 |
|
2140 |
+
#: pro/includes/admin/entries/class-entries.php:1095
|
2141 |
msgid "M j, Y @ H:i"
|
2142 |
msgstr ""
|
2143 |
|
2144 |
+
#: pro/includes/admin/entries/class-entries.php:1103
|
2145 |
msgid "User:"
|
2146 |
msgstr ""
|
2147 |
|
2148 |
+
#: pro/includes/admin/entries/class-entries.php:1115
|
2149 |
msgid "User IP:"
|
2150 |
msgstr ""
|
2151 |
|
2152 |
+
#: pro/includes/admin/entries/class-entries.php:1166
|
2153 |
msgid "Stripe"
|
2154 |
msgstr ""
|
2155 |
|
2156 |
+
#: pro/includes/admin/entries/class-entries.php:1172
|
2157 |
msgid "PayPal Standard"
|
2158 |
msgstr ""
|
2159 |
|
2160 |
+
#: pro/includes/admin/entries/class-entries.php:1184
|
2161 |
msgid "Payment Details"
|
2162 |
msgstr ""
|
2163 |
|
2164 |
+
#: pro/includes/admin/entries/class-entries.php:1191
|
2165 |
msgid " Status:"
|
2166 |
msgstr ""
|
2167 |
|
2168 |
+
#: pro/includes/admin/entries/class-entries.php:1195
|
2169 |
msgid " Total:"
|
2170 |
msgstr ""
|
2171 |
|
2172 |
+
#: pro/includes/admin/entries/class-entries.php:1200
|
2173 |
msgid " Gateway:"
|
2174 |
msgstr ""
|
2175 |
|
2176 |
+
#: pro/includes/admin/entries/class-entries.php:1202
|
2177 |
msgid "Test"
|
2178 |
msgstr ""
|
2179 |
|
2180 |
+
#: pro/includes/admin/entries/class-entries.php:1208
|
2181 |
msgid "Transaction ID:"
|
2182 |
msgstr ""
|
2183 |
|
2184 |
+
#: pro/includes/admin/entries/class-entries.php:1213
|
2185 |
msgid "Note:"
|
2186 |
msgstr ""
|
2187 |
|
2188 |
+
#: pro/includes/admin/entries/class-entries.php:1314
|
2189 |
msgid "Print"
|
2190 |
msgstr ""
|
2191 |
|
2192 |
+
#: pro/includes/admin/entries/class-entries.php:1321
|
2193 |
msgid "Export (CSV)"
|
2194 |
msgstr ""
|
2195 |
|
2196 |
+
#: pro/includes/admin/entries/class-entries.php:1328
|
2197 |
msgid "Resend Notifications"
|
2198 |
msgstr ""
|
2199 |
|
2201 |
msgid "Connection"
|
2202 |
msgstr ""
|
2203 |
|
2204 |
+
#: pro/includes/class-provider.php:149 pro/includes/class-provider.php:1128
|
2205 |
+
#: pro/includes/class-provider.php:1163
|
2206 |
msgid "You do not have permission"
|
2207 |
msgstr ""
|
2208 |
|
2209 |
+
#: pro/includes/class-provider.php:436
|
2210 |
msgid "Full"
|
2211 |
msgstr ""
|
2212 |
|
2213 |
+
#: pro/includes/class-provider.php:658
|
2214 |
msgid "Select Account"
|
2215 |
msgstr ""
|
2216 |
|
2217 |
+
#: pro/includes/class-provider.php:670 pro/includes/class-provider.php:1242
|
2218 |
msgid "Add New Account"
|
2219 |
msgstr ""
|
2220 |
|
2221 |
+
#: pro/includes/class-provider.php:700
|
2222 |
msgid "Select List"
|
2223 |
msgstr ""
|
2224 |
|
2225 |
+
#: pro/includes/class-provider.php:740
|
2226 |
msgid "Select Groups"
|
2227 |
msgstr ""
|
2228 |
|
2229 |
+
#: pro/includes/class-provider.php:742
|
2230 |
msgid ""
|
2231 |
"We also noticed that you have some segments in your list. You can select "
|
2232 |
"specific list segments below if needed. This is optional."
|
2233 |
msgstr ""
|
2234 |
|
2235 |
+
#: pro/includes/class-provider.php:797 pro/includes/class-provider.php:802
|
2236 |
msgid "List Fields"
|
2237 |
msgstr ""
|
2238 |
|
2239 |
+
#: pro/includes/class-provider.php:802
|
2240 |
msgid "Available Form Fields"
|
2241 |
msgstr ""
|
2242 |
|
2243 |
+
#: pro/includes/class-provider.php:863
|
2244 |
msgid "Conditional Logic"
|
2245 |
msgstr ""
|
2246 |
|
2247 |
+
#: pro/includes/class-provider.php:872
|
2248 |
msgid "Enable conditional logic"
|
2249 |
msgstr ""
|
2250 |
|
2251 |
+
#: pro/includes/class-provider.php:879
|
2252 |
msgid "Process this form if"
|
2253 |
msgstr ""
|
2254 |
|
2255 |
+
#: pro/includes/class-provider.php:910
|
2256 |
msgid "-- Select field --"
|
2257 |
msgstr ""
|
2258 |
|
2259 |
+
#: pro/includes/class-provider.php:927
|
2260 |
msgid "is"
|
2261 |
msgstr ""
|
2262 |
|
2263 |
+
#: pro/includes/class-provider.php:928
|
2264 |
msgid "is not"
|
2265 |
msgstr ""
|
2266 |
|
2267 |
+
#: pro/includes/class-provider.php:962
|
2268 |
msgid "AND"
|
2269 |
msgstr ""
|
2270 |
|
2271 |
+
#: pro/includes/class-provider.php:979
|
2272 |
msgid "Add rule group"
|
2273 |
msgstr ""
|
2274 |
|
2275 |
+
#: pro/includes/class-provider.php:1132 pro/includes/class-provider.php:1167
|
2276 |
msgid "Missing data"
|
2277 |
msgstr ""
|
2278 |
|
2279 |
+
#: pro/includes/class-provider.php:1144
|
2280 |
msgid "Connection missing"
|
2281 |
msgstr ""
|
2282 |
|
2283 |
+
#: pro/includes/class-provider.php:1181 pro/includes/class-provider.php:1232
|
2284 |
msgid "Connected on: "
|
2285 |
msgstr ""
|
2286 |
|
2287 |
+
#: pro/includes/class-provider.php:1182 pro/includes/class-provider.php:1233
|
2288 |
msgid "Disconnect "
|
2289 |
msgstr ""
|
2290 |
|
2291 |
+
#: pro/includes/class-provider.php:1217
|
2292 |
msgid "Integrate %s with WPForms"
|
2293 |
msgstr ""
|
2294 |
|
2295 |
+
#: pro/includes/class-provider.php:1218
|
2296 |
msgid "Connected"
|
2297 |
msgstr ""
|
2298 |
|
2299 |
+
#: pro/includes/class-provider.php:1248
|
2300 |
msgid ""
|
2301 |
"Please fill out all of the fields below to add your new provider account."
|
2302 |
msgstr ""
|
2303 |
|
2304 |
+
#: pro/includes/class-provider.php:1254
|
2305 |
msgid "Connect to"
|
2306 |
msgstr ""
|
2307 |
|
2310 |
msgid "Address"
|
2311 |
msgstr ""
|
2312 |
|
2313 |
+
#: pro/includes/fields/class-address.php:28
|
2314 |
+
msgid "US"
|
2315 |
msgstr ""
|
2316 |
|
2317 |
+
#: pro/includes/fields/class-address.php:29
|
2318 |
+
#: pro/includes/fields/class-address.php:39
|
2319 |
+
#: pro/includes/fields/class-address.php:110
|
2320 |
msgid "Address Line 1"
|
2321 |
msgstr ""
|
2322 |
|
2323 |
+
#: pro/includes/fields/class-address.php:30
|
2324 |
+
#: pro/includes/fields/class-address.php:40
|
2325 |
+
#: pro/includes/fields/class-address.php:126
|
2326 |
msgid "Address Line 2"
|
2327 |
msgstr ""
|
2328 |
|
2329 |
+
#: pro/includes/fields/class-address.php:31
|
2330 |
+
#: pro/includes/fields/class-address.php:41
|
2331 |
+
#: pro/includes/fields/class-address.php:144
|
2332 |
msgid "City"
|
2333 |
msgstr ""
|
2334 |
|
2335 |
+
#: pro/includes/fields/class-address.php:32
|
2336 |
+
#: pro/includes/fields/class-address.php:34
|
2337 |
+
#: pro/includes/fields/class-address.php:42
|
2338 |
msgid "State"
|
2339 |
msgstr ""
|
2340 |
|
2341 |
+
#: pro/includes/fields/class-address.php:33
|
2342 |
+
msgid "Zip Code"
|
|
|
|
|
2343 |
msgstr ""
|
2344 |
|
2345 |
+
#: pro/includes/fields/class-address.php:38
|
2346 |
+
msgid "International"
|
2347 |
+
msgstr ""
|
2348 |
+
|
2349 |
+
#: pro/includes/fields/class-address.php:43
|
2350 |
+
msgid "Postal Code"
|
2351 |
+
msgstr ""
|
2352 |
+
|
2353 |
+
#: pro/includes/fields/class-address.php:44
|
2354 |
+
#: pro/includes/fields/class-address.php:159
|
2355 |
+
msgid "State / Province / Region"
|
2356 |
msgstr ""
|
2357 |
|
2358 |
+
#: pro/includes/fields/class-address.php:46
|
2359 |
+
#: pro/includes/fields/class-address.php:191
|
|
|
2360 |
msgid "Country"
|
2361 |
msgstr ""
|
2362 |
|
2363 |
+
#: pro/includes/fields/class-address.php:78
|
2364 |
+
msgid "Select scheme format for the address field."
|
2365 |
+
msgstr ""
|
2366 |
+
|
2367 |
+
#: pro/includes/fields/class-address.php:83
|
2368 |
+
msgid "Scheme"
|
2369 |
msgstr ""
|
2370 |
|
2371 |
+
#: pro/includes/fields/class-address.php:174
|
2372 |
+
msgid "ZIP / Postal"
|
|
|
2373 |
msgstr ""
|
2374 |
|
2375 |
#: pro/includes/fields/class-date-time.php:21
|
2387 |
#: pro/includes/fields/class-date-time.php:49
|
2388 |
#: pro/includes/fields/class-date-time.php:107
|
2389 |
#: pro/includes/fields/class-date-time.php:159
|
2390 |
+
#: pro/includes/fields/class-date-time.php:243
|
2391 |
msgid "Time"
|
2392 |
msgstr ""
|
2393 |
|
2719 |
msgid "Item Type"
|
2720 |
msgstr ""
|
2721 |
|
2722 |
+
#: pro/includes/fields/class-payment-single.php:98
|
2723 |
+
#: pro/includes/fields/class-payment-single.php:142
|
2724 |
msgid "Price"
|
2725 |
msgstr ""
|
2726 |
|
2727 |
+
#: pro/includes/fields/class-payment-single.php:104
|
2728 |
msgid ""
|
2729 |
"Note: Item type is set to hidden and will not be visible when viewing the "
|
2730 |
"form."
|
2731 |
msgstr ""
|
2732 |
|
2733 |
+
#: pro/includes/fields/class-payment-single.php:199
|
2734 |
msgid "Amount mismatch"
|
2735 |
msgstr ""
|
2736 |
|
2926 |
msgid "Click the marketing tab to configure your newsletter service provider"
|
2927 |
msgstr ""
|
2928 |
|
2929 |
+
#: pro/wpforms-pro.php:186
|
2930 |
msgid "Disable storing entry information in WordPress"
|
2931 |
msgstr ""
|
2932 |
|
2933 |
+
#: pro/wpforms-pro.php:245
|
2934 |
msgid "Add New Notification"
|
2935 |
msgstr ""
|
2936 |
|
2937 |
+
#: pro/wpforms-pro.php:384
|
2938 |
msgid "Send"
|
2939 |
msgstr ""
|
2940 |
|
2941 |
+
#: pro/wpforms-pro.php:385
|
2942 |
msgid "Don't send"
|
2943 |
msgstr ""
|
2944 |
|
2945 |
+
#: pro/wpforms-pro.php:387
|
2946 |
msgid "this notification if"
|
2947 |
msgstr ""
|
2948 |
|
2949 |
+
#: pro/wpforms-pro.php:388
|
2950 |
msgid "Email notifications"
|
2951 |
msgstr ""
|
2952 |
|
2953 |
+
#: pro/wpforms-pro.php:391
|
2954 |
msgid ""
|
2955 |
"Install the <a href=\"%s\">Conditional Logic add-on</a> to enable "
|
2956 |
"conditional logic for Email Notifications."
|
2960 |
msgid "Please deactivate WPForms Lite before activating WPForms"
|
2961 |
msgstr ""
|
2962 |
|
2963 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.2.8) #-#-#-#-#
|
2964 |
#. Plugin URI of the plugin/theme
|
2965 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.2.8) #-#-#-#-#
|
2966 |
#. Author URI of the plugin/theme
|
2967 |
msgid "https://wpforms.com"
|
2968 |
msgstr ""
|
lite/includes/admin/class-settings.php
CHANGED
@@ -353,8 +353,6 @@ class WPForms_Settings {
|
|
353 |
<div class="wpforms-circle-11 wpforms-circle"></div>
|
354 |
<div class="wpforms-circle-12 wpforms-circle"></div>
|
355 |
</div>
|
356 |
-
|
357 |
-
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
358 |
|
359 |
<div id="wpforms-tabs" class="wpforms-clear">
|
360 |
|
353 |
<div class="wpforms-circle-11 wpforms-circle"></div>
|
354 |
<div class="wpforms-circle-12 wpforms-circle"></div>
|
355 |
</div>
|
|
|
|
|
356 |
|
357 |
<div id="wpforms-tabs" class="wpforms-clear">
|
358 |
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: wpforms, jaredatch, smub
|
3 |
Tags: contact form, contact form plugin, contact button, contact me, custom form, custom contact form, form builder, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
|
4 |
Requires at least: 4.4
|
5 |
-
Tested up to: 4.6
|
6 |
Stable tag: trunk
|
7 |
License: GNU General Public License v2.0 or later
|
8 |
|
@@ -163,6 +163,13 @@ Syed Balkhi
|
|
163 |
|
164 |
== Changelog ==
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
= 1.2.7 =
|
167 |
- Added: Store intial plugin activation date
|
168 |
- Added: Duplicate form submit protection
|
2 |
Contributors: wpforms, jaredatch, smub
|
3 |
Tags: contact form, contact form plugin, contact button, contact me, custom form, custom contact form, form builder, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
|
4 |
Requires at least: 4.4
|
5 |
+
Tested up to: 4.6.1
|
6 |
Stable tag: trunk
|
7 |
License: GNU General Public License v2.0 or later
|
8 |
|
163 |
|
164 |
== Changelog ==
|
165 |
|
166 |
+
= 1.2.8 =
|
167 |
+
- Added: Dynamic choice feature for Dropdown, Multiple Choice, and Checkbox fields
|
168 |
+
- Changed: Loading order of templates and field classes - moved to `init`
|
169 |
+
- Changed: Form javascript email validation requires domain TLD to pass
|
170 |
+
- Fixed: HTML email notification templates uses site locale text-direction
|
171 |
+
- Fixed: Javascript in the form builder conflicting with certain locales
|
172 |
+
|
173 |
= 1.2.7 =
|
174 |
- Added: Store intial plugin activation date
|
175 |
- Added: Duplicate form submit protection
|
wpforms.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
|
6 |
* Author: WPForms
|
7 |
* Author URI: https://wpforms.com
|
8 |
-
* Version: 1.2.
|
9 |
* Text Domain: wpforms
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -81,7 +81,7 @@ final class WPForms {
|
|
81 |
* @since 1.0.0
|
82 |
* @var sting
|
83 |
*/
|
84 |
-
public $version = '1.2.
|
85 |
|
86 |
/**
|
87 |
* The form data handler instance.
|
5 |
* Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
|
6 |
* Author: WPForms
|
7 |
* Author URI: https://wpforms.com
|
8 |
+
* Version: 1.2.8
|
9 |
* Text Domain: wpforms
|
10 |
* Domain Path: languages
|
11 |
*
|
81 |
* @since 1.0.0
|
82 |
* @var sting
|
83 |
*/
|
84 |
+
public $version = '1.2.8';
|
85 |
|
86 |
/**
|
87 |
* The form data handler instance.
|