0

I am able to use <lightning-input-address> to create a way to use address lookup functionality to prepopulate address fields. However, we want to hide the address fields and just show the address lookup.

Goal:

  1. Hide fields in the red box within the image

red box with fields to hide

Question:

  1. How can I hide the address fields and only show the address lookup portion of the <lightning-input-address>?

What I tried but didn't work:

<lightning-input-address
        show-address-lookup
        field-level-help="Help Text for inputAddress field" ></lightning-input-address>
1
  • 1
    It doesn't look like this is a feature for that component. If your goal is to just prevent editing the values after it filled in then you can use the read-only attribute Commented Aug 23, 2023 at 16:42

1 Answer 1

0

You can always hide fields with css. Here's how I just hid the country field:

.slds-form-element[data-field="country"]{
display:none;
}

it worked like a charm!

You must log in to answer this question.

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