Skip to main content

BwForm | bw-form

Overview

BwForm is a wrapper over the native form element and has some basic visual and functional improvements over using a regular form. For more information, see the form tutorial.

This is one of 2 components that do not use the shadow dom. The other component is BwDialog. They both rely on the native form element, which can be tricky to use in the shadow dom, so instead they use scoped css.

Properties

PropertyAttributeDescriptionTypeDefault
validationDelayvalidation-delayANGULAR ONLY: If true, will delay bwModelChange events until the form is valid. Has no effect outside of Angular. [DEPRECATED] This has mixed results. We're moving away from itbooleanfalse

Events

EventDescriptionType
dataPatchEmits object containing the key/value pairs of only the form controls that changed . This will emit the values in their original data type, as opposed to the patch event which converts everything to a string.CustomEvent<{ [x: string]: any; }>
dataSubmitEmits object of the values in the form of all controls that had a name attribute. This will emit the values in their original data type, as opposed to the native formData event which converts everything to a string.CustomEvent<{ [x: string]: any; }>
formDataEmits object of the values in the form of all controls that had a name attribute [DEPRECATED] use dataSubmit insteadCustomEvent<{ [x: string]: FormDataEntryValue; }>

Methods

getFormElement() => Promise<HTMLFormElement>

Returns the underlying HTMLFormElement

Returns

Type: Promise<HTMLFormElement>

hasChanged(strict?: boolean) => Promise<boolean>

Returns if there are any bluewater controls whose orginal value does not equal their current value

Parameters

NameTypeDescription
strictboolean

Returns

Type: Promise<boolean>

isTouched() => Promise<boolean>

Returns if there are any bluewater controls with a user-invalid or user-valid state

Returns

Type: Promise<boolean>

valid() => Promise<boolean>

Returns if there are any bluewater controls with a --invalid state

Returns

Type: Promise<boolean>

Dependencies

Used by

Graph


© 2025 United Systems & Software - All Rights Reserved.