Hide Country if the only option

Created on 15 June 2024, 13 days ago

Problem/Motivation

This module hides the country field if it's the only option AND the address field is required. However, there would be cases where the address field is not required, yet it's the only option which has also been set as default. For that case, it is still necessary to hide the Country.

Steps to reproduce

In our case, we are using the require_on_publish β†’ module to require only when the content is being published. So the extra check on 'required' does not help, as it's logical to still have the Country hidden when it's the only option.

Proposed resolution

Remove the extra required check from the logic that hides the country when it's the only option.
I will follow up with a patch for this.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Jumoke

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

Comments & Activities

Production build 0.69.0 2024