Skip to content

Commit 97f61f3

Browse files
committed
Updates
1 parent 8b0fdd3 commit 97f61f3

File tree

8 files changed

+11
-82
lines changed

8 files changed

+11
-82
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## [1.12.33](https://github.com/wpmudev/forminator-ui/compare/v1.12.32...v1.12.33) (2025-06-26)
4+
####
5+
improvement
6+
- `custom input`
7+
- new(custom input): moved logic of custom input to Forminator. [#109](https://github.com/wpmudev/forminator-ui/pull/109) ([FOR-5504](https://incsub.atlassian.net/browse/FOR-5504) ([@creador-dev](https://github.com/creador-dev))
8+
39
## [1.12.32](https://github.com/wpmudev/forminator-ui/compare/v1.12.31...v1.12.32) (2025-06-23)
410
#### 🐛 Bug Fix
511
- `slider`

js/forminator-form.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
274274

275275
// Assign checked class
276276
radioLabel.addClass('forminator-is_checked');
277-
278-
// check if value is custom_option then show the custom option input
279-
if ('custom_option' === radioInput.val() && radioInput.is(':checked')) {
280-
radioField.find('.forminator-custom-input').show();
281-
} else {
282-
radioField.find('.forminator-custom-input').hide();
283-
}
284277
});
285278
});
286279
}
@@ -307,19 +300,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
307300
$(this).on('click', function () {
308301
var checkInput = $(this);
309302
var checkLabel = checkInput.parent();
310-
var checkField = checkLabel.closest('.forminator-field');
311303
if (checkLabel.is('.forminator-is_checked')) {
312304
checkLabel.removeClass('forminator-is_checked');
313305
} else {
314306
checkLabel.addClass('forminator-is_checked');
315307
}
316-
317-
// check if value is custom_option then show the custom option input
318-
if ('custom_option' === checkInput.val() && checkInput.is(':checked')) {
319-
checkField.find('.forminator-custom-input').show();
320-
} else if ('custom_option' === checkInput.val() && !checkInput.is(':checked')) {
321-
checkField.find('.forminator-custom-input').hide();
322-
}
323308
});
324309
});
325310
}
@@ -347,19 +332,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
347332
$(this).on('click', function () {
348333
var checkInput = $(this);
349334
var checkLabel = checkInput.parent();
350-
var checkField = checkLabel.closest('.forminator-field');
351335
if (checkLabel.is('.forminator-is_checked')) {
352336
checkLabel.removeClass('forminator-is_checked');
353337
} else {
354338
checkLabel.addClass('forminator-is_checked');
355339
}
356-
357-
// check if value is custom_option then show the custom option input
358-
if ('custom_option' === checkInput.val() && checkInput.is(':checked')) {
359-
checkField.find('.forminator-custom-input').show();
360-
} else if ('custom_option' === checkInput.val() && !checkInput.is(':checked')) {
361-
checkField.find('.forminator-custom-input').hide();
362-
}
363340
});
364341
});
365342
}
@@ -469,18 +446,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
469446
if ($select.closest('.hustle-popup').length || $select.closest('.hustle-slidein')) {
470447
$(document.body).addClass('forminator-hustle-dropdown-fix');
471448
}
472-
}).on('select2:select', function () {
473-
if ($(this).val().includes('custom_option')) {
474-
$(this).closest('.forminator-field').find('.forminator-custom-input').show();
475-
} else {
476-
$(this).closest('.forminator-field').find('.forminator-custom-input').hide();
477-
}
478-
}).on('select2:unselect', function () {
479-
if ($(this).val().includes('custom_option')) {
480-
$(this).closest('.forminator-field').find('.forminator-custom-input').show();
481-
} else {
482-
$(this).closest('.forminator-field').find('.forminator-custom-input').hide();
483-
}
484449
}).on('select2:closing', function () {
485450
$(document.body).removeClass('forminator-hustle-dropdown-fix');
486451
});

js/forminator-form.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/forminator-poll.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
150150

151151
// Assign checked class
152152
radioLabel.addClass('forminator-is_checked');
153-
154-
// check if value is custom_option then show the custom option input
155-
if ('custom_option' === radioInput.val() && radioInput.is(':checked')) {
156-
radioField.find('.forminator-custom-input').show();
157-
} else {
158-
radioField.find('.forminator-custom-input').hide();
159-
}
160153
});
161154
});
162155
}

js/forminator-poll.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)