diff --git a/src/digital-components/dropdown-question/dropdown-question.vue b/src/digital-components/dropdown-question/dropdown-question.vue index bdc36a0d8..9b999991a 100644 --- a/src/digital-components/dropdown-question/dropdown-question.vue +++ b/src/digital-components/dropdown-question/dropdown-question.vue @@ -35,7 +35,7 @@ export default { name: "dropdown-question", props: { modelValue: String, - inputId: String, + //inputId: String, options: { type: Object, required: true, @@ -49,6 +49,10 @@ export default { placeHolderText: String, }, setup(props) { + const inputId = !props.customInputId + ? `dropdown-${crypto.randomUUID()}` + : props.customInputId; + const propsClone = Object.assign({}, props); const modelValue = propsClone.modelValue; let initialValue; @@ -69,12 +73,13 @@ export default { }; const { errorMessage, handleBlur, handleChange, meta, errors } = useField( - props.inputId, + inputId, props.validationRules, fieldOptions ); return { + inputId, errorMessage, handleBlur, handleChange, diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index 9d9976d0e..37ef5dac8 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -60,7 +60,7 @@ export default { default: true, }, modelValue: String, - inputId: String, + customInputId: String, isDisabled: Boolean, isRequired: Boolean, hasIcon: Boolean, // If input has an icon @@ -80,6 +80,8 @@ export default { preventAutoFill: Boolean, }, setup(props) { + const inputId = !props.customInputId ? `input-${crypto.randomUUID()}` : props.customInputId; + const propsClone = Object.assign({}, props); const modelValue = propsClone.modelValue; let initialValue; @@ -100,12 +102,13 @@ export default { }; const { errorMessage, handleBlur, handleChange, meta, validate, errors } = useField( - props.inputId, + inputId, props.validationRules, fieldOptions ); return { + inputId, errorMessage, handleBlur, handleChange, diff --git a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue index 86f468076..a841449d8 100644 --- a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue +++ b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue @@ -7,7 +7,7 @@ cmsWidgetName="StreetAddressQuestionWidget" v-model="addressModel.streetAddress" ref="autocomplete" - inputId="autocomplete" + customInputId="autocomplete" placeholderText="Search" aria-haspopup="" hasIcon @@ -25,9 +25,7 @@ + ref="apartmentNumberOrBusinessName" /> @@ -38,8 +36,6 @@ cmsWidgetName="CityQuestionWidget" v-model="addressModel.city" ref="city" - inputId="city" - disableAutoFill validationRules="city-required" /> @@ -51,9 +47,7 @@ cmsWidgetName="StateQuestionWidget" v-model="addressModel.state" ref="state" - inputId="state" :options="stateOptions" - disableAutoFill validationRules="state-required" />
@@ -61,7 +55,6 @@ cmsWidgetName="ZipQuestionWidget" v-model="addressModel.zipCode" ref="zipCode" - inputId="zipCode" mask="#####" disableAutoFill validationRules="zip-code-required|zip-code-format" /> diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 548a3da68..a041d5965 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -173,12 +173,6 @@ export default { modelValue(newValue) { this.internalModel = this.copyModel(newValue); }, - internalModel: { - handler(newValue) { - console.log(newValue); - }, - deep: true - } }, components: { textLink,