Webform element is always required

Created on 14 July 2023, over 1 year ago
Updated 9 July 2024, 5 months ago

Thanks for the module, it makes the Loqate integration easy :)

Problem/Motivation

When adding the PCA address composite field to a webform, the Address Line 1, ZIP/Postal Code and City/Town fields are always required. There is no option to override this per field, like the basic Address field has.

Under 'Form validation' details when creating the element I can see the following text: "To required individual elements, also tick "Required" under the PCA address settings above." however this doesn't exist:

Steps to reproduce

On a site with webform enabled:

  1. Install Loqate (just the main module, not pca_webform as that seems to be deprecated) and add the API key
  2. Add a webform with 1 field: PCA address (not required)
  3. Submit the form without filling anything in

The submission fails: "3 errors have been found: Address Line 1, ZIP/Postal Code, City/Town"

Proposed resolution

Get the individual composite fields to display under PCA address settings so they can be overridden one by one, including to set them all to not required. Also if the PCA address field is hidden by conditionals, none of the fields should be required so the form can still submit.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom sergiur London, UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024