0

I want to remove addition asterisk I think it because I disabled country. Any inputs please

<lightning-input-address
                 street-label="Street"
                 city-label="City"
                 country-disabled ="true"
                 country-label="Country"
                 province-label="State"
                 postal-code-label="PostalCode"
                 street={address.street}
                 city={address.city}
                 province={address.province}
                 country={address.country}
                 postal-code={address.postalCode}
                 province-options={getProvinceOptions}
                 value={leadRecord.Address} 
                 required="true"
                 onchange={handleChange} ></lightning-input-address>

enter image description here

1 Answer 1

1

Due to shadow dom you are not going to be able to hide that, assuming you still want all the other fields as required

Maybe you can just add a label to the entire address fieldset using the address-label attribute of lightning-input-address (first attribute of the specification https://developer.salesforce.com/docs/component-library/bundle/lightning-input-address/specification)

<template>
    <lightning-input-address address-label="User Address" street-label="Street" city-label="City" country-disabled="true"
        country-label="Country" province-label="State" postal-code-label="PostalCode" street={address.street}
        city={address.city} province={address.province} country={address.country} postal-code={address.postalCode}
        province-options={getProvinceOptions} required onchange={handleChange}>
    </lightning-input-address>
</template>

https://studio.webcomponents.dev/edit/0Ph5W2Du8LAwsQQzoRUg/src/app.html?p=stories

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .