1

I'm using the webform module (8.x-5.0-rc12) and I've used the Address type element to store my addresses.

I'd like to set the Country field to default to United Kingdom when the form is displayed.

Does anyone konw if I can set that within the user interface?

Thanks.

1 Answer 1

6

Under the 'Address' element's 'Advanced' tab, you can set the 'Default value' via the UI.

enter image description here

2
  • 1
    To clarify for others in the future you insert the values as YAML, I referred to previous submissions and looked at them in the YAML format to determine what the default value keys should be. For example city: TAMPA state_province: FL
    – NickStees
    Aug 3, 2021 at 19:26
  • You can use tokens in here too, which is excellent.
    – colan
    May 12 at 2:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.