Skip to content

Conditional shipping fields#365

Merged
fernanDOTdo merged 2 commits into
mainfrom
conditional-shipping-fields
Nov 11, 2025
Merged

Conditional shipping fields#365
fernanDOTdo merged 2 commits into
mainfrom
conditional-shipping-fields

Conversation

@MichaelT372

Copy link
Copy Markdown
Contributor

Added a ShowHideRadioCheckboxes instance to support the Shipping Fields.

Usually Shipping fields visibility is handled by EN automatically but there is recently an issue where sometimes their event listener does not fire and the fields are stuck visible, cannot be toggled and prevent form submission. This change is to give us a way to work around that.

When setting up fields this way, you must:

  • Move the Shipping Enabled checkbox into a separate form block from the other fields
  • Add the shipenabled-Y class to the form block containing the Shipping fields.
  • Remove any Mandatory requirements from the Shipping fields and instead use our i-required classes for handling conditional validation.

Test Pages

Without this change: https://support.nwf.org/page/90456/donate/1 spam refresh to see the EN bug happen and shipping fields become untoggleable.

With this change: https://support.nwf.org/page/90456/donate/1?assets=conditional-shippng-fields we're guarded against the EN bug and everything works.

@fernanDOTdo
fernanDOTdo merged commit 1b4979c into main Nov 11, 2025
2 checks passed
@fernanDOTdo
fernanDOTdo deleted the conditional-shipping-fields branch November 11, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants