Version Description
- New feature: Added a new option "Auto" for Width setting of all form parts to allow for a single line form layouts.
- Improvement: Better, configurable styles for form submission preview.
- Improvement: Better formatting of submission alert emails.
- Improvement: Legal part now doesn't automatically prevent form submission.
- Improvement: Table part now inherits checkbox and radio styling.
- Bugfix: Table part default options were misbehaving.
- Bugfix: Dropdown part color settings were not saving.
- Bugfix: Dropdown part marked as required stopped submit button from working in some scenarios.
- Bugfix: Special characters were misinterpreted during submission.
- Bugfix: Some parts were submitting undefined data.
- Bugfix: Dropdown part was ignoring a default option setting.
Download this release
Release Info
Developer | thethemefoundry |
Plugin | Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms |
Version | 1.5.11 |
Comparing to | |
See all releases |
Code changes from version 1.5.10 to 1.5.11
- assets/css/customize.css +2 -2
- assets/css/frontend.css +115 -139
- assets/js/customize.js +5 -0
- assets/js/frontend.js +14 -10
- assets/js/lib/happyforms-select.js +3 -4
- assets/js/parts/part-table.js +8 -8
- happyforms.php +2 -2
- inc/classes/class-form-controller.php +30 -1
- inc/classes/class-form-part-library.php +10 -0
- inc/classes/class-form-part.php +1 -1
- inc/classes/class-form-styles.php +2 -2
- inc/classes/class-message-controller.php +25 -11
- inc/classes/class-session.php +1 -1
- inc/classes/parts/class-part-address.php +2 -29
- inc/classes/parts/class-part-checkbox.php +15 -2
- inc/classes/parts/class-part-date.php +2 -29
- inc/classes/parts/class-part-email.php +2 -14
- inc/classes/parts/class-part-legal.php +2 -2
- inc/classes/parts/class-part-multi-line-text.php +11 -2
- inc/classes/parts/class-part-number.php +2 -13
- inc/classes/parts/class-part-phone.php +2 -13
- inc/classes/parts/class-part-placeholder.php +1 -1
- inc/classes/parts/class-part-radio.php +14 -1
- inc/classes/parts/class-part-rating.php +1 -1
- inc/classes/parts/class-part-scale.php +1 -1
- inc/classes/parts/class-part-select.php +1 -1
- inc/classes/parts/class-part-single-line-text.php +10 -1
- inc/classes/parts/class-part-table.php +28 -12
- inc/classes/parts/class-part-title.php +1 -1
- inc/classes/parts/class-part-website-url.php +1 -1
- inc/helpers/helper-form-templates.php +52 -5
- inc/templates/partials/part-preview.php +6 -0
- inc/templates/parts/customize-address.php +2 -1
- inc/templates/parts/customize-checkbox.php +2 -1
- inc/templates/parts/customize-date.php +2 -1
- inc/templates/parts/customize-email.php +2 -1
- inc/templates/parts/customize-legal.php +2 -1
- inc/templates/parts/customize-multi-line-text.php +2 -1
- inc/templates/parts/customize-number.php +2 -1
- inc/templates/parts/customize-phone.php +2 -1
- inc/templates/parts/customize-placeholder.php +2 -1
- inc/templates/parts/customize-radio.php +2 -1
- inc/templates/parts/customize-rating.php +2 -1
- inc/templates/parts/customize-scale.php +2 -1
- inc/templates/parts/customize-select.php +2 -1
- inc/templates/parts/customize-single-line-text.php +2 -1
- inc/templates/parts/customize-table.php +2 -1
- inc/templates/parts/customize-title.php +2 -1
- inc/templates/parts/customize-website-url.php +2 -1
- inc/templates/parts/frontend-checkbox.php +1 -3
- inc/templates/parts/frontend-radio.php +1 -4
- inc/templates/parts/frontend-table.php +3 -11
- inc/templates/single-form.php +4 -2
- languages/happyforms.pot +163 -136
- readme.txt +18 -1
assets/css/customize.css
CHANGED
@@ -311,7 +311,7 @@ a.happyforms-form-part-remove:hover {
|
|
311 |
*/
|
312 |
.happyforms-parts-placeholder {
|
313 |
display: block;
|
314 |
-
border:
|
315 |
padding: 30px 30px 40px;
|
316 |
box-sizing: border-box;
|
317 |
text-align: center;
|
@@ -339,7 +339,7 @@ a.happyforms-form-part-remove:hover {
|
|
339 |
.happyforms-parts-placeholder__placeholder {
|
340 |
margin-bottom: 20px;
|
341 |
padding: 20px;
|
342 |
-
border:
|
343 |
}
|
344 |
|
345 |
.happyforms-parts-placeholder__placeholder:last-child {
|
311 |
*/
|
312 |
.happyforms-parts-placeholder {
|
313 |
display: block;
|
314 |
+
border: 3px dashed #b4b9be;
|
315 |
padding: 30px 30px 40px;
|
316 |
box-sizing: border-box;
|
317 |
text-align: center;
|
339 |
.happyforms-parts-placeholder__placeholder {
|
340 |
margin-bottom: 20px;
|
341 |
padding: 20px;
|
342 |
+
border: 3px dashed #b4b9be;
|
343 |
}
|
344 |
|
345 |
.happyforms-parts-placeholder__placeholder:last-child {
|
assets/css/frontend.css
CHANGED
@@ -27,6 +27,11 @@
|
|
27 |
--happyforms-color-choice-checkmark-bg: #fff;
|
28 |
--happyforms-color-choice-checkmark-bg-focus: #000;
|
29 |
--happyforms-color-choice-checkmark-color: #fff;
|
|
|
|
|
|
|
|
|
|
|
30 |
/* font */
|
31 |
--happyforms-form-title-font-size: 32px;
|
32 |
--happyforms-form-font-weight: normal;
|
@@ -113,6 +118,55 @@ h3.happyforms-form__title {
|
|
113 |
align-self: flex-start;
|
114 |
}
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
.happyforms-part__label {
|
117 |
display: inline-block;
|
118 |
cursor: pointer;
|
@@ -2079,10 +2133,6 @@ form > .happyforms-message-notices .error {
|
|
2079 |
border-color: #000;
|
2080 |
border-color: var(--happyforms-color-table-row-even-text);
|
2081 |
}
|
2082 |
-
.happyforms-table__row:not(.happyforms-table__row--head):nth-child(odd) input:checked + .checkmark {
|
2083 |
-
background-color: #000;
|
2084 |
-
background-color: var(--happyforms-color-table-row-even-text);
|
2085 |
-
}
|
2086 |
|
2087 |
.happyforms-table__row:not(.happyforms-table__row--head):nth-child(even) {
|
2088 |
background-color: #fff;
|
@@ -2096,10 +2146,6 @@ form > .happyforms-message-notices .error {
|
|
2096 |
border-color: #000;
|
2097 |
border-color: var(--happyforms-color-table-row-odd-text);
|
2098 |
}
|
2099 |
-
.happyforms-table__row:not(.happyforms-table__row--head):nth-child(even) input:checked + .checkmark {
|
2100 |
-
background-color: #000;
|
2101 |
-
background-color: var(--happyforms-color-table-row-odd-text);
|
2102 |
-
}
|
2103 |
.happyforms-table__row--body {
|
2104 |
align-items: center;
|
2105 |
}
|
@@ -2189,7 +2235,6 @@ form > .happyforms-message-notices .error {
|
|
2189 |
}
|
2190 |
|
2191 |
.happyforms-part--recaptcha {
|
2192 |
-
margin-bottom: 0;
|
2193 |
padding: 0 1%;
|
2194 |
}
|
2195 |
|
@@ -2321,6 +2366,7 @@ form > .happyforms-message-notices .error {
|
|
2321 |
text-align: left;
|
2322 |
margin: 0;
|
2323 |
background-color: #fff;
|
|
|
2324 |
border: 1px solid #dbdbdb;
|
2325 |
white-space: nowrap;
|
2326 |
width: 100%;
|
@@ -2343,9 +2389,16 @@ form > .happyforms-message-notices .error {
|
|
2343 |
align-items: center;
|
2344 |
padding: 5px 10px;
|
2345 |
transition: background-color 0.2s ease-in;
|
|
|
|
|
|
|
|
|
2346 |
}
|
2347 |
.happyforms-custom-select-dropdown li.happyforms-custom-select-dropdown__item:hover {
|
|
|
|
|
2348 |
background-color: #dbdbdb;
|
|
|
2349 |
}
|
2350 |
.happyforms-custom-select-dropdown .happyforms-flag {
|
2351 |
font-size: 30px;
|
@@ -2359,145 +2412,37 @@ form > .happyforms-message-notices .error {
|
|
2359 |
color: #888888;
|
2360 |
}
|
2361 |
|
2362 |
-
.happyforms-form-preview .happyforms-
|
2363 |
-
|
2364 |
-
.happyforms-form-preview .happyforms-part input[type=email],
|
2365 |
-
.happyforms-form-preview .happyforms-part input[type=email]:focus,
|
2366 |
-
.happyforms-form-preview .happyforms-part input[type=number],
|
2367 |
-
.happyforms-form-preview .happyforms-part input[type=number]:focus,
|
2368 |
-
.happyforms-form-preview .happyforms-part textarea,
|
2369 |
-
.happyforms-form-preview .happyforms-part textarea:focus {
|
2370 |
-
cursor: default;
|
2371 |
-
-webkit-appearance: none;
|
2372 |
-
-moz-appearance: none;
|
2373 |
-
appearance: none;
|
2374 |
-
padding-left: 0;
|
2375 |
-
padding-right: 0;
|
2376 |
-
border: 0 !important;
|
2377 |
-
border-color: transparent !important;
|
2378 |
-
box-shadow: none !important;
|
2379 |
-
}
|
2380 |
-
|
2381 |
-
.happyforms-form-preview .happyforms-part label {
|
2382 |
-
cursor: default;
|
2383 |
-
}
|
2384 |
-
|
2385 |
-
.happyforms-form-preview .happyforms-custom-select .happyforms-part__select-wrap:after {
|
2386 |
-
display: none;
|
2387 |
-
}
|
2388 |
-
|
2389 |
-
.happyforms-form-preview .happyforms-custom-select-dropdown {
|
2390 |
-
display: none !important;
|
2391 |
-
}
|
2392 |
-
|
2393 |
-
.happyforms-form-preview .happyforms-part--scale {
|
2394 |
-
margin-bottom: 45px;
|
2395 |
-
}
|
2396 |
-
|
2397 |
-
.happyforms-form-preview .happyforms-part--scale input {
|
2398 |
-
display: none;
|
2399 |
-
}
|
2400 |
-
|
2401 |
-
.happyforms-form-preview .happyforms-part--scale output span {
|
2402 |
-
top: -15px;
|
2403 |
-
left: 0 !important;
|
2404 |
-
}
|
2405 |
-
|
2406 |
-
.happyforms-form-preview .happyforms-part--rating label {
|
2407 |
-
display: none;
|
2408 |
}
|
2409 |
|
2410 |
-
.happyforms-
|
2411 |
-
.happyforms-form-preview input[type='radio'],
|
2412 |
-
.happyforms-form-preview .option-label {
|
2413 |
cursor: default;
|
|
|
2414 |
}
|
2415 |
|
2416 |
-
.happyforms-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
display: none;
|
2421 |
-
}
|
2422 |
-
|
2423 |
-
.happyforms-form-preview .option-label {
|
2424 |
-
padding-left: 0;
|
2425 |
-
padding-right: 0;
|
2426 |
-
}
|
2427 |
-
|
2428 |
-
.happyforms-form-preview .option-label .label {
|
2429 |
-
padding-left: 0;
|
2430 |
-
padding-right: 0;
|
2431 |
-
}
|
2432 |
-
|
2433 |
-
.happyforms-form-preview input[checked='checked'] ~ .label {
|
2434 |
-
display: block;
|
2435 |
-
}
|
2436 |
-
|
2437 |
-
.happyforms-form-preview .happyforms-country-select {
|
2438 |
-
display: none !important;
|
2439 |
-
}
|
2440 |
-
|
2441 |
-
.happyforms-form-preview .happyforms-part--phone.happyforms-is-masked .happyforms-part__el>input[type=text] {
|
2442 |
-
padding-left: 0 !important;
|
2443 |
-
}
|
2444 |
-
|
2445 |
-
.happyforms-form-preview .happyforms-part-date__time-input .happyforms-spinner-arrow {
|
2446 |
-
display: none;
|
2447 |
-
}
|
2448 |
-
|
2449 |
-
.happyforms-form-preview .happyforms-part--date .happyforms-part__el {
|
2450 |
-
display: block;
|
2451 |
-
}
|
2452 |
-
|
2453 |
-
.happyforms-form-preview .happyforms-part--date .happyforms-part__el div {
|
2454 |
-
display: inline;
|
2455 |
-
}
|
2456 |
-
|
2457 |
-
.happyforms-form-preview .happyforms-part--date .happyforms-part__el input {
|
2458 |
-
display: inline;
|
2459 |
-
width: auto;
|
2460 |
}
|
2461 |
|
2462 |
-
.happyforms-form-preview .happyforms-
|
2463 |
display: flex;
|
|
|
2464 |
align-items: center;
|
|
|
2465 |
}
|
2466 |
|
2467 |
-
.happyforms-form-preview .happyforms-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
.happyforms-form-preview a.address-geolocate {
|
2473 |
-
display: none;
|
2474 |
-
}
|
2475 |
-
|
2476 |
-
.happyforms-form-preview .happyforms-part--date .happyforms-part__el > div {
|
2477 |
-
display: none;
|
2478 |
-
}
|
2479 |
-
|
2480 |
-
.happyforms-form-preview .happyforms-part-wrap--confirmation {
|
2481 |
-
display: none;
|
2482 |
-
}
|
2483 |
-
|
2484 |
-
.happyforms-form-preview .happyforms-part__preview-value {
|
2485 |
-
font-size: 16px;
|
2486 |
-
font-size: var(--happyforms-part-value-font-size);
|
2487 |
-
}
|
2488 |
-
|
2489 |
-
.happyforms-form-preview .happyforms-part--date .happyforms-part__el > div.happyforms-part__preview-value {
|
2490 |
-
display: block;
|
2491 |
-
}
|
2492 |
-
|
2493 |
-
.happyforms-form-preview .happyforms-part--address .happyforms-part__el {
|
2494 |
-
display: none;
|
2495 |
}
|
2496 |
|
2497 |
-
.happyforms-form-preview .happyforms-part--
|
2498 |
-
|
2499 |
-
|
2500 |
-
align-items: center;
|
2501 |
}
|
2502 |
|
2503 |
.happyforms-form-preview .happyforms-part--submit * {
|
@@ -2505,10 +2450,6 @@ form > .happyforms-message-notices .error {
|
|
2505 |
margin-bottom: 20px;
|
2506 |
}
|
2507 |
|
2508 |
-
.happyforms-form-preview .happyforms-part--submit input {
|
2509 |
-
order: 2;
|
2510 |
-
}
|
2511 |
-
|
2512 |
.happyforms-form--submit-button-align-center.happyforms-form-preview .happyforms-part--submit,
|
2513 |
.happyforms-form--submit-button-fullwidth.happyforms-form-preview .happyforms-part--submit {
|
2514 |
flex-flow: column wrap;
|
@@ -2535,4 +2476,39 @@ form > .happyforms-message-notices .error {
|
|
2535 |
.happyforms-form-preview .happyforms-part--submit input {
|
2536 |
margin-right: 0;
|
2537 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2538 |
}
|
27 |
--happyforms-color-choice-checkmark-bg: #fff;
|
28 |
--happyforms-color-choice-checkmark-bg-focus: #000;
|
29 |
--happyforms-color-choice-checkmark-color: #fff;
|
30 |
+
--happyforms-color-dropdown-bg-color: #fff;
|
31 |
+
--happyforms-color-dropdown-item-bg: #fff;
|
32 |
+
--happyforms-color-dropdown-item-text: #000;
|
33 |
+
--happyforms-color-dropdown-item-bg-hover: #dbdbdb;
|
34 |
+
--happyforms-color-dropdown-item-text-hover: #000;
|
35 |
/* font */
|
36 |
--happyforms-form-title-font-size: 32px;
|
37 |
--happyforms-form-font-weight: normal;
|
118 |
align-self: flex-start;
|
119 |
}
|
120 |
|
121 |
+
.happyforms-part--width-auto {
|
122 |
+
align-self: flex-start;
|
123 |
+
flex-grow: 1;
|
124 |
+
width: auto;
|
125 |
+
}
|
126 |
+
|
127 |
+
.happyforms-part--width-auto + .happyforms-part--submit,
|
128 |
+
.happyforms-part--width-auto + .happyforms-part--recaptcha + .happyforms-part--submit,
|
129 |
+
.happyforms-part--width-auto + .happyforms-part--recaptcha {
|
130 |
+
position: relative;
|
131 |
+
top: -30px;
|
132 |
+
align-self: flex-end;
|
133 |
+
width: auto !important;
|
134 |
+
margin-bottom: 0 !important;
|
135 |
+
padding-top: 5px;
|
136 |
+
padding-bottom: 0;
|
137 |
+
}
|
138 |
+
|
139 |
+
.happyforms-part--width-auto + .happyforms-part--recaptcha,
|
140 |
+
.happyforms-form--part-outer-padding-narrow .happyforms-part--width-auto + .happyforms-part--recaptcha + .happyforms-part--submit {
|
141 |
+
top: -13px;
|
142 |
+
}
|
143 |
+
|
144 |
+
.happyforms-form--part-outer-padding-narrow .happyforms-part--width-auto + .happyforms-part--submit {
|
145 |
+
top: -10px;
|
146 |
+
}
|
147 |
+
|
148 |
+
.happyforms-form--part-outer-padding-narrow .happyforms-part--width-auto + .happyforms-part--recaptcha {
|
149 |
+
top: 3px;
|
150 |
+
}
|
151 |
+
|
152 |
+
.happyforms-form--part-outer-padding-wide .happyforms-part--width-auto + .happyforms-part--submit {
|
153 |
+
top: -25px;
|
154 |
+
}
|
155 |
+
|
156 |
+
.happyforms-form--part-outer-padding-wide .happyforms-part--width-auto + .happyforms-part--recaptcha {
|
157 |
+
top: -23px;
|
158 |
+
}
|
159 |
+
|
160 |
+
.happyforms-form--part-outer-padding-wide .happyforms-part--width-auto + .happyforms-part--recaptcha + .happyforms-part--submit {
|
161 |
+
top: -45px;
|
162 |
+
}
|
163 |
+
|
164 |
+
.happyforms-part--width-auto + .happyforms-part--submit input[type=submit],
|
165 |
+
.happyforms-part--width-auto + .happyforms-part--recaptcha + .happyforms-part--submit input[type=submit] {
|
166 |
+
width: 100%;
|
167 |
+
padding: 17px 50px;
|
168 |
+
}
|
169 |
+
|
170 |
.happyforms-part__label {
|
171 |
display: inline-block;
|
172 |
cursor: pointer;
|
2133 |
border-color: #000;
|
2134 |
border-color: var(--happyforms-color-table-row-even-text);
|
2135 |
}
|
|
|
|
|
|
|
|
|
2136 |
|
2137 |
.happyforms-table__row:not(.happyforms-table__row--head):nth-child(even) {
|
2138 |
background-color: #fff;
|
2146 |
border-color: #000;
|
2147 |
border-color: var(--happyforms-color-table-row-odd-text);
|
2148 |
}
|
|
|
|
|
|
|
|
|
2149 |
.happyforms-table__row--body {
|
2150 |
align-items: center;
|
2151 |
}
|
2235 |
}
|
2236 |
|
2237 |
.happyforms-part--recaptcha {
|
|
|
2238 |
padding: 0 1%;
|
2239 |
}
|
2240 |
|
2366 |
text-align: left;
|
2367 |
margin: 0;
|
2368 |
background-color: #fff;
|
2369 |
+
background-color: var(--happyforms-color-dropdown-bg-color);
|
2370 |
border: 1px solid #dbdbdb;
|
2371 |
white-space: nowrap;
|
2372 |
width: 100%;
|
2389 |
align-items: center;
|
2390 |
padding: 5px 10px;
|
2391 |
transition: background-color 0.2s ease-in;
|
2392 |
+
color: #000;
|
2393 |
+
color: var(--happyforms-color-dropdown-item-text);
|
2394 |
+
background-color: #fff;
|
2395 |
+
background-color: var(--happyforms-color-dropdown-item-bg);
|
2396 |
}
|
2397 |
.happyforms-custom-select-dropdown li.happyforms-custom-select-dropdown__item:hover {
|
2398 |
+
color: #000;
|
2399 |
+
color: var(--happyforms-color-dropdown-item-text-hover);
|
2400 |
background-color: #dbdbdb;
|
2401 |
+
background-color: var(--happyforms-color-dropdown-item-bg-hover);
|
2402 |
}
|
2403 |
.happyforms-custom-select-dropdown .happyforms-flag {
|
2404 |
font-size: 30px;
|
2412 |
color: #888888;
|
2413 |
}
|
2414 |
|
2415 |
+
.happyforms-form-preview .happyforms-flex {
|
2416 |
+
padding: 0 1%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2417 |
}
|
2418 |
|
2419 |
+
.happyforms-part-preview .happyforms-part__label {
|
|
|
|
|
2420 |
cursor: default;
|
2421 |
+
margin-bottom: 10px;
|
2422 |
}
|
2423 |
|
2424 |
+
.happyforms-part-preview .happyforms-part__label .label {
|
2425 |
+
font-weight: bold;
|
2426 |
+
color: #000;
|
2427 |
+
color: var(--happyforms-color-table-row-odd-text);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2428 |
}
|
2429 |
|
2430 |
+
.happyforms-form-preview .happyforms-part--submit {
|
2431 |
display: flex;
|
2432 |
+
flex-flow: row wrap;
|
2433 |
align-items: center;
|
2434 |
+
margin-top: 30px;
|
2435 |
}
|
2436 |
|
2437 |
+
.happyforms-form-preview .happyforms-part--submit,
|
2438 |
+
.happyforms-form-preview .happyforms-part--recaptcha {
|
2439 |
+
padding-left: 0;
|
2440 |
+
padding-right: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2441 |
}
|
2442 |
|
2443 |
+
.happyforms-form-preview .happyforms-part--recaptcha {
|
2444 |
+
margin-top: 50px;
|
2445 |
+
margin-bottom: 0;
|
|
|
2446 |
}
|
2447 |
|
2448 |
.happyforms-form-preview .happyforms-part--submit * {
|
2450 |
margin-bottom: 20px;
|
2451 |
}
|
2452 |
|
|
|
|
|
|
|
|
|
2453 |
.happyforms-form--submit-button-align-center.happyforms-form-preview .happyforms-part--submit,
|
2454 |
.happyforms-form--submit-button-fullwidth.happyforms-form-preview .happyforms-part--submit {
|
2455 |
flex-flow: column wrap;
|
2476 |
.happyforms-form-preview .happyforms-part--submit input {
|
2477 |
margin-right: 0;
|
2478 |
}
|
2479 |
+
}
|
2480 |
+
|
2481 |
+
.happyforms-hide {
|
2482 |
+
display: none;
|
2483 |
+
}
|
2484 |
+
|
2485 |
+
.happyforms-part-preview {
|
2486 |
+
margin-bottom: 0;
|
2487 |
+
padding: 10px 1%;
|
2488 |
+
}
|
2489 |
+
|
2490 |
+
.happyforms-part-preview .happyforms-part__el-preview {
|
2491 |
+
font-size: 16px;
|
2492 |
+
font-size: var(--happyforms-part-value-font-size);
|
2493 |
+
}
|
2494 |
+
|
2495 |
+
.happyforms-part-preview {
|
2496 |
+
background-color: #fcfcfc;
|
2497 |
+
background-color: var(--happyforms-color-table-row-odd);
|
2498 |
+
}
|
2499 |
+
|
2500 |
+
.happyforms-part-preview:nth-child(even) {
|
2501 |
+
background-color: #efefef;
|
2502 |
+
background-color: var(--happyforms-color-table-row-even);
|
2503 |
+
}
|
2504 |
+
|
2505 |
+
.happyforms-part-preview:nth-child(even) .happyforms-part__label .label {
|
2506 |
+
color: #000;
|
2507 |
+
color: var(--happyforms-color-table-row-even-text);
|
2508 |
+
}
|
2509 |
+
|
2510 |
+
.happyforms-form-preview > p {
|
2511 |
+
padding: 45px 1% 10px;
|
2512 |
+
font-size: 16px;
|
2513 |
+
font-size: var(--happyforms-part-value-font-size);
|
2514 |
}
|
assets/js/customize.js
CHANGED
@@ -1201,6 +1201,8 @@
|
|
1201 |
var $textarea = $( '#' + editorId, this.$el );
|
1202 |
wp.editor.initialize( editorId, editorSettings );
|
1203 |
} );
|
|
|
|
|
1204 |
},
|
1205 |
|
1206 |
setupHelpPointers: function() {
|
@@ -1741,6 +1743,7 @@
|
|
1741 |
$part.removeClass( 'happyforms-part--width-half' );
|
1742 |
$part.removeClass( 'happyforms-part--width-full' );
|
1743 |
$part.removeClass( 'happyforms-part--width-third' );
|
|
|
1744 |
$part.addClass( 'happyforms-part--width-' + width);
|
1745 |
},
|
1746 |
|
@@ -1826,8 +1829,10 @@
|
|
1826 |
if ( captcha ) {
|
1827 |
var siteKey = happyForms.form.get( 'captcha_site_key' ) || 'null';
|
1828 |
$recaptcha.attr( 'data-sitekey', siteKey );
|
|
|
1829 |
$recaptcha.happyFormPart( 'render' );
|
1830 |
} else {
|
|
|
1831 |
$recaptcha.happyFormPart( 'reset' );
|
1832 |
}
|
1833 |
}
|
1201 |
var $textarea = $( '#' + editorId, this.$el );
|
1202 |
wp.editor.initialize( editorId, editorSettings );
|
1203 |
} );
|
1204 |
+
|
1205 |
+
this.onChangeCaptcha();
|
1206 |
},
|
1207 |
|
1208 |
setupHelpPointers: function() {
|
1743 |
$part.removeClass( 'happyforms-part--width-half' );
|
1744 |
$part.removeClass( 'happyforms-part--width-full' );
|
1745 |
$part.removeClass( 'happyforms-part--width-third' );
|
1746 |
+
$part.removeClass( 'happyforms-part--width-auto' );
|
1747 |
$part.addClass( 'happyforms-part--width-' + width);
|
1748 |
},
|
1749 |
|
1829 |
if ( captcha ) {
|
1830 |
var siteKey = happyForms.form.get( 'captcha_site_key' ) || 'null';
|
1831 |
$recaptcha.attr( 'data-sitekey', siteKey );
|
1832 |
+
$recaptcha.show();
|
1833 |
$recaptcha.happyFormPart( 'render' );
|
1834 |
} else {
|
1835 |
+
$recaptcha.hide();
|
1836 |
$recaptcha.happyFormPart( 'reset' );
|
1837 |
}
|
1838 |
}
|
assets/js/frontend.js
CHANGED
@@ -172,12 +172,12 @@
|
|
172 |
isValid = isValid && $( this ).happyFormPart( 'isValid' );
|
173 |
} );
|
174 |
} else {
|
175 |
-
// Check only
|
176 |
-
var $
|
177 |
|
178 |
-
$
|
179 |
-
isValid = isValid && $
|
180 |
-
}
|
181 |
}
|
182 |
|
183 |
this.$submits.attr( 'disabled', ! isValid );
|
@@ -199,7 +199,11 @@
|
|
199 |
var $parts = $( '[data-happyforms-type]', this.$form );
|
200 |
var partData = $parts.map( function( i, part ) {
|
201 |
return $( part ).happyFormPart( 'serialize' );
|
202 |
-
} )
|
|
|
|
|
|
|
|
|
203 |
|
204 |
var data = formData.concat( partData );
|
205 |
|
@@ -261,7 +265,7 @@
|
|
261 |
|
262 |
var elTopOffset = $el.offset().top;
|
263 |
|
264 |
-
$('html, body').animate({
|
265 |
scrollTop: elTopOffset + 'px'
|
266 |
}, 500);
|
267 |
}
|
@@ -295,10 +299,10 @@
|
|
295 |
if ( ! method ) {
|
296 |
$.data( this, 'HappyForm', new HappyForms.Form( this, arguments ) );
|
297 |
} else {
|
298 |
-
var
|
299 |
|
300 |
-
if (
|
301 |
-
return
|
302 |
}
|
303 |
}
|
304 |
} );
|
172 |
isValid = isValid && $( this ).happyFormPart( 'isValid' );
|
173 |
} );
|
174 |
} else {
|
175 |
+
// Check only recaptcha
|
176 |
+
var $recaptcha = $( '[data-happyforms-type=recaptcha]', this.$form );
|
177 |
|
178 |
+
if ( $recaptcha.length ) {
|
179 |
+
isValid = isValid && $recaptcha.happyFormPart( 'isValid' );
|
180 |
+
}
|
181 |
}
|
182 |
|
183 |
this.$submits.attr( 'disabled', ! isValid );
|
199 |
var $parts = $( '[data-happyforms-type]', this.$form );
|
200 |
var partData = $parts.map( function( i, part ) {
|
201 |
return $( part ).happyFormPart( 'serialize' );
|
202 |
+
} )
|
203 |
+
.toArray()
|
204 |
+
.filter( function( entry ) {
|
205 |
+
return null !== entry.name && undefined !== entry.name;
|
206 |
+
} );
|
207 |
|
208 |
var data = formData.concat( partData );
|
209 |
|
265 |
|
266 |
var elTopOffset = $el.offset().top;
|
267 |
|
268 |
+
$('html, body').animate( {
|
269 |
scrollTop: elTopOffset + 'px'
|
270 |
}, 500);
|
271 |
}
|
299 |
if ( ! method ) {
|
300 |
$.data( this, 'HappyForm', new HappyForms.Form( this, arguments ) );
|
301 |
} else {
|
302 |
+
var instance = $.data( this, 'HappyForm' );
|
303 |
|
304 |
+
if ( instance && instance[method] ) {
|
305 |
+
return instance[ method ].apply( instance, Array.prototype.slice.call( arguments, 1 ) );
|
306 |
}
|
307 |
}
|
308 |
} );
|
assets/js/lib/happyforms-select.js
CHANGED
@@ -37,10 +37,7 @@
|
|
37 |
}
|
38 |
|
39 |
this.bindEvents();
|
40 |
-
|
41 |
-
if (this.$input.val()) {
|
42 |
-
this.verifyValue();
|
43 |
-
}
|
44 |
},
|
45 |
|
46 |
bindEvents: function() {
|
@@ -155,6 +152,8 @@
|
|
155 |
self.$input.val(this.defaultValue);
|
156 |
self.$select.val(this.defaultValue);
|
157 |
}
|
|
|
|
|
158 |
},
|
159 |
|
160 |
cleanUp: function() {
|
37 |
}
|
38 |
|
39 |
this.bindEvents();
|
40 |
+
this.verifyValue();
|
|
|
|
|
|
|
41 |
},
|
42 |
|
43 |
bindEvents: function() {
|
152 |
self.$input.val(this.defaultValue);
|
153 |
self.$select.val(this.defaultValue);
|
154 |
}
|
155 |
+
|
156 |
+
this.$el.trigger( 'happyforms-change' );
|
157 |
},
|
158 |
|
159 |
cleanUp: function() {
|
assets/js/parts/part-table.js
CHANGED
@@ -190,17 +190,17 @@
|
|
190 |
var columnModel = this.model.get( 'columns' ).get( columnID );
|
191 |
var isChecked = $( e.target ).is( ':checked' );
|
192 |
|
193 |
-
this.model.get( '
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
$( 'li [name=column_is_default]', this.$el ).attr( 'checked', false );
|
198 |
|
199 |
-
|
200 |
-
columnModel.set( 'is_default', 1 );
|
201 |
-
$( e.target ).attr( 'checked', true );
|
202 |
}
|
203 |
|
|
|
|
|
|
|
204 |
var data = {
|
205 |
id: this.model.get( 'id' ),
|
206 |
callback: 'onTableColumnDefaultChangeCallback',
|
190 |
var columnModel = this.model.get( 'columns' ).get( columnID );
|
191 |
var isChecked = $( e.target ).is( ':checked' );
|
192 |
|
193 |
+
if ( ! this.model.get( 'allow_multiple_selection' ) ) {
|
194 |
+
this.model.get( 'columns' ).forEach( function( column ) {
|
195 |
+
column.set( 'is_default', 0 );
|
196 |
+
} );
|
|
|
197 |
|
198 |
+
$( 'li [name=column_is_default]', this.$el ).attr( 'checked', false );
|
|
|
|
|
199 |
}
|
200 |
|
201 |
+
columnModel.set( 'is_default', isChecked ? 1 : 0 );
|
202 |
+
$( e.target ).attr( 'checked', isChecked );
|
203 |
+
|
204 |
var data = {
|
205 |
id: this.model.get( 'id' ),
|
206 |
callback: 'onTableColumnDefaultChangeCallback',
|
happyforms.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Plugin URI: https://happyforms.me
|
6 |
* Description: Your friendly drag and drop contact form builder for creating contact forms, lead generation forms, feedback forms, quote forms, survey forms and more!
|
7 |
* Author: The Theme Foundry
|
8 |
-
* Version: 1.5.
|
9 |
* Author URI: https://thethemefoundry.com
|
10 |
* Upgrade URI: https://thethemefoundry.com
|
11 |
*/
|
@@ -13,7 +13,7 @@
|
|
13 |
/**
|
14 |
* The current version of the plugin.
|
15 |
*/
|
16 |
-
define( 'HAPPYFORMS_VERSION', '1.5.
|
17 |
|
18 |
if ( ! function_exists( 'happyforms_plugin_file' ) ):
|
19 |
/**
|
5 |
* Plugin URI: https://happyforms.me
|
6 |
* Description: Your friendly drag and drop contact form builder for creating contact forms, lead generation forms, feedback forms, quote forms, survey forms and more!
|
7 |
* Author: The Theme Foundry
|
8 |
+
* Version: 1.5.11
|
9 |
* Author URI: https://thethemefoundry.com
|
10 |
* Upgrade URI: https://thethemefoundry.com
|
11 |
*/
|
13 |
/**
|
14 |
* The current version of the plugin.
|
15 |
*/
|
16 |
+
define( 'HAPPYFORMS_VERSION', '1.5.11' );
|
17 |
|
18 |
if ( ! function_exists( 'happyforms_plugin_file' ) ):
|
19 |
/**
|
inc/classes/class-form-controller.php
CHANGED
@@ -54,11 +54,14 @@ class HappyForms_Form_Controller {
|
|
54 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
55 |
add_filter( 'happyforms_form_has_captcha', array( $this, 'has_captcha' ), 10, 2 );
|
56 |
add_filter( 'happyforms_get_steps', array( $this, 'steps_add_preview' ), 10, 2 );
|
|
|
57 |
add_filter( 'happyforms_get_template_path', array( $this, 'submit_preview_template' ), 10, 2 );
|
58 |
add_filter( 'happyforms_get_template_path', array( $this, 'confirm_preview_partial' ), 20, 2 );
|
59 |
add_filter( 'happyforms_form_class', array( $this, 'form_html_class_preview' ), 10, 2 );
|
|
|
60 |
add_filter( 'happyforms_part_attributes', array( $this, 'part_attributes_preview' ), 10, 4 );
|
61 |
-
|
|
|
62 |
|
63 |
if ( is_customize_preview() ) {
|
64 |
add_filter( 'happyforms_part_class', array( $this, 'part_class' ) );
|
@@ -881,6 +884,23 @@ class HappyForms_Form_Controller {
|
|
881 |
return $attributes;
|
882 |
}
|
883 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
884 |
public function form_html_class_preview( $classes, $form ) {
|
885 |
if ( happyforms_get_form_property( $form, 'preview_before_submit' )
|
886 |
&& ( 'review' === happyforms_get_current_step( $form ) ) ) {
|
@@ -891,6 +911,15 @@ class HappyForms_Form_Controller {
|
|
891 |
return $classes;
|
892 |
}
|
893 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
894 |
public function script_dependencies( $deps, $forms ) {
|
895 |
$has_captcha = false;
|
896 |
|
54 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
55 |
add_filter( 'happyforms_form_has_captcha', array( $this, 'has_captcha' ), 10, 2 );
|
56 |
add_filter( 'happyforms_get_steps', array( $this, 'steps_add_preview' ), 10, 2 );
|
57 |
+
|
58 |
add_filter( 'happyforms_get_template_path', array( $this, 'submit_preview_template' ), 10, 2 );
|
59 |
add_filter( 'happyforms_get_template_path', array( $this, 'confirm_preview_partial' ), 20, 2 );
|
60 |
add_filter( 'happyforms_form_class', array( $this, 'form_html_class_preview' ), 10, 2 );
|
61 |
+
add_action( 'happyforms_after_title', array( $this, 'form_open_preview' ) );
|
62 |
add_filter( 'happyforms_part_attributes', array( $this, 'part_attributes_preview' ), 10, 4 );
|
63 |
+
add_action( 'happyforms_part_before', array( $this, 'part_before_preview' ), 10, 2 );
|
64 |
+
add_action( 'happyforms_part_after', array( $this, 'part_after_preview' ), 10, 2 );
|
65 |
|
66 |
if ( is_customize_preview() ) {
|
67 |
add_filter( 'happyforms_part_class', array( $this, 'part_class' ) );
|
884 |
return $attributes;
|
885 |
}
|
886 |
|
887 |
+
public function part_before_preview( $part, $form ) {
|
888 |
+
if ( happyforms_get_form_property( $form, 'preview_before_submit' )
|
889 |
+
&& ( 'review' === happyforms_get_current_step( $form ) ) ) {
|
890 |
+
|
891 |
+
require( happyforms_get_include_folder() . '/templates/partials/part-preview.php' );
|
892 |
+
}
|
893 |
+
}
|
894 |
+
|
895 |
+
public function part_after_preview( $part, $form ) {
|
896 |
+
if ( happyforms_get_form_property( $form, 'preview_before_submit' )
|
897 |
+
&& ( 'review' === happyforms_get_current_step( $form ) ) ) {
|
898 |
+
?>
|
899 |
+
</div></div>
|
900 |
+
<?php
|
901 |
+
}
|
902 |
+
}
|
903 |
+
|
904 |
public function form_html_class_preview( $classes, $form ) {
|
905 |
if ( happyforms_get_form_property( $form, 'preview_before_submit' )
|
906 |
&& ( 'review' === happyforms_get_current_step( $form ) ) ) {
|
911 |
return $classes;
|
912 |
}
|
913 |
|
914 |
+
public function form_open_preview( $form ) {
|
915 |
+
if ( happyforms_get_form_property( $form, 'preview_before_submit' )
|
916 |
+
&& ( 'review' === happyforms_get_current_step( $form ) ) ) {
|
917 |
+
?>
|
918 |
+
<p><?php _e( 'Please review your submission...', 'happyforms' ); ?></p>
|
919 |
+
<?php
|
920 |
+
}
|
921 |
+
}
|
922 |
+
|
923 |
public function script_dependencies( $deps, $forms ) {
|
924 |
$has_captcha = false;
|
925 |
|
inc/classes/class-form-part-library.php
CHANGED
@@ -154,6 +154,16 @@ class HappyForms_Form_Part_Library {
|
|
154 |
return '';
|
155 |
}
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
/**
|
158 |
* Applies validation rules to part data passed to method.
|
159 |
*
|
154 |
return '';
|
155 |
}
|
156 |
|
157 |
+
public function get_part_default_value( $part_data = array() ) {
|
158 |
+
if ( isset( $part_data['type'] ) ) {
|
159 |
+
$part = $this->get_part( $part_data['type'] );
|
160 |
+
|
161 |
+
return $part->get_default_value( $part_data );
|
162 |
+
}
|
163 |
+
|
164 |
+
return '';
|
165 |
+
}
|
166 |
+
|
167 |
/**
|
168 |
* Applies validation rules to part data passed to method.
|
169 |
*
|
inc/classes/class-form-part.php
CHANGED
@@ -26,7 +26,7 @@ class HappyForms_Form_Part {
|
|
26 |
|
27 |
public function customize_enqueue_scripts( $deps = array() ) {}
|
28 |
|
29 |
-
public function get_default_value() {
|
30 |
return '';
|
31 |
}
|
32 |
|
26 |
|
27 |
public function customize_enqueue_scripts( $deps = array() ) {}
|
28 |
|
29 |
+
public function get_default_value( $part_data = array() ) {
|
30 |
return '';
|
31 |
}
|
32 |
|
inc/classes/class-form-styles.php
CHANGED
@@ -766,8 +766,8 @@ class HappyForms_Form_Styles {
|
|
766 |
),
|
767 |
array(
|
768 |
'type' => 'divider',
|
769 |
-
'label' => __( '
|
770 |
-
'condition' => '( happyForms.form.get(\'parts\').findWhere( { type: \'table\' } ) )'
|
771 |
),
|
772 |
array(
|
773 |
'type' => 'color',
|
766 |
),
|
767 |
array(
|
768 |
'type' => 'divider',
|
769 |
+
'label' => __( 'Tables', 'happyforms' ),
|
770 |
+
'condition' => '( happyForms.form.get(\'parts\').findWhere( { type: \'table\' } ) || happyForms.form.get(\'preview_before_submit\') )'
|
771 |
),
|
772 |
array(
|
773 |
'type' => 'color',
|
inc/classes/class-message-controller.php
CHANGED
@@ -243,6 +243,14 @@ class HappyForms_Message_Controller {
|
|
243 |
}
|
244 |
}
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
// Validate ReCaptcha
|
247 |
if ( happyforms_get_form_controller()->has_recaptcha_protection( $form ) ) {
|
248 |
$captcha_value = $this->validate_captcha( $form );
|
@@ -252,14 +260,6 @@ class HappyForms_Message_Controller {
|
|
252 |
}
|
253 |
}
|
254 |
|
255 |
-
do_action( 'happyforms_step', $form );
|
256 |
-
}
|
257 |
-
|
258 |
-
public function default_submission_step( $form ) {
|
259 |
-
if ( 'submit' !== happyforms_get_current_step( $form ) ) {
|
260 |
-
return;
|
261 |
-
}
|
262 |
-
|
263 |
$form_id = $form['ID'];
|
264 |
$form_controller = happyforms_get_form_controller();
|
265 |
$session = happyforms_get_session();
|
@@ -351,6 +351,15 @@ class HappyForms_Message_Controller {
|
|
351 |
return;
|
352 |
}
|
353 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
$form_id = $form['ID'];
|
355 |
$form_controller = happyforms_get_form_controller();
|
356 |
$session = happyforms_get_session();
|
@@ -649,7 +658,12 @@ class HappyForms_Message_Controller {
|
|
649 |
foreach ( $form['parts'] as $part_data ) {
|
650 |
$part = happyforms_get_part_library()->get_part( $part_data['type'] );
|
651 |
$part_id = $part_data['id'];
|
652 |
-
$part_value =
|
|
|
|
|
|
|
|
|
|
|
653 |
$message_array['parts'][$part_id] = $part_value;
|
654 |
}
|
655 |
}
|
@@ -690,10 +704,10 @@ class HappyForms_Message_Controller {
|
|
690 |
$part_id = $part_data['id'];
|
691 |
$label = happyforms_get_part_label( $part_data );
|
692 |
$value = happyforms_get_message_part_value( $message['parts'][$part_id], $part_data, 'email' );
|
693 |
-
$content_lines[] = "
|
694 |
}
|
695 |
|
696 |
-
$content = implode( '<br>', $content_lines );
|
697 |
$email_message->set_content( $content );
|
698 |
|
699 |
// Add a From header it the form includes an email part
|
243 |
}
|
244 |
}
|
245 |
|
246 |
+
do_action( 'happyforms_step', $form );
|
247 |
+
}
|
248 |
+
|
249 |
+
public function default_submission_step( $form ) {
|
250 |
+
if ( 'submit' !== happyforms_get_current_step( $form ) ) {
|
251 |
+
return;
|
252 |
+
}
|
253 |
+
|
254 |
// Validate ReCaptcha
|
255 |
if ( happyforms_get_form_controller()->has_recaptcha_protection( $form ) ) {
|
256 |
$captcha_value = $this->validate_captcha( $form );
|
260 |
}
|
261 |
}
|
262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
$form_id = $form['ID'];
|
264 |
$form_controller = happyforms_get_form_controller();
|
265 |
$session = happyforms_get_session();
|
351 |
return;
|
352 |
}
|
353 |
|
354 |
+
// Validate ReCaptcha
|
355 |
+
if ( happyforms_get_form_controller()->has_recaptcha_protection( $form ) ) {
|
356 |
+
$captcha_value = $this->validate_captcha( $form );
|
357 |
+
|
358 |
+
if ( is_wp_error( $captcha_value ) ) {
|
359 |
+
wp_send_json_error();
|
360 |
+
}
|
361 |
+
}
|
362 |
+
|
363 |
$form_id = $form['ID'];
|
364 |
$form_controller = happyforms_get_form_controller();
|
365 |
$session = happyforms_get_session();
|
658 |
foreach ( $form['parts'] as $part_data ) {
|
659 |
$part = happyforms_get_part_library()->get_part( $part_data['type'] );
|
660 |
$part_id = $part_data['id'];
|
661 |
+
$part_value = $part->get_default_value( $part_data );
|
662 |
+
|
663 |
+
if ( isset( $meta_entries[$part_id] ) ) {
|
664 |
+
$part_value = $meta_entries[$part_id][0];
|
665 |
+
}
|
666 |
+
|
667 |
$message_array['parts'][$part_id] = $part_value;
|
668 |
}
|
669 |
}
|
704 |
$part_id = $part_data['id'];
|
705 |
$label = happyforms_get_part_label( $part_data );
|
706 |
$value = happyforms_get_message_part_value( $message['parts'][$part_id], $part_data, 'email' );
|
707 |
+
$content_lines[] = "<b>$label</b><br>$value";
|
708 |
}
|
709 |
|
710 |
+
$content = implode( '<br><br>', $content_lines );
|
711 |
$email_message->set_content( $content );
|
712 |
|
713 |
// Add a From header it the form includes an email part
|
inc/classes/class-session.php
CHANGED
@@ -113,7 +113,7 @@ class HappyForms_Session {
|
|
113 |
}
|
114 |
|
115 |
public function get_value( $location = '', $component = false ) {
|
116 |
-
$value =
|
117 |
|
118 |
if ( isset( $this->values[$location] ) ) {
|
119 |
$value = $this->values[$location];
|
113 |
}
|
114 |
|
115 |
public function get_value( $location = '', $component = false ) {
|
116 |
+
$value = false;
|
117 |
|
118 |
if ( isset( $this->values[$location] ) ) {
|
119 |
$value = $this->values[$location];
|
inc/classes/parts/class-part-address.php
CHANGED
@@ -15,9 +15,7 @@ class HappyForms_Part_Address extends HappyForms_Form_Part {
|
|
15 |
|
16 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
17 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
18 |
-
add_filter( 'happyforms_part_value', array( $this, 'get_part_value' ), 10, 4 );
|
19 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
20 |
-
add_action( 'happyforms_part_input_before', array( $this, 'preview_input_before' ), 10, 2 );
|
21 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
22 |
|
23 |
add_action( 'wp_ajax_' . $this->ajax_action_autocomplete, array( $this, 'ajax_autocomplete' ) );
|
@@ -117,7 +115,7 @@ class HappyForms_Part_Address extends HappyForms_Form_Part {
|
|
117 |
include( happyforms_get_include_folder() . '/templates/parts/frontend-address.php' );
|
118 |
}
|
119 |
|
120 |
-
public function get_default_value() {
|
121 |
return array(
|
122 |
'full' => '',
|
123 |
'country' => '',
|
@@ -135,7 +133,7 @@ class HappyForms_Part_Address extends HappyForms_Form_Part {
|
|
135 |
* @return string
|
136 |
*/
|
137 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
138 |
-
$sanitized_value = $this->get_default_value();
|
139 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
140 |
|
141 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -272,16 +270,6 @@ class HappyForms_Part_Address extends HappyForms_Form_Part {
|
|
272 |
return $class;
|
273 |
}
|
274 |
|
275 |
-
public function get_part_value( $value, $part, $form, $component ) {
|
276 |
-
if ( $this->type === $part['type'] ) {
|
277 |
-
if ( false !== $component ) {
|
278 |
-
$value = isset( $value[$component] ) ? $value[$component] : '';
|
279 |
-
}
|
280 |
-
}
|
281 |
-
|
282 |
-
return $value;
|
283 |
-
}
|
284 |
-
|
285 |
public function stringify_value( $value, $part, $form ) {
|
286 |
if ( $this->type === $part['type'] ) {
|
287 |
extract( $value );
|
@@ -319,21 +307,6 @@ class HappyForms_Part_Address extends HappyForms_Form_Part {
|
|
319 |
return $attributes;
|
320 |
}
|
321 |
|
322 |
-
public function preview_input_before( $part, $form ) {
|
323 |
-
if ( ! happyforms_get_form_property( $form, 'preview_before_submit' )
|
324 |
-
|| ( $this->type !== $part['type'] )
|
325 |
-
|| ( 'review' !== happyforms_get_current_step( $form ) ) ) {
|
326 |
-
|
327 |
-
return;
|
328 |
-
}
|
329 |
-
|
330 |
-
$validated_value = $this->validate_value( happyforms_get_part_value( $part, $form ), $part, $form );
|
331 |
-
$stringified_value = $this->stringify_value( $validated_value, $part, $form );
|
332 |
-
?>
|
333 |
-
<div class="happyforms-part__preview-value"><?php echo $stringified_value; ?></div>
|
334 |
-
<?php
|
335 |
-
}
|
336 |
-
|
337 |
/**
|
338 |
* Enqueue scripts in customizer area.
|
339 |
*
|
15 |
|
16 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
17 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
|
|
18 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
|
|
19 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
20 |
|
21 |
add_action( 'wp_ajax_' . $this->ajax_action_autocomplete, array( $this, 'ajax_autocomplete' ) );
|
115 |
include( happyforms_get_include_folder() . '/templates/parts/frontend-address.php' );
|
116 |
}
|
117 |
|
118 |
+
public function get_default_value( $part_data = array() ) {
|
119 |
return array(
|
120 |
'full' => '',
|
121 |
'country' => '',
|
133 |
* @return string
|
134 |
*/
|
135 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
136 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
137 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
138 |
|
139 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
270 |
return $class;
|
271 |
}
|
272 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
public function stringify_value( $value, $part, $form ) {
|
274 |
if ( $this->type === $part['type'] ) {
|
275 |
extract( $value );
|
307 |
return $attributes;
|
308 |
}
|
309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
/**
|
311 |
* Enqueue scripts in customizer area.
|
312 |
*
|
inc/classes/parts/class-part-checkbox.php
CHANGED
@@ -8,6 +8,7 @@ class HappyForms_Part_Checkbox extends HappyForms_Form_Part {
|
|
8 |
$this->label = __( 'Multiple Choice', 'happyforms' );
|
9 |
$this->description = __( 'For checkboxes allowing multiple selections.', 'happyforms' );
|
10 |
|
|
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
13 |
}
|
@@ -120,7 +121,7 @@ class HappyForms_Part_Checkbox extends HappyForms_Form_Part {
|
|
120 |
);
|
121 |
}
|
122 |
|
123 |
-
public function get_default_value() {
|
124 |
return array();
|
125 |
}
|
126 |
|
@@ -134,7 +135,7 @@ class HappyForms_Part_Checkbox extends HappyForms_Form_Part {
|
|
134 |
* @return array
|
135 |
*/
|
136 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
137 |
-
$sanitized_value = $this->get_default_value();
|
138 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
139 |
|
140 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -177,6 +178,18 @@ class HappyForms_Part_Checkbox extends HappyForms_Form_Part {
|
|
177 |
return $validated_value;
|
178 |
}
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
public function stringify_value( $value, $part, $form ) {
|
181 |
if ( $this->type === $part['type'] ) {
|
182 |
$value = implode( ', ', $value );
|
8 |
$this->label = __( 'Multiple Choice', 'happyforms' );
|
9 |
$this->description = __( 'For checkboxes allowing multiple selections.', 'happyforms' );
|
10 |
|
11 |
+
add_filter( 'happyforms_part_value', array( $this, 'get_part_value' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
13 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
14 |
}
|
121 |
);
|
122 |
}
|
123 |
|
124 |
+
public function get_default_value( $part_data = array() ) {
|
125 |
return array();
|
126 |
}
|
127 |
|
135 |
* @return array
|
136 |
*/
|
137 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
138 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
139 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
140 |
|
141 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
178 |
return $validated_value;
|
179 |
}
|
180 |
|
181 |
+
public function get_part_value( $value, $part, $form ) {
|
182 |
+
if ( $this->type === $part['type'] ) {
|
183 |
+
foreach ( $part['options'] as $option ) {
|
184 |
+
if ( ! happyforms_is_falsy( $option['is_default'] ) ) {
|
185 |
+
$value[] = $option['label'];
|
186 |
+
}
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
return $value;
|
191 |
+
}
|
192 |
+
|
193 |
public function stringify_value( $value, $part, $form ) {
|
194 |
if ( $this->type === $part['type'] ) {
|
195 |
$value = implode( ', ', $value );
|
inc/classes/parts/class-part-date.php
CHANGED
@@ -9,9 +9,7 @@ class HappyForms_Part_Date extends HappyForms_Form_Part {
|
|
9 |
$this->description = __( 'For formatted day, month, year and or time fields.', 'happyforms' );
|
10 |
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
-
add_filter( 'happyforms_part_value', array( $this, 'get_part_value' ), 10, 4 );
|
13 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
14 |
-
add_action( 'happyforms_part_input_before', array( $this, 'preview_input_before' ), 10, 2 );
|
15 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
16 |
}
|
17 |
|
@@ -127,7 +125,7 @@ class HappyForms_Part_Date extends HappyForms_Form_Part {
|
|
127 |
include( happyforms_get_include_folder() . '/templates/parts/frontend-date.php' );
|
128 |
}
|
129 |
|
130 |
-
public function get_default_value() {
|
131 |
return array(
|
132 |
'year' => '',
|
133 |
'month' => '',
|
@@ -148,7 +146,7 @@ class HappyForms_Part_Date extends HappyForms_Form_Part {
|
|
148 |
* @return string
|
149 |
*/
|
150 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
151 |
-
$sanitized_value = $this->get_default_value();
|
152 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
153 |
|
154 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -257,16 +255,6 @@ class HappyForms_Part_Date extends HappyForms_Form_Part {
|
|
257 |
return $validated_value;
|
258 |
}
|
259 |
|
260 |
-
public function get_part_value( $value, $part, $form, $component ) {
|
261 |
-
if ( $this->type === $part['type'] ) {
|
262 |
-
if ( false !== $component ) {
|
263 |
-
$value = isset( $value[$component] ) ? $value[$component] : '';
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
return $value;
|
268 |
-
}
|
269 |
-
|
270 |
public function stringify_value( $value, $part, $form ) {
|
271 |
if ( $this->type === $part['type'] ) {
|
272 |
extract( $value );
|
@@ -311,21 +299,6 @@ class HappyForms_Part_Date extends HappyForms_Form_Part {
|
|
311 |
return $class;
|
312 |
}
|
313 |
|
314 |
-
public function preview_input_before( $part, $form ) {
|
315 |
-
if ( ! happyforms_get_form_property( $form, 'preview_before_submit' )
|
316 |
-
|| ( $this->type !== $part['type'] )
|
317 |
-
|| ( 'review' !== happyforms_get_current_step( $form ) ) ) {
|
318 |
-
|
319 |
-
return;
|
320 |
-
}
|
321 |
-
|
322 |
-
$validated_value = $this->validate_value( happyforms_get_part_value( $part, $form ), $part, $form );
|
323 |
-
$stringified_value = $this->stringify_value( $validated_value, $part, $form );
|
324 |
-
?>
|
325 |
-
<div class="happyforms-part__preview-value"><?php echo $stringified_value; ?></div>
|
326 |
-
<?php
|
327 |
-
}
|
328 |
-
|
329 |
/**
|
330 |
* Enqueue scripts in customizer area.
|
331 |
*
|
9 |
$this->description = __( 'For formatted day, month, year and or time fields.', 'happyforms' );
|
10 |
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
|
|
12 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
|
|
13 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
14 |
}
|
15 |
|
125 |
include( happyforms_get_include_folder() . '/templates/parts/frontend-date.php' );
|
126 |
}
|
127 |
|
128 |
+
public function get_default_value( $part_data = array() ) {
|
129 |
return array(
|
130 |
'year' => '',
|
131 |
'month' => '',
|
146 |
* @return string
|
147 |
*/
|
148 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
149 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
150 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
151 |
|
152 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
255 |
return $validated_value;
|
256 |
}
|
257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
public function stringify_value( $value, $part, $form ) {
|
259 |
if ( $this->type === $part['type'] ) {
|
260 |
extract( $value );
|
299 |
return $class;
|
300 |
}
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
/**
|
303 |
* Enqueue scripts in customizer area.
|
304 |
*
|
inc/classes/parts/class-part-email.php
CHANGED
@@ -10,7 +10,6 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
|
|
10 |
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
13 |
-
add_filter( 'happyforms_part_value', array( $this, 'get_part_value' ), 10, 4 );
|
14 |
}
|
15 |
|
16 |
/**
|
@@ -97,7 +96,7 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
|
|
97 |
include( happyforms_get_include_folder() . '/templates/parts/frontend-email.php' );
|
98 |
}
|
99 |
|
100 |
-
public function get_default_value() {
|
101 |
return array();
|
102 |
}
|
103 |
|
@@ -111,7 +110,7 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
|
|
111 |
* @return string
|
112 |
*/
|
113 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
114 |
-
$sanitized_value = $this->get_default_value();
|
115 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
116 |
|
117 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -157,17 +156,6 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
|
|
157 |
return $validated_values[0];
|
158 |
}
|
159 |
|
160 |
-
public function get_part_value( $value, $part, $form, $component ) {
|
161 |
-
if ( $this->type === $part['type'] ) {
|
162 |
-
if ( false !== $component ) {
|
163 |
-
$value = isset( $value[$component] ) ? $value[$component] : '';
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
return $value;
|
168 |
-
}
|
169 |
-
|
170 |
-
|
171 |
public function html_part_data_attributes( $attributes, $part, $form ) {
|
172 |
if ( $this->type === $part['type'] ) {
|
173 |
if ( $part['confirmation_field'] ) {
|
10 |
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
|
|
13 |
}
|
14 |
|
15 |
/**
|
96 |
include( happyforms_get_include_folder() . '/templates/parts/frontend-email.php' );
|
97 |
}
|
98 |
|
99 |
+
public function get_default_value( $part_data = array() ) {
|
100 |
return array();
|
101 |
}
|
102 |
|
110 |
* @return string
|
111 |
*/
|
112 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
113 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
114 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
115 |
|
116 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
156 |
return $validated_values[0];
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
public function html_part_data_attributes( $attributes, $part, $form ) {
|
160 |
if ( $this->type === $part['type'] ) {
|
161 |
if ( $part['confirmation_field'] ) {
|
inc/classes/parts/class-part-legal.php
CHANGED
@@ -86,7 +86,7 @@ class HappyForms_Part_Legal extends HappyForms_Form_Part {
|
|
86 |
* @return string
|
87 |
*/
|
88 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
89 |
-
$sanitized_value = $this->get_default_value();
|
90 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
91 |
|
92 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -122,7 +122,7 @@ class HappyForms_Part_Legal extends HappyForms_Form_Part {
|
|
122 |
return $validated_value;
|
123 |
}
|
124 |
|
125 |
-
public function get_part_value( $value, $part, $form
|
126 |
if ( $this->type === $part['type']
|
127 |
&& ( 'review' !== happyforms_get_current_step( $form ) ) ) {
|
128 |
|
86 |
* @return string
|
87 |
*/
|
88 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
89 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
90 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
91 |
|
92 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
122 |
return $validated_value;
|
123 |
}
|
124 |
|
125 |
+
public function get_part_value( $value, $part, $form ) {
|
126 |
if ( $this->type === $part['type']
|
127 |
&& ( 'review' !== happyforms_get_current_step( $form ) ) ) {
|
128 |
|
inc/classes/parts/class-part-multi-line-text.php
CHANGED
@@ -8,6 +8,7 @@ class HappyForms_Part_MultiLineText extends HappyForms_Form_Part {
|
|
8 |
$this->label = __( 'Long Text', 'happyforms' );
|
9 |
$this->description = __( 'For paragraph text fields.', 'happyforms' );
|
10 |
|
|
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
}
|
13 |
|
@@ -114,11 +115,11 @@ class HappyForms_Part_MultiLineText extends HappyForms_Form_Part {
|
|
114 |
* @return string
|
115 |
*/
|
116 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
117 |
-
$sanitized_value = $this->get_default_value();
|
118 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
119 |
|
120 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
121 |
-
$sanitized_value =
|
122 |
}
|
123 |
|
124 |
return $sanitized_value;
|
@@ -144,6 +145,14 @@ class HappyForms_Part_MultiLineText extends HappyForms_Form_Part {
|
|
144 |
return $validated_value;
|
145 |
}
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
public function html_part_class( $class, $part, $form ) {
|
148 |
if ( $this->type === $part['type'] ) {
|
149 |
if ( happyforms_get_part_value( $part, $form ) ) {
|
8 |
$this->label = __( 'Long Text', 'happyforms' );
|
9 |
$this->description = __( 'For paragraph text fields.', 'happyforms' );
|
10 |
|
11 |
+
add_filter( 'happyforms_the_part_value', array( $this, 'output_part_value' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
13 |
}
|
14 |
|
115 |
* @return string
|
116 |
*/
|
117 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
118 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
119 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
120 |
|
121 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
122 |
+
$sanitized_value = sanitize_textarea_field( $_REQUEST[$part_name] );
|
123 |
}
|
124 |
|
125 |
return $sanitized_value;
|
145 |
return $validated_value;
|
146 |
}
|
147 |
|
148 |
+
public function output_part_value( $value, $part, $form ) {
|
149 |
+
if ( $this->type === $part['type'] ) {
|
150 |
+
$value = stripslashes( $value );
|
151 |
+
}
|
152 |
+
|
153 |
+
return $value;
|
154 |
+
}
|
155 |
+
|
156 |
public function html_part_class( $class, $part, $form ) {
|
157 |
if ( $this->type === $part['type'] ) {
|
158 |
if ( happyforms_get_part_value( $part, $form ) ) {
|
inc/classes/parts/class-part-number.php
CHANGED
@@ -11,7 +11,6 @@ class HappyForms_Part_Number extends HappyForms_Form_Part {
|
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
13 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
14 |
-
add_filter( 'happyforms_part_value', array( $this, 'get_part_value' ), 10, 4 );
|
15 |
}
|
16 |
|
17 |
/**
|
@@ -122,7 +121,7 @@ class HappyForms_Part_Number extends HappyForms_Form_Part {
|
|
122 |
include( happyforms_get_include_folder() . '/templates/parts/frontend-number.php' );
|
123 |
}
|
124 |
|
125 |
-
public function get_default_value() {
|
126 |
return array();
|
127 |
}
|
128 |
|
@@ -136,7 +135,7 @@ class HappyForms_Part_Number extends HappyForms_Form_Part {
|
|
136 |
* @return string
|
137 |
*/
|
138 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
139 |
-
$sanitized_value = $this->get_default_value();
|
140 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
141 |
|
142 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -190,16 +189,6 @@ class HappyForms_Part_Number extends HappyForms_Form_Part {
|
|
190 |
return $validated_values[0];
|
191 |
}
|
192 |
|
193 |
-
public function get_part_value( $value, $part, $form, $component ) {
|
194 |
-
if ( $this->type === $part['type'] ) {
|
195 |
-
if ( false !== $component ) {
|
196 |
-
$value = isset( $value[$component] ) ? $value[$component] : '';
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
return $value;
|
201 |
-
}
|
202 |
-
|
203 |
/**
|
204 |
* Enqueue scripts in customizer area.
|
205 |
*
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
13 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
|
|
14 |
}
|
15 |
|
16 |
/**
|
121 |
include( happyforms_get_include_folder() . '/templates/parts/frontend-number.php' );
|
122 |
}
|
123 |
|
124 |
+
public function get_default_value( $part_data = array() ) {
|
125 |
return array();
|
126 |
}
|
127 |
|
135 |
* @return string
|
136 |
*/
|
137 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
138 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
139 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
140 |
|
141 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
189 |
return $validated_values[0];
|
190 |
}
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
/**
|
193 |
* Enqueue scripts in customizer area.
|
194 |
*
|
inc/classes/parts/class-part-phone.php
CHANGED
@@ -11,7 +11,6 @@ class HappyForms_Part_Phone extends HappyForms_Form_Part {
|
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
13 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
14 |
-
add_filter( 'happyforms_part_value', array( $this, 'get_part_value' ), 10, 4 );
|
15 |
}
|
16 |
|
17 |
/**
|
@@ -343,7 +342,7 @@ class HappyForms_Part_Phone extends HappyForms_Form_Part {
|
|
343 |
return $phone_countries;
|
344 |
}
|
345 |
|
346 |
-
public function get_default_value() {
|
347 |
return array();
|
348 |
}
|
349 |
|
@@ -357,7 +356,7 @@ class HappyForms_Part_Phone extends HappyForms_Form_Part {
|
|
357 |
* @return string
|
358 |
*/
|
359 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
360 |
-
$sanitized_value = $this->get_default_value();
|
361 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
362 |
|
363 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -408,16 +407,6 @@ class HappyForms_Part_Phone extends HappyForms_Form_Part {
|
|
408 |
return $phone_string;
|
409 |
}
|
410 |
|
411 |
-
public function get_part_value( $value, $part, $form, $component ) {
|
412 |
-
if ( $this->type === $part['type'] ) {
|
413 |
-
if ( false !== $component ) {
|
414 |
-
$value = isset( $value[$component] ) ? $value[$component] : '';
|
415 |
-
}
|
416 |
-
}
|
417 |
-
|
418 |
-
return $value;
|
419 |
-
}
|
420 |
-
|
421 |
public function is_masked( $part ) {
|
422 |
// back compatibility with "Mask this input" option
|
423 |
if ( 1 == $part['masked'] ) {
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
13 |
add_filter( 'happyforms_frontend_dependencies', array( $this, 'script_dependencies' ), 10, 2 );
|
|
|
14 |
}
|
15 |
|
16 |
/**
|
342 |
return $phone_countries;
|
343 |
}
|
344 |
|
345 |
+
public function get_default_value( $part_data = array() ) {
|
346 |
return array();
|
347 |
}
|
348 |
|
356 |
* @return string
|
357 |
*/
|
358 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
359 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
360 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
361 |
|
362 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
407 |
return $phone_string;
|
408 |
}
|
409 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
public function is_masked( $part ) {
|
411 |
// back compatibility with "Mask this input" option
|
412 |
if ( 1 == $part['masked'] ) {
|
inc/classes/parts/class-part-placeholder.php
CHANGED
@@ -100,7 +100,7 @@ class HappyForms_Part_Placeholder extends HappyForms_Form_Part {
|
|
100 |
* @return string
|
101 |
*/
|
102 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
103 |
-
$sanitized_value = $this->get_default_value();
|
104 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
105 |
|
106 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
100 |
* @return string
|
101 |
*/
|
102 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
103 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
104 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
105 |
|
106 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
inc/classes/parts/class-part-radio.php
CHANGED
@@ -9,6 +9,7 @@ class HappyForms_Part_Radio extends HappyForms_Form_Part {
|
|
9 |
$this->label = __( 'Single Choice', 'happyforms' );
|
10 |
$this->description = __( 'For radio buttons allowing one selection.', 'happyforms' );
|
11 |
|
|
|
12 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
13 |
}
|
14 |
|
@@ -138,7 +139,7 @@ class HappyForms_Part_Radio extends HappyForms_Form_Part {
|
|
138 |
* @return string
|
139 |
*/
|
140 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
141 |
-
$sanitized_value = $this->get_default_value();
|
142 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
143 |
|
144 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -175,6 +176,18 @@ class HappyForms_Part_Radio extends HappyForms_Form_Part {
|
|
175 |
return $validated_value;
|
176 |
}
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
public function html_part_class( $class, $part, $form ) {
|
179 |
if ( $this->type === $part['type'] ) {
|
180 |
if ( isset( $part['display_type'] ) && 'block' === $part['display_type'] ) {
|
9 |
$this->label = __( 'Single Choice', 'happyforms' );
|
10 |
$this->description = __( 'For radio buttons allowing one selection.', 'happyforms' );
|
11 |
|
12 |
+
add_filter( 'happyforms_part_value', array( $this, 'get_part_value' ), 10, 3 );
|
13 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
14 |
}
|
15 |
|
139 |
* @return string
|
140 |
*/
|
141 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
142 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
143 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
144 |
|
145 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
176 |
return $validated_value;
|
177 |
}
|
178 |
|
179 |
+
public function get_part_value( $value, $part, $form ) {
|
180 |
+
if ( $this->type === $part['type'] ) {
|
181 |
+
foreach ( $part['options'] as $option ) {
|
182 |
+
if ( ! happyforms_is_falsy( $option['is_default'] ) ) {
|
183 |
+
$value = $option['label'];
|
184 |
+
}
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
return $value;
|
189 |
+
}
|
190 |
+
|
191 |
public function html_part_class( $class, $part, $form ) {
|
192 |
if ( $this->type === $part['type'] ) {
|
193 |
if ( isset( $part['display_type'] ) && 'block' === $part['display_type'] ) {
|
inc/classes/parts/class-part-rating.php
CHANGED
@@ -98,7 +98,7 @@ class HappyForms_Part_Rating extends HappyForms_Form_Part {
|
|
98 |
* @return string
|
99 |
*/
|
100 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
101 |
-
$sanitized_value = $this->get_default_value();
|
102 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
103 |
|
104 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
98 |
* @return string
|
99 |
*/
|
100 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
101 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
102 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
103 |
|
104 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
inc/classes/parts/class-part-scale.php
CHANGED
@@ -131,7 +131,7 @@ class HappyForms_Part_Scale extends HappyForms_Form_Part {
|
|
131 |
* @return string
|
132 |
*/
|
133 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
134 |
-
$sanitized_value = $this->get_default_value();
|
135 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
136 |
|
137 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
131 |
* @return string
|
132 |
*/
|
133 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
134 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
135 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
136 |
|
137 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
inc/classes/parts/class-part-select.php
CHANGED
@@ -136,7 +136,7 @@ class HappyForms_Part_Select extends HappyForms_Form_Part {
|
|
136 |
* @return string
|
137 |
*/
|
138 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
139 |
-
$sanitized_value = $this->get_default_value();
|
140 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
141 |
|
142 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
136 |
* @return string
|
137 |
*/
|
138 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
139 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
140 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
141 |
|
142 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
inc/classes/parts/class-part-single-line-text.php
CHANGED
@@ -8,6 +8,7 @@ class HappyForms_Part_SingleLineText extends HappyForms_Form_Part {
|
|
8 |
$this->label = __( 'Short Text', 'happyforms' );
|
9 |
$this->description = __( 'For single line text fields.', 'happyforms' );
|
10 |
|
|
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
}
|
13 |
|
@@ -97,7 +98,7 @@ class HappyForms_Part_SingleLineText extends HappyForms_Form_Part {
|
|
97 |
* @return string
|
98 |
*/
|
99 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
100 |
-
$sanitized_value = $this->get_default_value();
|
101 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
102 |
|
103 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -127,6 +128,14 @@ class HappyForms_Part_SingleLineText extends HappyForms_Form_Part {
|
|
127 |
return $validated_value;
|
128 |
}
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
public function html_part_class( $class, $part, $form ) {
|
131 |
if ( $this->type === $part['type'] ) {
|
132 |
if ( happyforms_get_part_value( $part, $form ) ) {
|
8 |
$this->label = __( 'Short Text', 'happyforms' );
|
9 |
$this->description = __( 'For single line text fields.', 'happyforms' );
|
10 |
|
11 |
+
add_filter( 'happyforms_the_part_value', array( $this, 'output_part_value' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
13 |
}
|
14 |
|
98 |
* @return string
|
99 |
*/
|
100 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
101 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
102 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
103 |
|
104 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
128 |
return $validated_value;
|
129 |
}
|
130 |
|
131 |
+
public function output_part_value( $value, $part, $form ) {
|
132 |
+
if ( $this->type === $part['type'] ) {
|
133 |
+
$value = stripslashes( $value );
|
134 |
+
}
|
135 |
+
|
136 |
+
return $value;
|
137 |
+
}
|
138 |
+
|
139 |
public function html_part_class( $class, $part, $form ) {
|
140 |
if ( $this->type === $part['type'] ) {
|
141 |
if ( happyforms_get_part_value( $part, $form ) ) {
|
inc/classes/parts/class-part-table.php
CHANGED
@@ -8,7 +8,7 @@ class HappyForms_Part_Table extends HappyForms_Form_Part {
|
|
8 |
$this->label = __( 'Table', 'happyforms' );
|
9 |
$this->description = __( 'For radios and checkboxes displaying in a grid of rows and columns.', 'happyforms' );
|
10 |
|
11 |
-
add_filter( 'happyforms_part_value', array( $this, 'get_part_value' ), 10,
|
12 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
13 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
14 |
add_filter( 'happyforms_message_part_value', array( $this, 'message_part_value' ), 10, 4 );
|
@@ -145,8 +145,16 @@ class HappyForms_Part_Table extends HappyForms_Form_Part {
|
|
145 |
wp_enqueue_script( 'part-table' );
|
146 |
}
|
147 |
|
148 |
-
public function get_default_value() {
|
149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
151 |
|
152 |
/**
|
@@ -159,7 +167,7 @@ class HappyForms_Part_Table extends HappyForms_Form_Part {
|
|
159 |
* @return string
|
160 |
*/
|
161 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
162 |
-
$sanitized_value = $this->get_default_value();
|
163 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
164 |
|
165 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
@@ -222,24 +230,32 @@ class HappyForms_Part_Table extends HappyForms_Form_Part {
|
|
222 |
return $validated_value;
|
223 |
}
|
224 |
|
225 |
-
public function
|
226 |
if ( $this->type === $part['type'] ) {
|
227 |
-
|
228 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
}
|
230 |
}
|
231 |
|
232 |
-
return $
|
233 |
}
|
234 |
|
235 |
-
public function
|
236 |
if ( $this->type === $part['type'] ) {
|
237 |
-
if (
|
238 |
-
$
|
239 |
}
|
240 |
}
|
241 |
|
242 |
-
return $
|
243 |
}
|
244 |
|
245 |
public function stringify_value( $value, $part, $form ) {
|
8 |
$this->label = __( 'Table', 'happyforms' );
|
9 |
$this->description = __( 'For radios and checkboxes displaying in a grid of rows and columns.', 'happyforms' );
|
10 |
|
11 |
+
add_filter( 'happyforms_part_value', array( $this, 'get_part_value' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
13 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
14 |
add_filter( 'happyforms_message_part_value', array( $this, 'message_part_value' ), 10, 4 );
|
145 |
wp_enqueue_script( 'part-table' );
|
146 |
}
|
147 |
|
148 |
+
public function get_default_value( $part_data = array() ) {
|
149 |
+
$value = array();
|
150 |
+
|
151 |
+
if ( $part_data['allow_multiple_selection'] ) {
|
152 |
+
foreach( $part_data['rows'] as $row ) {
|
153 |
+
$value[$row['id']] = array();
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
return $value;
|
158 |
}
|
159 |
|
160 |
/**
|
167 |
* @return string
|
168 |
*/
|
169 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
170 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
171 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
172 |
|
173 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
230 |
return $validated_value;
|
231 |
}
|
232 |
|
233 |
+
public function get_part_value( $value, $part, $form ) {
|
234 |
if ( $this->type === $part['type'] ) {
|
235 |
+
foreach ( $part['columns'] as $columns ) {
|
236 |
+
if ( ! happyforms_is_falsy( $columns['is_default'] ) ) {
|
237 |
+
if ( ! $part['allow_multiple_selection'] ) {
|
238 |
+
$value = $columns['label'];
|
239 |
+
} else {
|
240 |
+
foreach( $value as $r => $row ) {
|
241 |
+
$value[$r][] = $columns['label'];
|
242 |
+
}
|
243 |
+
}
|
244 |
+
}
|
245 |
}
|
246 |
}
|
247 |
|
248 |
+
return $value;
|
249 |
}
|
250 |
|
251 |
+
public function html_part_class( $class, $part, $form ) {
|
252 |
if ( $this->type === $part['type'] ) {
|
253 |
+
if ( $part['allow_multiple_selection'] ) {
|
254 |
+
$class[] = 'happyforms-selection--multiple';
|
255 |
}
|
256 |
}
|
257 |
|
258 |
+
return $class;
|
259 |
}
|
260 |
|
261 |
public function stringify_value( $value, $part, $form ) {
|
inc/classes/parts/class-part-title.php
CHANGED
@@ -129,7 +129,7 @@ class HappyForms_Part_Title extends HappyForms_Form_Part {
|
|
129 |
* @return string
|
130 |
*/
|
131 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
132 |
-
$sanitized_value = $this->get_default_value();
|
133 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
134 |
|
135 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
129 |
* @return string
|
130 |
*/
|
131 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
132 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
133 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
134 |
|
135 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
inc/classes/parts/class-part-website-url.php
CHANGED
@@ -97,7 +97,7 @@ class HappyForms_Part_WebsiteUrl extends HappyForms_Form_Part {
|
|
97 |
* @return string
|
98 |
*/
|
99 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
100 |
-
$sanitized_value = $this->get_default_value();
|
101 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
102 |
|
103 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
97 |
* @return string
|
98 |
*/
|
99 |
public function sanitize_value( $part_data = array(), $form_data = array() ) {
|
100 |
+
$sanitized_value = $this->get_default_value( $part_data );
|
101 |
$part_name = happyforms_get_part_name( $part_data, $form_data );
|
102 |
|
103 |
if ( isset( $_REQUEST[$part_name] ) ) {
|
inc/helpers/helper-form-templates.php
CHANGED
@@ -235,9 +235,8 @@ if ( ! function_exists( 'happyforms_get_part_value' ) ):
|
|
235 |
*
|
236 |
* @return string
|
237 |
*/
|
238 |
-
function happyforms_get_part_value( $part, $form, $component = false ) {
|
239 |
-
$
|
240 |
-
$value = happyforms_get_session()->get_value( $part_name );
|
241 |
|
242 |
/**
|
243 |
* Filter the default submission value for this form part.
|
@@ -251,7 +250,16 @@ function happyforms_get_part_value( $part, $form, $component = false ) {
|
|
251 |
*
|
252 |
* @return string The filtered part name.
|
253 |
*/
|
254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
}
|
256 |
|
257 |
endif;
|
@@ -269,7 +277,34 @@ if ( ! function_exists( 'happyforms_the_part_value' ) ):
|
|
269 |
* @return void
|
270 |
*/
|
271 |
function happyforms_the_part_value( $part, $form, $component = false ) {
|
272 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
}
|
274 |
|
275 |
endif;
|
@@ -452,7 +487,9 @@ if ( ! function_exists( 'happyforms_the_form_part' ) ):
|
|
452 |
* @return void
|
453 |
*/
|
454 |
function happyforms_the_form_part( $part, $form ) {
|
|
|
455 |
echo happyforms_get_form_part( $part, $form );
|
|
|
456 |
}
|
457 |
|
458 |
endif;
|
@@ -946,3 +983,13 @@ function happyforms_template_path( $path, $form = array(), $part = array() ) {
|
|
946 |
}
|
947 |
|
948 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
*
|
236 |
* @return string
|
237 |
*/
|
238 |
+
function happyforms_get_part_value( $part, $form, $component = false, $empty = '' ) {
|
239 |
+
$default_value = happyforms_get_part_library()->get_part_default_value( $part );
|
|
|
240 |
|
241 |
/**
|
242 |
* Filter the default submission value for this form part.
|
250 |
*
|
251 |
* @return string The filtered part name.
|
252 |
*/
|
253 |
+
$default_value = apply_filters( 'happyforms_part_value', $default_value, $part, $form );
|
254 |
+
$part_name = happyforms_get_part_name( $part, $form );
|
255 |
+
$session_value = happyforms_get_session()->get_value( $part_name );
|
256 |
+
$value = ( false !== $session_value ) ? $session_value : $default_value;
|
257 |
+
|
258 |
+
if ( false !== $component && is_array( $value ) ) {
|
259 |
+
$value = isset( $value[$component] ) ? $value[$component] : $empty;
|
260 |
+
}
|
261 |
+
|
262 |
+
return $value;
|
263 |
}
|
264 |
|
265 |
endif;
|
277 |
* @return void
|
278 |
*/
|
279 |
function happyforms_the_part_value( $part, $form, $component = false ) {
|
280 |
+
$value = happyforms_get_part_value( $part, $form, $component );
|
281 |
+
$value = apply_filters( 'happyforms_the_part_value', $value, $part, $form );
|
282 |
+
|
283 |
+
echo esc_attr( $value );
|
284 |
+
}
|
285 |
+
|
286 |
+
endif;
|
287 |
+
|
288 |
+
if ( ! function_exists( 'happyforms_the_part_preview_value' ) ):
|
289 |
+
/**
|
290 |
+
* Output the submitted part value in form preview context.
|
291 |
+
*
|
292 |
+
* @since 1.4
|
293 |
+
*
|
294 |
+
* @param array $part Current part data.
|
295 |
+
* @param array $form Current form data.
|
296 |
+
* @param string $component An optional part sub-component.
|
297 |
+
*
|
298 |
+
* @return void
|
299 |
+
*/
|
300 |
+
function happyforms_the_part_preview_value( $part, $form ) {
|
301 |
+
$part_class = happyforms_get_part_library()->get_part( $part['type'] );
|
302 |
+
$part_value = happyforms_get_part_value( $part, $form );
|
303 |
+
$validated_value = $part_class->validate_value( $part_value, $part, $form );
|
304 |
+
$value = happyforms_stringify_part_value( $validated_value, $part, $form );
|
305 |
+
$value = happyforms_get_message_part_value( $value );
|
306 |
+
|
307 |
+
echo $value;
|
308 |
}
|
309 |
|
310 |
endif;
|
487 |
* @return void
|
488 |
*/
|
489 |
function happyforms_the_form_part( $part, $form ) {
|
490 |
+
do_action( 'happyforms_part_before', $part, $form );
|
491 |
echo happyforms_get_form_part( $part, $form );
|
492 |
+
do_action( 'happyforms_part_after', $part, $form );
|
493 |
}
|
494 |
|
495 |
endif;
|
983 |
}
|
984 |
|
985 |
endif;
|
986 |
+
|
987 |
+
if ( ! function_exists( 'happyforms_is_falsy' ) ) :
|
988 |
+
|
989 |
+
function happyforms_is_falsy( $value ) {
|
990 |
+
$falsy = empty( $value ) || 'false' === $value || 0 === intval( $value );
|
991 |
+
|
992 |
+
return $falsy;
|
993 |
+
}
|
994 |
+
|
995 |
+
endif;
|
inc/templates/partials/part-preview.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="happyforms-form__part happyforms-part-preview">
|
2 |
+
<label class="happyforms-part__label">
|
3 |
+
<span class="label"><?php echo esc_html( $part['label'] ); ?></span>
|
4 |
+
</label>
|
5 |
+
<div class="happyforms-part__el-preview"><?php happyforms_the_part_preview_value( $part, $form ); ?></div>
|
6 |
+
<div class="happyforms-hide">
|
inc/templates/parts/customize-address.php
CHANGED
@@ -75,7 +75,8 @@
|
|
75 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
76 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
77 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
78 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
79 |
</select>
|
80 |
</p>
|
81 |
<p>
|
75 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
76 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
77 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
78 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
79 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
80 |
</select>
|
81 |
</p>
|
82 |
<p>
|
inc/templates/parts/customize-checkbox.php
CHANGED
@@ -52,7 +52,8 @@
|
|
52 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
53 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
54 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
55 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
56 |
</select>
|
57 |
</p>
|
58 |
<p class="width-options" style="display: none">
|
52 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
53 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
54 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
55 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
56 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
57 |
</select>
|
58 |
</p>
|
59 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-date.php
CHANGED
@@ -98,7 +98,8 @@
|
|
98 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
99 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
100 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
101 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
102 |
</select>
|
103 |
</p>
|
104 |
<p class="width-options" style="display: none">
|
98 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
99 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
100 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
101 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
102 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
103 |
</select>
|
104 |
</p>
|
105 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-email.php
CHANGED
@@ -43,7 +43,8 @@
|
|
43 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
44 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
45 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
46 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
47 |
</select>
|
48 |
</p>
|
49 |
<p class="width-options" style="display: none">
|
43 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
44 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
45 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
46 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
47 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
48 |
</select>
|
49 |
</p>
|
50 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-legal.php
CHANGED
@@ -5,7 +5,8 @@
|
|
5 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
6 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
7 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
8 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
9 |
</select>
|
10 |
</p>
|
11 |
<p>
|
5 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
6 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
7 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
8 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
9 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
10 |
</select>
|
11 |
</p>
|
12 |
<p>
|
inc/templates/parts/customize-multi-line-text.php
CHANGED
@@ -43,7 +43,8 @@
|
|
43 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
44 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
45 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
46 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
47 |
</select>
|
48 |
</p>
|
49 |
<p class="width-options" style="display: none">
|
43 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
44 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
45 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
46 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
47 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
48 |
</select>
|
49 |
</p>
|
50 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-number.php
CHANGED
@@ -72,7 +72,8 @@
|
|
72 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
73 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
74 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
75 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
76 |
</select>
|
77 |
</p>
|
78 |
<p class="width-options" style="display: none">
|
72 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
73 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
74 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
75 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
76 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
77 |
</select>
|
78 |
</p>
|
79 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-phone.php
CHANGED
@@ -66,7 +66,8 @@
|
|
66 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
67 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
68 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
69 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
70 |
</select>
|
71 |
</p>
|
72 |
<p class="width-options" style="display: none">
|
66 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
67 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
68 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
69 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
70 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
71 |
</select>
|
72 |
</p>
|
73 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-placeholder.php
CHANGED
@@ -27,7 +27,8 @@
|
|
27 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
28 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
29 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
30 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
31 |
</select>
|
32 |
</p>
|
33 |
<p class="width-options" style="display: none">
|
27 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
28 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
29 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
30 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
31 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
32 |
</select>
|
33 |
</p>
|
34 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-radio.php
CHANGED
@@ -52,7 +52,8 @@
|
|
52 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
53 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
54 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
55 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
56 |
</select>
|
57 |
</p>
|
58 |
<p class="width-options" style="display: none">
|
52 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
53 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
54 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
55 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
56 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
57 |
</select>
|
58 |
</p>
|
59 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-rating.php
CHANGED
@@ -37,7 +37,8 @@
|
|
37 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
38 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
39 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
40 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
41 |
</select>
|
42 |
</p>
|
43 |
<p class="width-options" style="display: none">
|
37 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
38 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
39 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
40 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
41 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
42 |
</select>
|
43 |
</p>
|
44 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-scale.php
CHANGED
@@ -84,7 +84,8 @@
|
|
84 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
85 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
86 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
87 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
88 |
</select>
|
89 |
</p>
|
90 |
<p class="width-options" style="display: none">
|
84 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
85 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
86 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
87 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
88 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
89 |
</select>
|
90 |
</p>
|
91 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-select.php
CHANGED
@@ -51,7 +51,8 @@
|
|
51 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
52 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
53 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
54 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
55 |
</select>
|
56 |
</p>
|
57 |
<p class="width-options" style="display: none">
|
51 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
52 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
53 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
54 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
55 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
56 |
</select>
|
57 |
</p>
|
58 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-single-line-text.php
CHANGED
@@ -43,7 +43,8 @@
|
|
43 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
44 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
45 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
46 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
47 |
</select>
|
48 |
</p>
|
49 |
<p class="width-options" style="display: none">
|
43 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
44 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
45 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
46 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
47 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
48 |
</select>
|
49 |
</p>
|
50 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-table.php
CHANGED
@@ -68,7 +68,8 @@
|
|
68 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
69 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
70 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
71 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
72 |
</select>
|
73 |
</p>
|
74 |
<p class="width-options" style="display: none">
|
68 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
69 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
70 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
71 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
72 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
73 |
</select>
|
74 |
</p>
|
75 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-title.php
CHANGED
@@ -37,7 +37,8 @@
|
|
37 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
38 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
39 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
40 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
41 |
</select>
|
42 |
</p>
|
43 |
<p class="width-options" style="display: none">
|
37 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
38 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
39 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
40 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
41 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
42 |
</select>
|
43 |
</p>
|
44 |
<p class="width-options" style="display: none">
|
inc/templates/parts/customize-website-url.php
CHANGED
@@ -43,7 +43,8 @@
|
|
43 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
44 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
45 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
46 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( '
|
|
|
47 |
</select>
|
48 |
</p>
|
49 |
<p class="width-options" style="display: none">
|
43 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
44 |
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
45 |
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
46 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
47 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
48 |
</select>
|
49 |
</p>
|
50 |
<p class="width-options" style="display: none">
|
inc/templates/parts/frontend-checkbox.php
CHANGED
@@ -13,9 +13,7 @@
|
|
13 |
foreach( $options as $option ) : ?>
|
14 |
<?php
|
15 |
$value = happyforms_get_part_value( $part, $form );
|
16 |
-
$
|
17 |
-
$is_checked = ( is_array( $value ) && in_array( $option['label'], $value ) );
|
18 |
-
$checked = ( $is_default || $is_checked ) ? 'checked="checked"' : '';
|
19 |
?>
|
20 |
<label class="option-label" id="<?php echo esc_attr( $option['id'] ); ?>">
|
21 |
<input type="checkbox" class="happyforms-visuallyhidden" name="<?php happyforms_the_part_name( $part, $form ); ?>[]" value="<?php echo esc_attr( $option['label'] ); ?>" <?php echo $checked; ?> <?php happyforms_the_part_attributes( $part, $form ); ?>>
|
13 |
foreach( $options as $option ) : ?>
|
14 |
<?php
|
15 |
$value = happyforms_get_part_value( $part, $form );
|
16 |
+
$checked = in_array( $option['label'], $value ) ? 'checked="checked"' : '';
|
|
|
|
|
17 |
?>
|
18 |
<label class="option-label" id="<?php echo esc_attr( $option['id'] ); ?>">
|
19 |
<input type="checkbox" class="happyforms-visuallyhidden" name="<?php happyforms_the_part_name( $part, $form ); ?>[]" value="<?php echo esc_attr( $option['label'] ); ?>" <?php echo $checked; ?> <?php happyforms_the_part_attributes( $part, $form ); ?>>
|
inc/templates/parts/frontend-radio.php
CHANGED
@@ -11,10 +11,7 @@
|
|
11 |
<?php
|
12 |
$options = happyforms_get_part_options( $part['options'], $part, $form );
|
13 |
foreach( $options as $option ) : ?>
|
14 |
-
<?php
|
15 |
-
$checked = checked( $option['is_default'], 1, false );
|
16 |
-
$checked = $checked ? $checked : checked( happyforms_get_part_value( $part, $form ), $option['label'], false );
|
17 |
-
?>
|
18 |
<div class="happyforms-part__option happyforms-part-option" id="<?php echo esc_attr( $option['id'] ); ?>">
|
19 |
<label class="option-label">
|
20 |
<input type="radio" class="happyforms-visuallyhidden" name="<?php happyforms_the_part_name( $part, $form ); ?>" value="<?php echo esc_attr( $option['label'] ); ?>" <?php echo $checked; ?> <?php happyforms_the_part_attributes( $part, $form ); ?>>
|
11 |
<?php
|
12 |
$options = happyforms_get_part_options( $part['options'], $part, $form );
|
13 |
foreach( $options as $option ) : ?>
|
14 |
+
<?php $checked = ! empty( $option['label'] ) ? checked( happyforms_get_part_value( $part, $form ), $option['label'], false ) : ''; ?>
|
|
|
|
|
|
|
15 |
<div class="happyforms-part__option happyforms-part-option" id="<?php echo esc_attr( $option['id'] ); ?>">
|
16 |
<label class="option-label">
|
17 |
<input type="radio" class="happyforms-visuallyhidden" name="<?php happyforms_the_part_name( $part, $form ); ?>" value="<?php echo esc_attr( $option['label'] ); ?>" <?php echo $checked; ?> <?php happyforms_the_part_attributes( $part, $form ); ?>>
|
inc/templates/parts/frontend-table.php
CHANGED
@@ -36,22 +36,14 @@
|
|
36 |
<div class="happyforms-table__cell--column-title happyforms-table__cell--column-title-sm"><?php echo esc_attr( $column['label'] ); ?></div>
|
37 |
<label class="option-label">
|
38 |
<?php if ( ! $part['allow_multiple_selection'] ) : ?>
|
39 |
-
<?php
|
40 |
-
$checked = checked( $column['is_default'], 1, false );
|
41 |
-
|
42 |
-
if ( '' !== $column['label'] ) {
|
43 |
-
$checked = $checked ? $checked : checked( happyforms_get_part_value( $part, $form, $row['id'] ), $column['label'], false );
|
44 |
-
}
|
45 |
-
?>
|
46 |
<input type="radio" class="happyforms-visuallyhidden" name="<?php happyforms_the_part_name( $part, $form ); ?>[<?php echo esc_attr( $row['id'] ); ?>]" value="<?php echo esc_attr( $column['label'] ); ?>" <?php echo $checked; ?> <?php happyforms_the_part_attributes( $part, $form ); ?>>
|
47 |
<span class="checkmark"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="currentColor" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg></span>
|
48 |
<span class="border"></span>
|
49 |
<?php else: ?>
|
50 |
<?php
|
51 |
-
$value = happyforms_get_part_value( $part, $form, $row['id'] );
|
52 |
-
$
|
53 |
-
$is_checked = ( is_array( $value ) && ( '' !== $column['label'] ) && in_array( $column['label'], $value ) );
|
54 |
-
$checked = ( $is_default || $is_checked ) ? 'checked="checked"' : '';
|
55 |
?>
|
56 |
<input type="checkbox" class="happyforms-visuallyhidden" name="<?php happyforms_the_part_name( $part, $form ); ?>[<?php echo esc_attr( $row['id'] ); ?>][]" value="<?php echo esc_attr( $column['label'] ); ?>" <?php echo $checked; ?> <?php happyforms_the_part_attributes( $part, $form ); ?>>
|
57 |
<span class="checkmark"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="currentColor" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg></span>
|
36 |
<div class="happyforms-table__cell--column-title happyforms-table__cell--column-title-sm"><?php echo esc_attr( $column['label'] ); ?></div>
|
37 |
<label class="option-label">
|
38 |
<?php if ( ! $part['allow_multiple_selection'] ) : ?>
|
39 |
+
<?php $checked = ! empty( $column['label'] ) ? checked( happyforms_get_part_value( $part, $form, $row['id'] ), $column['label'], false ) : ''; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
<input type="radio" class="happyforms-visuallyhidden" name="<?php happyforms_the_part_name( $part, $form ); ?>[<?php echo esc_attr( $row['id'] ); ?>]" value="<?php echo esc_attr( $column['label'] ); ?>" <?php echo $checked; ?> <?php happyforms_the_part_attributes( $part, $form ); ?>>
|
41 |
<span class="checkmark"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="currentColor" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg></span>
|
42 |
<span class="border"></span>
|
43 |
<?php else: ?>
|
44 |
<?php
|
45 |
+
$value = happyforms_get_part_value( $part, $form, $row['id'], array() );
|
46 |
+
$checked = in_array( $column['label'], $value ) ? 'checked="checked"' : '';
|
|
|
|
|
47 |
?>
|
48 |
<input type="checkbox" class="happyforms-visuallyhidden" name="<?php happyforms_the_part_name( $part, $form ); ?>[<?php echo esc_attr( $row['id'] ); ?>][]" value="<?php echo esc_attr( $column['label'] ); ?>" <?php echo $checked; ?> <?php happyforms_the_part_attributes( $part, $form ); ?>>
|
49 |
<span class="checkmark"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="currentColor" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg></span>
|
inc/templates/single-form.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
|
3 |
<div class="happyforms-form" id="happyforms-<?php echo esc_attr( $form['ID'] ); ?>">
|
4 |
<form action="<?php happyforms_form_action( $form['ID'] ); ?>" class="<?php happyforms_the_form_class( $form ); ?>" id="happyforms-form-<?php echo esc_attr( $form['ID'] ); ?>" method="post">
|
5 |
-
|
6 |
<?php do_action( 'happyforms_form_open', $form ); ?>
|
7 |
|
8 |
<?php happyforms_action_field(); ?>
|
@@ -10,14 +9,17 @@
|
|
10 |
<?php happyforms_nonce_field( $form ); ?>
|
11 |
<?php happyforms_step_field( $form ); ?>
|
12 |
|
|
|
13 |
<?php happyforms_the_form_title( $form ); ?>
|
|
|
|
|
14 |
<?php happyforms_message_notices( $form['ID'] ); ?>
|
15 |
|
16 |
<div class="happyforms-flex">
|
|
|
17 |
<?php foreach ( $form['parts'] as $part ) {
|
18 |
happyforms_the_form_part( $part, $form );
|
19 |
} ?>
|
20 |
-
<?php happyforms_honeypot( $form ); ?>
|
21 |
<?php happyforms_recaptcha( $form ); ?>
|
22 |
<?php happyforms_submit( $form ); ?>
|
23 |
</div>
|
2 |
|
3 |
<div class="happyforms-form" id="happyforms-<?php echo esc_attr( $form['ID'] ); ?>">
|
4 |
<form action="<?php happyforms_form_action( $form['ID'] ); ?>" class="<?php happyforms_the_form_class( $form ); ?>" id="happyforms-form-<?php echo esc_attr( $form['ID'] ); ?>" method="post">
|
|
|
5 |
<?php do_action( 'happyforms_form_open', $form ); ?>
|
6 |
|
7 |
<?php happyforms_action_field(); ?>
|
9 |
<?php happyforms_nonce_field( $form ); ?>
|
10 |
<?php happyforms_step_field( $form ); ?>
|
11 |
|
12 |
+
<?php do_action( 'happyforms_before_title', $form ); ?>
|
13 |
<?php happyforms_the_form_title( $form ); ?>
|
14 |
+
<?php do_action( 'happyforms_after_title', $form ); ?>
|
15 |
+
|
16 |
<?php happyforms_message_notices( $form['ID'] ); ?>
|
17 |
|
18 |
<div class="happyforms-flex">
|
19 |
+
<?php happyforms_honeypot( $form ); ?>
|
20 |
<?php foreach ( $form['parts'] as $part ) {
|
21 |
happyforms_the_form_part( $part, $form );
|
22 |
} ?>
|
|
|
23 |
<?php happyforms_recaptcha( $form ); ?>
|
24 |
<?php happyforms_submit( $form ); ?>
|
25 |
</div>
|
languages/happyforms.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the HappyForms package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: HappyForms 1.5.
|
6 |
"Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
|
7 |
-
"POT-Creation-Date: 2018-08-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -14,7 +14,7 @@ msgstr ""
|
|
14 |
"X-Generator: grunt-wp-i18n 0.4.9\n"
|
15 |
|
16 |
#: inc/classes/class-form-admin.php:155
|
17 |
-
#: inc/classes/class-form-controller.php:
|
18 |
msgid "View form"
|
19 |
msgstr ""
|
20 |
|
@@ -125,87 +125,91 @@ msgstr ""
|
|
125 |
msgid " Copy"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: inc/classes/class-form-controller.php:
|
129 |
-
#: inc/classes/class-form-controller.php:
|
130 |
#: inc/classes/class-happyforms-plugin.php:153
|
131 |
#: inc/classes/class-happyforms-plugin.php:154
|
132 |
msgid "All Forms"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: inc/classes/class-form-controller.php:
|
136 |
#: inc/classes/class-message-admin.php:317
|
137 |
#: inc/classes/class-message-admin.php:790
|
138 |
msgid "Form"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: inc/classes/class-form-controller.php:
|
142 |
-
#: inc/classes/class-form-controller.php:
|
143 |
msgid "Build form"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: inc/classes/class-form-controller.php:
|
147 |
msgid "Edit form"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: inc/classes/class-form-controller.php:
|
151 |
msgid "View forms"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: inc/classes/class-form-controller.php:
|
155 |
msgid "Search Forms"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: inc/classes/class-form-controller.php:
|
159 |
msgid "No form found"
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: inc/classes/class-form-controller.php:
|
163 |
msgid "No forms found in Trash"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: inc/classes/class-form-controller.php:
|
167 |
msgid "Untitled form"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: inc/classes/class-form-controller.php:
|
171 |
-
#: inc/classes/class-form-controller.php:
|
172 |
msgid ""
|
173 |
"Your message has been successfully sent. We appreciate you contacting us "
|
174 |
"and we’ll be in touch soon."
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: inc/classes/class-form-controller.php:
|
178 |
msgid "You received a new message"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: inc/classes/class-form-controller.php:
|
182 |
msgid "We received your message"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: inc/classes/class-form-controller.php:
|
186 |
msgid "Submit Form"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: inc/classes/class-form-controller.php:
|
190 |
msgid "Review submission"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: inc/classes/class-form-controller.php:
|
194 |
#: inc/classes/class-message-controller.php:271
|
195 |
-
#: inc/classes/class-message-controller.php:
|
196 |
-
#: inc/classes/class-message-controller.php:
|
197 |
msgid "Your submission contains errors."
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: inc/classes/class-form-
|
|
|
|
|
|
|
|
|
201 |
msgid "Invalid data"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: inc/classes/class-form-part-library.php:
|
205 |
msgid "Part definition not found"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: inc/classes/class-form-part-library.php:
|
209 |
msgid "Missing validation callback for field %s"
|
210 |
msgstr ""
|
211 |
|
@@ -488,8 +492,8 @@ msgid "Items"
|
|
488 |
msgstr ""
|
489 |
|
490 |
#: inc/classes/class-form-styles.php:719 inc/classes/class-form-styles.php:847
|
491 |
-
#: inc/classes/parts/class-part-multi-line-text.php:
|
492 |
-
#: inc/classes/parts/class-part-single-line-text.php:
|
493 |
#: inc/templates/parts/customize-placeholder.php:21
|
494 |
msgid "Text"
|
495 |
msgstr ""
|
@@ -533,8 +537,7 @@ msgid "Rating star color on hover"
|
|
533 |
msgstr ""
|
534 |
|
535 |
#: inc/classes/class-form-styles.php:769
|
536 |
-
|
537 |
-
msgid "Table"
|
538 |
msgstr ""
|
539 |
|
540 |
#: inc/classes/class-form-styles.php:774
|
@@ -898,7 +901,7 @@ msgid ""
|
|
898 |
msgstr ""
|
899 |
|
900 |
#: inc/classes/parts/class-part-address.php:13
|
901 |
-
#: inc/classes/parts/class-part-address.php:
|
902 |
msgid "Address"
|
903 |
msgstr ""
|
904 |
|
@@ -906,23 +909,23 @@ msgstr ""
|
|
906 |
msgid "For geographical locations. Includes Google Maps intergration."
|
907 |
msgstr ""
|
908 |
|
909 |
-
#: inc/classes/parts/class-part-address.php:
|
910 |
-
#: inc/classes/parts/class-part-checkbox.php:
|
911 |
-
#: inc/classes/parts/class-part-date.php:
|
912 |
-
#: inc/classes/parts/class-part-email.php:
|
913 |
-
#: inc/classes/parts/class-part-email.php:
|
914 |
#: inc/classes/parts/class-part-legal.php:113
|
915 |
-
#: inc/classes/parts/class-part-multi-line-text.php:
|
916 |
-
#: inc/classes/parts/class-part-number.php:
|
917 |
-
#: inc/classes/parts/class-part-number.php:
|
918 |
-
#: inc/classes/parts/class-part-phone.php:
|
919 |
-
#: inc/classes/parts/class-part-phone.php:
|
920 |
-
#: inc/classes/parts/class-part-radio.php:
|
921 |
#: inc/classes/parts/class-part-rating.php:125
|
922 |
#: inc/classes/parts/class-part-scale.php:163
|
923 |
#: inc/classes/parts/class-part-select.php:163
|
924 |
-
#: inc/classes/parts/class-part-single-line-text.php:
|
925 |
-
#: inc/classes/parts/class-part-table.php:
|
926 |
#: inc/classes/parts/class-part-title.php:156
|
927 |
#: inc/classes/parts/class-part-website-url.php:124
|
928 |
msgid "This field is required."
|
@@ -936,8 +939,8 @@ msgstr ""
|
|
936 |
msgid "For checkboxes allowing multiple selections."
|
937 |
msgstr ""
|
938 |
|
939 |
-
#: inc/classes/parts/class-part-checkbox.php:
|
940 |
-
#: inc/classes/parts/class-part-radio.php:
|
941 |
#: inc/classes/parts/class-part-table.php:32
|
942 |
#: inc/templates/parts/customize-checkbox.php:36
|
943 |
#: inc/templates/parts/customize-radio.php:36
|
@@ -945,8 +948,8 @@ msgstr ""
|
|
945 |
msgid "Options"
|
946 |
msgstr ""
|
947 |
|
948 |
-
#: inc/classes/parts/class-part-checkbox.php:
|
949 |
-
#: inc/classes/parts/class-part-table.php:
|
950 |
msgid "Checkbox values are not valid."
|
951 |
msgstr ""
|
952 |
|
@@ -958,25 +961,25 @@ msgstr ""
|
|
958 |
msgid "For formatted day, month, year and or time fields."
|
959 |
msgstr ""
|
960 |
|
961 |
-
#: inc/classes/parts/class-part-date.php:
|
962 |
#: inc/templates/parts/customize-date.php:32
|
963 |
msgid "Date"
|
964 |
msgstr ""
|
965 |
|
966 |
-
#: inc/classes/parts/class-part-date.php:
|
967 |
msgid "Not a valid date."
|
968 |
msgstr ""
|
969 |
|
970 |
-
#: inc/classes/parts/class-part-date.php:
|
971 |
msgid "Hour input does not match minimum and maximum value allowed."
|
972 |
msgstr ""
|
973 |
|
974 |
-
#: inc/classes/parts/class-part-date.php:
|
975 |
msgid "Year input does not match maximum value allowed."
|
976 |
msgstr ""
|
977 |
|
978 |
#: inc/classes/parts/class-part-email.php:8
|
979 |
-
#: inc/classes/parts/class-part-email.php:
|
980 |
msgid "Email"
|
981 |
msgstr ""
|
982 |
|
@@ -984,15 +987,15 @@ msgstr ""
|
|
984 |
msgid "For formatted email addresses. The '@' symbol is required."
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: inc/classes/parts/class-part-email.php:
|
988 |
msgid "Confirm Email"
|
989 |
msgstr ""
|
990 |
|
991 |
-
#: inc/classes/parts/class-part-email.php:
|
992 |
msgid "Not a valid e-mail address."
|
993 |
msgstr ""
|
994 |
|
995 |
-
#: inc/classes/parts/class-part-email.php:
|
996 |
msgid "Email and confirmation email are not matching."
|
997 |
msgstr ""
|
998 |
|
@@ -1022,7 +1025,7 @@ msgid "For paragraph text fields."
|
|
1022 |
msgstr ""
|
1023 |
|
1024 |
#: inc/classes/parts/class-part-number.php:8
|
1025 |
-
#: inc/classes/parts/class-part-number.php:
|
1026 |
msgid "Number"
|
1027 |
msgstr ""
|
1028 |
|
@@ -1030,21 +1033,21 @@ msgstr ""
|
|
1030 |
msgid "For numeric fields."
|
1031 |
msgstr ""
|
1032 |
|
1033 |
-
#: inc/classes/parts/class-part-number.php:
|
1034 |
msgid "Confirm Number"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
-
#: inc/classes/parts/class-part-number.php:
|
1038 |
msgid "This field does not match minimum and maximum allowed value."
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: inc/classes/parts/class-part-number.php:
|
1042 |
-
#: inc/classes/parts/class-part-phone.php:
|
1043 |
msgid "Number and confirmation number are not matching."
|
1044 |
msgstr ""
|
1045 |
|
1046 |
#: inc/classes/parts/class-part-phone.php:8
|
1047 |
-
#: inc/classes/parts/class-part-phone.php:
|
1048 |
msgid "Phone"
|
1049 |
msgstr ""
|
1050 |
|
@@ -1052,7 +1055,7 @@ msgstr ""
|
|
1052 |
msgid "For phone numbers. Includes country specific formatting."
|
1053 |
msgstr ""
|
1054 |
|
1055 |
-
#: inc/classes/parts/class-part-phone.php:
|
1056 |
msgid "Confirm Phone"
|
1057 |
msgstr ""
|
1058 |
|
@@ -1068,8 +1071,8 @@ msgstr ""
|
|
1068 |
msgid "For radio buttons allowing one selection."
|
1069 |
msgstr ""
|
1070 |
|
1071 |
-
#: inc/classes/parts/class-part-radio.php:
|
1072 |
-
#: inc/classes/parts/class-part-table.php:
|
1073 |
msgid "Radio values are not valid."
|
1074 |
msgstr ""
|
1075 |
|
@@ -1111,6 +1114,10 @@ msgstr ""
|
|
1111 |
msgid "For single line text fields."
|
1112 |
msgstr ""
|
1113 |
|
|
|
|
|
|
|
|
|
1114 |
#: inc/classes/parts/class-part-table.php:9
|
1115 |
msgid "For radios and checkboxes displaying in a grid of rows and columns."
|
1116 |
msgstr ""
|
@@ -1208,59 +1215,59 @@ msgstr ""
|
|
1208 |
msgid "How can I access my premium upgrade credentials?"
|
1209 |
msgstr ""
|
1210 |
|
1211 |
-
#: inc/helpers/helper-form-templates.php:
|
1212 |
msgid "Get my location"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
-
#: inc/helpers/helper-form-templates.php:
|
1216 |
msgid "Fetching location…"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
-
#: inc/helpers/helper-form-templates.php:
|
1220 |
msgid "January"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
-
#: inc/helpers/helper-form-templates.php:
|
1224 |
msgid "February"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
-
#: inc/helpers/helper-form-templates.php:
|
1228 |
msgid "March"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
-
#: inc/helpers/helper-form-templates.php:
|
1232 |
msgid "April"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
-
#: inc/helpers/helper-form-templates.php:
|
1236 |
msgid "May"
|
1237 |
msgstr ""
|
1238 |
|
1239 |
-
#: inc/helpers/helper-form-templates.php:
|
1240 |
msgid "June"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: inc/helpers/helper-form-templates.php:
|
1244 |
msgid "July"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: inc/helpers/helper-form-templates.php:
|
1248 |
msgid "August"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
-
#: inc/helpers/helper-form-templates.php:
|
1252 |
msgid "September"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
-
#: inc/helpers/helper-form-templates.php:
|
1256 |
msgid "October"
|
1257 |
msgstr ""
|
1258 |
|
1259 |
-
#: inc/helpers/helper-form-templates.php:
|
1260 |
msgid "November"
|
1261 |
msgstr ""
|
1262 |
|
1263 |
-
#: inc/helpers/helper-form-templates.php:
|
1264 |
msgid "December"
|
1265 |
msgstr ""
|
1266 |
|
@@ -2326,11 +2333,11 @@ msgstr ""
|
|
2326 |
|
2327 |
#: inc/templates/customize-form-item.php:33
|
2328 |
#: inc/templates/customize-form-part-footer.php:3
|
2329 |
-
#: inc/templates/parts/customize-checkbox.php:
|
2330 |
-
#: inc/templates/parts/customize-radio.php:
|
2331 |
-
#: inc/templates/parts/customize-select.php:
|
2332 |
-
#: inc/templates/parts/customize-table.php:
|
2333 |
-
#: inc/templates/parts/customize-table.php:
|
2334 |
msgid "Delete"
|
2335 |
msgstr ""
|
2336 |
|
@@ -2575,35 +2582,35 @@ msgstr ""
|
|
2575 |
|
2576 |
#: inc/templates/parts/customize-address.php:19
|
2577 |
#: inc/templates/parts/customize-checkbox.php:17
|
2578 |
-
#: inc/templates/parts/customize-checkbox.php:
|
2579 |
#: inc/templates/parts/customize-date.php:17
|
2580 |
-
#: inc/templates/parts/customize-date.php:
|
2581 |
#: inc/templates/parts/customize-email.php:19
|
2582 |
-
#: inc/templates/parts/customize-email.php:
|
2583 |
#: inc/templates/parts/customize-multi-line-text.php:19
|
2584 |
-
#: inc/templates/parts/customize-multi-line-text.php:
|
2585 |
#: inc/templates/parts/customize-number.php:19
|
2586 |
-
#: inc/templates/parts/customize-number.php:
|
2587 |
#: inc/templates/parts/customize-phone.php:19
|
2588 |
-
#: inc/templates/parts/customize-phone.php:
|
2589 |
#: inc/templates/parts/customize-placeholder.php:17
|
2590 |
-
#: inc/templates/parts/customize-placeholder.php:
|
2591 |
#: inc/templates/parts/customize-radio.php:17
|
2592 |
-
#: inc/templates/parts/customize-radio.php:
|
2593 |
#: inc/templates/parts/customize-rating.php:17
|
2594 |
-
#: inc/templates/parts/customize-rating.php:
|
2595 |
#: inc/templates/parts/customize-scale.php:17
|
2596 |
-
#: inc/templates/parts/customize-scale.php:
|
2597 |
#: inc/templates/parts/customize-select.php:17
|
2598 |
-
#: inc/templates/parts/customize-select.php:
|
2599 |
#: inc/templates/parts/customize-single-line-text.php:19
|
2600 |
-
#: inc/templates/parts/customize-single-line-text.php:
|
2601 |
#: inc/templates/parts/customize-table.php:17
|
2602 |
-
#: inc/templates/parts/customize-table.php:
|
2603 |
#: inc/templates/parts/customize-title.php:17
|
2604 |
-
#: inc/templates/parts/customize-title.php:
|
2605 |
#: inc/templates/parts/customize-website-url.php:19
|
2606 |
-
#: inc/templates/parts/customize-website-url.php:
|
2607 |
msgid "Apply to all parts"
|
2608 |
msgstr ""
|
2609 |
|
@@ -2615,7 +2622,7 @@ msgstr ""
|
|
2615 |
#: inc/templates/parts/customize-number.php:23
|
2616 |
#: inc/templates/parts/customize-phone.php:23
|
2617 |
#: inc/templates/parts/customize-radio.php:21
|
2618 |
-
#: inc/templates/parts/customize-radio.php:
|
2619 |
#: inc/templates/parts/customize-rating.php:21
|
2620 |
#: inc/templates/parts/customize-scale.php:21
|
2621 |
#: inc/templates/parts/customize-select.php:21
|
@@ -2759,26 +2766,46 @@ msgstr ""
|
|
2759 |
#: inc/templates/parts/customize-table.php:71
|
2760 |
#: inc/templates/parts/customize-title.php:40
|
2761 |
#: inc/templates/parts/customize-website-url.php:46
|
2762 |
-
msgid "
|
2763 |
-
msgstr ""
|
2764 |
-
|
2765 |
-
#: inc/templates/parts/customize-address.php:
|
2766 |
-
#: inc/templates/parts/customize-checkbox.php:
|
2767 |
-
#: inc/templates/parts/customize-date.php:
|
2768 |
-
#: inc/templates/parts/customize-email.php:
|
2769 |
-
#: inc/templates/parts/customize-legal.php:
|
2770 |
-
#: inc/templates/parts/customize-multi-line-text.php:
|
2771 |
-
#: inc/templates/parts/customize-number.php:
|
2772 |
-
#: inc/templates/parts/customize-phone.php:
|
2773 |
-
#: inc/templates/parts/customize-placeholder.php:
|
2774 |
-
#: inc/templates/parts/customize-radio.php:
|
2775 |
-
#: inc/templates/parts/customize-rating.php:
|
2776 |
-
#: inc/templates/parts/customize-scale.php:
|
2777 |
-
#: inc/templates/parts/customize-select.php:
|
2778 |
-
#: inc/templates/parts/customize-single-line-text.php:
|
2779 |
-
#: inc/templates/parts/customize-table.php:
|
2780 |
-
#: inc/templates/parts/customize-title.php:
|
2781 |
-
#: inc/templates/parts/customize-website-url.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2782 |
msgid "Custom CSS class"
|
2783 |
msgstr ""
|
2784 |
|
@@ -2809,16 +2836,16 @@ msgstr ""
|
|
2809 |
msgid "Vertical"
|
2810 |
msgstr ""
|
2811 |
|
2812 |
-
#: inc/templates/parts/customize-checkbox.php:
|
2813 |
-
#: inc/templates/parts/customize-radio.php:
|
2814 |
-
#: inc/templates/parts/customize-select.php:
|
2815 |
-
#: inc/templates/parts/customize-table.php:
|
2816 |
-
#: inc/templates/parts/customize-table.php:
|
2817 |
msgid "Label"
|
2818 |
msgstr ""
|
2819 |
|
2820 |
-
#: inc/templates/parts/customize-checkbox.php:
|
2821 |
-
#: inc/templates/parts/customize-table.php:
|
2822 |
msgid "Checked by default"
|
2823 |
msgstr ""
|
2824 |
|
@@ -2899,19 +2926,19 @@ msgstr ""
|
|
2899 |
msgid "Inside input"
|
2900 |
msgstr ""
|
2901 |
|
2902 |
-
#: inc/templates/parts/customize-email.php:
|
2903 |
-
#: inc/templates/parts/customize-number.php:
|
2904 |
-
#: inc/templates/parts/customize-phone.php:
|
2905 |
msgid "Require confirmation of the value"
|
2906 |
msgstr ""
|
2907 |
|
2908 |
-
#: inc/templates/parts/customize-email.php:
|
2909 |
-
#: inc/templates/parts/customize-number.php:
|
2910 |
-
#: inc/templates/parts/customize-phone.php:
|
2911 |
msgid "Confirmation field title"
|
2912 |
msgstr ""
|
2913 |
|
2914 |
-
#: inc/templates/parts/customize-legal.php:
|
2915 |
msgid "Legal text"
|
2916 |
msgstr ""
|
2917 |
|
@@ -2953,8 +2980,8 @@ msgstr ""
|
|
2953 |
msgid "Allow other regions to be selected"
|
2954 |
msgstr ""
|
2955 |
|
2956 |
-
#: inc/templates/parts/customize-radio.php:
|
2957 |
-
#: inc/templates/parts/customize-select.php:
|
2958 |
msgid "Make this option default"
|
2959 |
msgstr ""
|
2960 |
|
2 |
# This file is distributed under the same license as the HappyForms package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: HappyForms 1.5.11\n"
|
6 |
"Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
|
7 |
+
"POT-Creation-Date: 2018-08-28 13:34:09+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
14 |
"X-Generator: grunt-wp-i18n 0.4.9\n"
|
15 |
|
16 |
#: inc/classes/class-form-admin.php:155
|
17 |
+
#: inc/classes/class-form-controller.php:88
|
18 |
msgid "View form"
|
19 |
msgstr ""
|
20 |
|
125 |
msgid " Copy"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: inc/classes/class-form-controller.php:83
|
129 |
+
#: inc/classes/class-form-controller.php:93
|
130 |
#: inc/classes/class-happyforms-plugin.php:153
|
131 |
#: inc/classes/class-happyforms-plugin.php:154
|
132 |
msgid "All Forms"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: inc/classes/class-form-controller.php:84
|
136 |
#: inc/classes/class-message-admin.php:317
|
137 |
#: inc/classes/class-message-admin.php:790
|
138 |
msgid "Form"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: inc/classes/class-form-controller.php:85
|
142 |
+
#: inc/classes/class-form-controller.php:87
|
143 |
msgid "Build form"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: inc/classes/class-form-controller.php:86
|
147 |
msgid "Edit form"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: inc/classes/class-form-controller.php:89
|
151 |
msgid "View forms"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: inc/classes/class-form-controller.php:90
|
155 |
msgid "Search Forms"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: inc/classes/class-form-controller.php:91
|
159 |
msgid "No form found"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: inc/classes/class-form-controller.php:92
|
163 |
msgid "No forms found in Trash"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: inc/classes/class-form-controller.php:187
|
167 |
msgid "Untitled form"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: inc/classes/class-form-controller.php:208
|
171 |
+
#: inc/classes/class-form-controller.php:232
|
172 |
msgid ""
|
173 |
"Your message has been successfully sent. We appreciate you contacting us "
|
174 |
"and we’ll be in touch soon."
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: inc/classes/class-form-controller.php:220
|
178 |
msgid "You received a new message"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: inc/classes/class-form-controller.php:228
|
182 |
msgid "We received your message"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: inc/classes/class-form-controller.php:244
|
186 |
msgid "Submit Form"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: inc/classes/class-form-controller.php:272
|
190 |
msgid "Review submission"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: inc/classes/class-form-controller.php:768
|
194 |
#: inc/classes/class-message-controller.php:271
|
195 |
+
#: inc/classes/class-message-controller.php:371
|
196 |
+
#: inc/classes/class-message-controller.php:406
|
197 |
msgid "Your submission contains errors."
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: inc/classes/class-form-controller.php:918
|
201 |
+
msgid "Please review your submission..."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: inc/classes/class-form-part-library.php:178
|
205 |
msgid "Invalid data"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: inc/classes/class-form-part-library.php:185
|
209 |
msgid "Part definition not found"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: inc/classes/class-form-part-library.php:216
|
213 |
msgid "Missing validation callback for field %s"
|
214 |
msgstr ""
|
215 |
|
492 |
msgstr ""
|
493 |
|
494 |
#: inc/classes/class-form-styles.php:719 inc/classes/class-form-styles.php:847
|
495 |
+
#: inc/classes/parts/class-part-multi-line-text.php:29
|
496 |
+
#: inc/classes/parts/class-part-single-line-text.php:29
|
497 |
#: inc/templates/parts/customize-placeholder.php:21
|
498 |
msgid "Text"
|
499 |
msgstr ""
|
537 |
msgstr ""
|
538 |
|
539 |
#: inc/classes/class-form-styles.php:769
|
540 |
+
msgid "Tables"
|
|
|
541 |
msgstr ""
|
542 |
|
543 |
#: inc/classes/class-form-styles.php:774
|
901 |
msgstr ""
|
902 |
|
903 |
#: inc/classes/parts/class-part-address.php:13
|
904 |
+
#: inc/classes/parts/class-part-address.php:41
|
905 |
msgid "Address"
|
906 |
msgstr ""
|
907 |
|
909 |
msgid "For geographical locations. Includes Google Maps intergration."
|
910 |
msgstr ""
|
911 |
|
912 |
+
#: inc/classes/parts/class-part-address.php:191
|
913 |
+
#: inc/classes/parts/class-part-checkbox.php:166
|
914 |
+
#: inc/classes/parts/class-part-date.php:192
|
915 |
+
#: inc/classes/parts/class-part-email.php:141
|
916 |
+
#: inc/classes/parts/class-part-email.php:145
|
917 |
#: inc/classes/parts/class-part-legal.php:113
|
918 |
+
#: inc/classes/parts/class-part-multi-line-text.php:142
|
919 |
+
#: inc/classes/parts/class-part-number.php:174
|
920 |
+
#: inc/classes/parts/class-part-number.php:178
|
921 |
+
#: inc/classes/parts/class-part-phone.php:390
|
922 |
+
#: inc/classes/parts/class-part-phone.php:394
|
923 |
+
#: inc/classes/parts/class-part-radio.php:166
|
924 |
#: inc/classes/parts/class-part-rating.php:125
|
925 |
#: inc/classes/parts/class-part-scale.php:163
|
926 |
#: inc/classes/parts/class-part-select.php:163
|
927 |
+
#: inc/classes/parts/class-part-single-line-text.php:125
|
928 |
+
#: inc/classes/parts/class-part-table.php:206
|
929 |
#: inc/classes/parts/class-part-title.php:156
|
930 |
#: inc/classes/parts/class-part-website-url.php:124
|
931 |
msgid "This field is required."
|
939 |
msgid "For checkboxes allowing multiple selections."
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: inc/classes/parts/class-part-checkbox.php:30
|
943 |
+
#: inc/classes/parts/class-part-radio.php:30
|
944 |
#: inc/classes/parts/class-part-table.php:32
|
945 |
#: inc/templates/parts/customize-checkbox.php:36
|
946 |
#: inc/templates/parts/customize-radio.php:36
|
948 |
msgid "Options"
|
949 |
msgstr ""
|
950 |
|
951 |
+
#: inc/classes/parts/class-part-checkbox.php:175
|
952 |
+
#: inc/classes/parts/class-part-table.php:218
|
953 |
msgid "Checkbox values are not valid."
|
954 |
msgstr ""
|
955 |
|
961 |
msgid "For formatted day, month, year and or time fields."
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: inc/classes/parts/class-part-date.php:30
|
965 |
#: inc/templates/parts/customize-date.php:32
|
966 |
msgid "Date"
|
967 |
msgstr ""
|
968 |
|
969 |
+
#: inc/classes/parts/class-part-date.php:224
|
970 |
msgid "Not a valid date."
|
971 |
msgstr ""
|
972 |
|
973 |
+
#: inc/classes/parts/class-part-date.php:236
|
974 |
msgid "Hour input does not match minimum and maximum value allowed."
|
975 |
msgstr ""
|
976 |
|
977 |
+
#: inc/classes/parts/class-part-date.php:249
|
978 |
msgid "Year input does not match maximum value allowed."
|
979 |
msgstr ""
|
980 |
|
981 |
#: inc/classes/parts/class-part-email.php:8
|
982 |
+
#: inc/classes/parts/class-part-email.php:29
|
983 |
msgid "Email"
|
984 |
msgstr ""
|
985 |
|
987 |
msgid "For formatted email addresses. The '@' symbol is required."
|
988 |
msgstr ""
|
989 |
|
990 |
+
#: inc/classes/parts/class-part-email.php:49
|
991 |
msgid "Confirm Email"
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: inc/classes/parts/class-part-email.php:149
|
995 |
msgid "Not a valid e-mail address."
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: inc/classes/parts/class-part-email.php:153
|
999 |
msgid "Email and confirmation email are not matching."
|
1000 |
msgstr ""
|
1001 |
|
1025 |
msgstr ""
|
1026 |
|
1027 |
#: inc/classes/parts/class-part-number.php:8
|
1028 |
+
#: inc/classes/parts/class-part-number.php:30
|
1029 |
msgid "Number"
|
1030 |
msgstr ""
|
1031 |
|
1033 |
msgid "For numeric fields."
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: inc/classes/parts/class-part-number.php:86
|
1037 |
msgid "Confirm Number"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: inc/classes/parts/class-part-number.php:182
|
1041 |
msgid "This field does not match minimum and maximum allowed value."
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: inc/classes/parts/class-part-number.php:186
|
1045 |
+
#: inc/classes/parts/class-part-phone.php:398
|
1046 |
msgid "Number and confirmation number are not matching."
|
1047 |
msgstr ""
|
1048 |
|
1049 |
#: inc/classes/parts/class-part-phone.php:8
|
1050 |
+
#: inc/classes/parts/class-part-phone.php:30
|
1051 |
msgid "Phone"
|
1052 |
msgstr ""
|
1053 |
|
1055 |
msgid "For phone numbers. Includes country specific formatting."
|
1056 |
msgstr ""
|
1057 |
|
1058 |
+
#: inc/classes/parts/class-part-phone.php:74
|
1059 |
msgid "Confirm Phone"
|
1060 |
msgstr ""
|
1061 |
|
1071 |
msgid "For radio buttons allowing one selection."
|
1072 |
msgstr ""
|
1073 |
|
1074 |
+
#: inc/classes/parts/class-part-radio.php:173
|
1075 |
+
#: inc/classes/parts/class-part-table.php:225
|
1076 |
msgid "Radio values are not valid."
|
1077 |
msgstr ""
|
1078 |
|
1114 |
msgid "For single line text fields."
|
1115 |
msgstr ""
|
1116 |
|
1117 |
+
#: inc/classes/parts/class-part-table.php:8
|
1118 |
+
msgid "Table"
|
1119 |
+
msgstr ""
|
1120 |
+
|
1121 |
#: inc/classes/parts/class-part-table.php:9
|
1122 |
msgid "For radios and checkboxes displaying in a grid of rows and columns."
|
1123 |
msgstr ""
|
1215 |
msgid "How can I access my premium upgrade credentials?"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
+
#: inc/helpers/helper-form-templates.php:807
|
1219 |
msgid "Get my location"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
+
#: inc/helpers/helper-form-templates.php:807
|
1223 |
msgid "Fetching location…"
|
1224 |
msgstr ""
|
1225 |
|
1226 |
+
#: inc/helpers/helper-form-templates.php:818
|
1227 |
msgid "January"
|
1228 |
msgstr ""
|
1229 |
|
1230 |
+
#: inc/helpers/helper-form-templates.php:819
|
1231 |
msgid "February"
|
1232 |
msgstr ""
|
1233 |
|
1234 |
+
#: inc/helpers/helper-form-templates.php:820
|
1235 |
msgid "March"
|
1236 |
msgstr ""
|
1237 |
|
1238 |
+
#: inc/helpers/helper-form-templates.php:821
|
1239 |
msgid "April"
|
1240 |
msgstr ""
|
1241 |
|
1242 |
+
#: inc/helpers/helper-form-templates.php:822
|
1243 |
msgid "May"
|
1244 |
msgstr ""
|
1245 |
|
1246 |
+
#: inc/helpers/helper-form-templates.php:823
|
1247 |
msgid "June"
|
1248 |
msgstr ""
|
1249 |
|
1250 |
+
#: inc/helpers/helper-form-templates.php:824
|
1251 |
msgid "July"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
+
#: inc/helpers/helper-form-templates.php:825
|
1255 |
msgid "August"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
+
#: inc/helpers/helper-form-templates.php:826
|
1259 |
msgid "September"
|
1260 |
msgstr ""
|
1261 |
|
1262 |
+
#: inc/helpers/helper-form-templates.php:827
|
1263 |
msgid "October"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
+
#: inc/helpers/helper-form-templates.php:828
|
1267 |
msgid "November"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
+
#: inc/helpers/helper-form-templates.php:829
|
1271 |
msgid "December"
|
1272 |
msgstr ""
|
1273 |
|
2333 |
|
2334 |
#: inc/templates/customize-form-item.php:33
|
2335 |
#: inc/templates/customize-form-part-footer.php:3
|
2336 |
+
#: inc/templates/parts/customize-checkbox.php:81
|
2337 |
+
#: inc/templates/parts/customize-radio.php:85
|
2338 |
+
#: inc/templates/parts/customize-select.php:80
|
2339 |
+
#: inc/templates/parts/customize-table.php:97
|
2340 |
+
#: inc/templates/parts/customize-table.php:108
|
2341 |
msgid "Delete"
|
2342 |
msgstr ""
|
2343 |
|
2582 |
|
2583 |
#: inc/templates/parts/customize-address.php:19
|
2584 |
#: inc/templates/parts/customize-checkbox.php:17
|
2585 |
+
#: inc/templates/parts/customize-checkbox.php:61
|
2586 |
#: inc/templates/parts/customize-date.php:17
|
2587 |
+
#: inc/templates/parts/customize-date.php:107
|
2588 |
#: inc/templates/parts/customize-email.php:19
|
2589 |
+
#: inc/templates/parts/customize-email.php:52
|
2590 |
#: inc/templates/parts/customize-multi-line-text.php:19
|
2591 |
+
#: inc/templates/parts/customize-multi-line-text.php:52
|
2592 |
#: inc/templates/parts/customize-number.php:19
|
2593 |
+
#: inc/templates/parts/customize-number.php:81
|
2594 |
#: inc/templates/parts/customize-phone.php:19
|
2595 |
+
#: inc/templates/parts/customize-phone.php:75
|
2596 |
#: inc/templates/parts/customize-placeholder.php:17
|
2597 |
+
#: inc/templates/parts/customize-placeholder.php:36
|
2598 |
#: inc/templates/parts/customize-radio.php:17
|
2599 |
+
#: inc/templates/parts/customize-radio.php:61
|
2600 |
#: inc/templates/parts/customize-rating.php:17
|
2601 |
+
#: inc/templates/parts/customize-rating.php:46
|
2602 |
#: inc/templates/parts/customize-scale.php:17
|
2603 |
+
#: inc/templates/parts/customize-scale.php:93
|
2604 |
#: inc/templates/parts/customize-select.php:17
|
2605 |
+
#: inc/templates/parts/customize-select.php:60
|
2606 |
#: inc/templates/parts/customize-single-line-text.php:19
|
2607 |
+
#: inc/templates/parts/customize-single-line-text.php:52
|
2608 |
#: inc/templates/parts/customize-table.php:17
|
2609 |
+
#: inc/templates/parts/customize-table.php:77
|
2610 |
#: inc/templates/parts/customize-title.php:17
|
2611 |
+
#: inc/templates/parts/customize-title.php:46
|
2612 |
#: inc/templates/parts/customize-website-url.php:19
|
2613 |
+
#: inc/templates/parts/customize-website-url.php:52
|
2614 |
msgid "Apply to all parts"
|
2615 |
msgstr ""
|
2616 |
|
2622 |
#: inc/templates/parts/customize-number.php:23
|
2623 |
#: inc/templates/parts/customize-phone.php:23
|
2624 |
#: inc/templates/parts/customize-radio.php:21
|
2625 |
+
#: inc/templates/parts/customize-radio.php:78
|
2626 |
#: inc/templates/parts/customize-rating.php:21
|
2627 |
#: inc/templates/parts/customize-scale.php:21
|
2628 |
#: inc/templates/parts/customize-select.php:21
|
2766 |
#: inc/templates/parts/customize-table.php:71
|
2767 |
#: inc/templates/parts/customize-title.php:40
|
2768 |
#: inc/templates/parts/customize-website-url.php:46
|
2769 |
+
msgid "Third"
|
2770 |
+
msgstr ""
|
2771 |
+
|
2772 |
+
#: inc/templates/parts/customize-address.php:79
|
2773 |
+
#: inc/templates/parts/customize-checkbox.php:56
|
2774 |
+
#: inc/templates/parts/customize-date.php:102
|
2775 |
+
#: inc/templates/parts/customize-email.php:47
|
2776 |
+
#: inc/templates/parts/customize-legal.php:9
|
2777 |
+
#: inc/templates/parts/customize-multi-line-text.php:47
|
2778 |
+
#: inc/templates/parts/customize-number.php:76
|
2779 |
+
#: inc/templates/parts/customize-phone.php:70
|
2780 |
+
#: inc/templates/parts/customize-placeholder.php:31
|
2781 |
+
#: inc/templates/parts/customize-radio.php:56
|
2782 |
+
#: inc/templates/parts/customize-rating.php:41
|
2783 |
+
#: inc/templates/parts/customize-scale.php:88
|
2784 |
+
#: inc/templates/parts/customize-select.php:55
|
2785 |
+
#: inc/templates/parts/customize-single-line-text.php:47
|
2786 |
+
#: inc/templates/parts/customize-table.php:72
|
2787 |
+
#: inc/templates/parts/customize-title.php:41
|
2788 |
+
#: inc/templates/parts/customize-website-url.php:47
|
2789 |
+
msgid "Auto"
|
2790 |
+
msgstr ""
|
2791 |
+
|
2792 |
+
#: inc/templates/parts/customize-address.php:83
|
2793 |
+
#: inc/templates/parts/customize-checkbox.php:65
|
2794 |
+
#: inc/templates/parts/customize-date.php:111
|
2795 |
+
#: inc/templates/parts/customize-email.php:56
|
2796 |
+
#: inc/templates/parts/customize-legal.php:18
|
2797 |
+
#: inc/templates/parts/customize-multi-line-text.php:56
|
2798 |
+
#: inc/templates/parts/customize-number.php:85
|
2799 |
+
#: inc/templates/parts/customize-phone.php:79
|
2800 |
+
#: inc/templates/parts/customize-placeholder.php:40
|
2801 |
+
#: inc/templates/parts/customize-radio.php:65
|
2802 |
+
#: inc/templates/parts/customize-rating.php:50
|
2803 |
+
#: inc/templates/parts/customize-scale.php:97
|
2804 |
+
#: inc/templates/parts/customize-select.php:64
|
2805 |
+
#: inc/templates/parts/customize-single-line-text.php:56
|
2806 |
+
#: inc/templates/parts/customize-table.php:81
|
2807 |
+
#: inc/templates/parts/customize-title.php:50
|
2808 |
+
#: inc/templates/parts/customize-website-url.php:56
|
2809 |
msgid "Custom CSS class"
|
2810 |
msgstr ""
|
2811 |
|
2836 |
msgid "Vertical"
|
2837 |
msgstr ""
|
2838 |
|
2839 |
+
#: inc/templates/parts/customize-checkbox.php:74
|
2840 |
+
#: inc/templates/parts/customize-radio.php:74
|
2841 |
+
#: inc/templates/parts/customize-select.php:73
|
2842 |
+
#: inc/templates/parts/customize-table.php:90
|
2843 |
+
#: inc/templates/parts/customize-table.php:104
|
2844 |
msgid "Label"
|
2845 |
msgstr ""
|
2846 |
|
2847 |
+
#: inc/templates/parts/customize-checkbox.php:78
|
2848 |
+
#: inc/templates/parts/customize-table.php:94
|
2849 |
msgid "Checked by default"
|
2850 |
msgstr ""
|
2851 |
|
2926 |
msgid "Inside input"
|
2927 |
msgstr ""
|
2928 |
|
2929 |
+
#: inc/templates/parts/customize-email.php:61
|
2930 |
+
#: inc/templates/parts/customize-number.php:90
|
2931 |
+
#: inc/templates/parts/customize-phone.php:84
|
2932 |
msgid "Require confirmation of the value"
|
2933 |
msgstr ""
|
2934 |
|
2935 |
+
#: inc/templates/parts/customize-email.php:65
|
2936 |
+
#: inc/templates/parts/customize-number.php:94
|
2937 |
+
#: inc/templates/parts/customize-phone.php:88
|
2938 |
msgid "Confirmation field title"
|
2939 |
msgstr ""
|
2940 |
|
2941 |
+
#: inc/templates/parts/customize-legal.php:13
|
2942 |
msgid "Legal text"
|
2943 |
msgstr ""
|
2944 |
|
2980 |
msgid "Allow other regions to be selected"
|
2981 |
msgstr ""
|
2982 |
|
2983 |
+
#: inc/templates/parts/customize-radio.php:82
|
2984 |
+
#: inc/templates/parts/customize-select.php:77
|
2985 |
msgid "Make this option default"
|
2986 |
msgstr ""
|
2987 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: contact, contact form, email, feedback form, form, form builder, custom fo
|
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 4.9.7
|
7 |
Requires PHP: 5.2.4
|
8 |
-
Stable tag: 1.5.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -41,6 +41,7 @@ HappyForms is the simplest way for you to manage and respond to conversations wi
|
|
41 |
* Confirmation email sent to recipient.
|
42 |
* One-click HoneyPot and Google ReCaptcha spam prevention.
|
43 |
* Over 50 styles controls built-in.
|
|
|
44 |
|
45 |
= Included HappyForms Form Parts: =
|
46 |
|
@@ -75,6 +76,19 @@ Absolutely! HappyForms gets out of the way and is designed to work with any them
|
|
75 |
|
76 |
== Changelog ==
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
= 1.5.10 =
|
79 |
* Bugfix: email alert and confirmation options were being ignored.
|
80 |
|
@@ -221,6 +235,9 @@ Absolutely! HappyForms gets out of the way and is designed to work with any them
|
|
221 |
|
222 |
== Upgrade Notice ==
|
223 |
|
|
|
|
|
|
|
224 |
= 1.5.10 =
|
225 |
* Email alerts bugfixes.
|
226 |
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 4.9.7
|
7 |
Requires PHP: 5.2.4
|
8 |
+
Stable tag: 1.5.11
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
41 |
* Confirmation email sent to recipient.
|
42 |
* One-click HoneyPot and Google ReCaptcha spam prevention.
|
43 |
* Over 50 styles controls built-in.
|
44 |
+
* GDPR and 508 compliant forms and secure forms.
|
45 |
|
46 |
= Included HappyForms Form Parts: =
|
47 |
|
76 |
|
77 |
== Changelog ==
|
78 |
|
79 |
+
= 1.5.11 =
|
80 |
+
* New feature: Added a new option "Auto" for Width setting of all form parts to allow for a single line form layouts.
|
81 |
+
* Improvement: Better, configurable styles for form submission preview.
|
82 |
+
* Improvement: Better formatting of submission alert emails.
|
83 |
+
* Improvement: Legal part now doesn't automatically prevent form submission.
|
84 |
+
* Improvement: Table part now inherits checkbox and radio styling.
|
85 |
+
* Bugfix: Table part default options were misbehaving.
|
86 |
+
* Bugfix: Dropdown part color settings were not saving.
|
87 |
+
* Bugfix: Dropdown part marked as required stopped submit button from working in some scenarios.
|
88 |
+
* Bugfix: Special characters were misinterpreted during submission.
|
89 |
+
* Bugfix: Some parts were submitting undefined data.
|
90 |
+
* Bugfix: Dropdown part was ignoring a default option setting.
|
91 |
+
|
92 |
= 1.5.10 =
|
93 |
* Bugfix: email alert and confirmation options were being ignored.
|
94 |
|
235 |
|
236 |
== Upgrade Notice ==
|
237 |
|
238 |
+
= 1.5.11 =
|
239 |
+
* New single line form layout, tons of improvements and bugfixes.
|
240 |
+
|
241 |
= 1.5.10 =
|
242 |
* Email alerts bugfixes.
|
243 |
|