@@ -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 } ) ;
0 commit comments