assets/dist/theme-bundle.chunk.3.js
/**
 * If a country with states is the default, a select will be sent,
 * In this case we need to be able to switch to an input field and hide the required field
 */
If a country with states is the default, a select will be sent,
In this case we need to be able to switch to an input field and hide the required field
If a country with states is the default a select will be sent In this case we need to be able to switch to an input field and hide the required field
function makeStateOptional(stateElement) {
  var attrs = lodash_transform__WEBPACK_IMPORTED_MODULE_4___default()(stateElement.prop('attributes'), function (result, item) {
    var ret = result;
    ret[item.name] = item.value;
    return ret;
  });
  var replacementAttributes = {
    type: 'text',
    id: attrs.id,
    'data-label': attrs['data-label'],
    class: 'form-input',
    name: attrs.name,
    'data-field-type': attrs['data-field-type']
  };
  stateElement.replaceWith($('<input />', replacementAttributes));
  var $newElement = $('[data-field-type="State"]');
  if ($newElement.length !== 0) {
    Object(_form_utils__WEBPACK_IMPORTED_MODULE_6__["insertStateHiddenField"])($newElement);
    $newElement.prev().find('small').hide();
  }
  return $newElement;
}
function makeStateOptional ( stateElement ) { var attrs = lodash_transform__WEBPACK_IMPORTED_MODULE_4___default ( ) ( stateElement . prop ( 'attributes' ) , function ( result , item ) { var ret = result ; ret [ item . name ] = item . value ; return ret ; } ) ; var replacementAttributes = { type : 'text' , id : attrs . id , 'data-label' : attrs [ 'data-label' ] , class : 'form-input' , name : attrs . name , 'data-field-type' : attrs [ 'data-field-type' ] } ; stateElement . replaceWith ( $ ( '<input />' , replacementAttributes ) ) ; var $newElement = $ ( '[data-field-type="State"]' ) ; if ( $newElement . length !== 0 ) { Object ( _form_utils__WEBPACK_IMPORTED_MODULE_6__ [ "insertStateHiddenField" ] ) ( $newElement ) ; $newElement . prev ( ) . find ( 'small' ) . hide ( ) ; } return $newElement ; }
If a country with states is the default, a select will be sent,
 In this case we need to be able to switch to an input field and hide the required field
If a country with states is the default a select will be sent In this case we need to be able to switch to an input field and hide the required field