Interface PhoneField<F extends PhoneField<F>>
- All Superinterfaces:
Comparable<F>
,Component<F>
,Copyable<F>
,Field<F>
,FormComponent<F>
,Serializable
- All Known Implementing Classes:
DefaultPhoneField
Represents the metadata for a FieldTypes.PHONE
field. A phone field is useful for
situations when you are managing a phone property.
A dynamic field can be used to switch between one field type and another, for example:
Fields.phone() .placeholderCountryCode("1");
- Author:
- Bongani Mbigi (bongani-m)
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault F
Excludes the country code input for this phone field.default F
Excludes the extension input for this phone field.default F
Include the country code input for this phone field.default F
Include the country code input for this phone field.default F
placeholderCountryCode
(String placeholder) Configures the the field to have the placeholder with the desired country code ex.default F
placeholderExtension
(String placeholder) Configures the the field to have the placeholder with the desired extension ex.default F
placeholderPhoneNumber
(String placeholder) Configures the the field to have the placeholder with the desired extension ex.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Component
addAction, addAction, addComponent, addEndpoint, addEndpoint, apply, attribute, augmentationKey, classifier, clearConditionals, clearEndpoints, conditional, conditionals, description, description, findAction, findAction, findActions, findAttribute, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoint, findEndpoints, get, get, getAction, getAction, getActions, getActionsList, getAttribute, getAttribute, getAttributes, getAugmentationKey, getClassifier, getComponent, getComponent, getComponents, getComponentsList, getConditionals, getDescription, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOrder, getScope, getType, hasAction, hasAttribute, hasComponent, hasEndpoint, id, isAugmentable, isTranslatable, label, label, notTranslatable, order, removeAction, removeAttribute, removeComponent, removeEndpoint, scope, self, setActions, setAttributes, setAugmentationKey, setClassifier, setComponents, setConditionals, setDescription, setEndpoints, setId, setLabel, setOrder, setScope, setTranslatable, setType, translatable, translatable, type
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Field
clearReadOnlyConditionals, decorated, decorated, defaultValue, getDefaultValue, getName, getPlaceholder, getReadOnlyConditionals, getRequiredMessage, getValidationSchema, isReadOnly, isRequired, isShowInQueryBuilder, isTargetCollection, name, notReadOnly, notRequired, placeholder, placeholder, readOnly, readOnly, readOnlyConditional, readOnlyConditionals, required, required, required, required, requiredMessage, requiredMessage, setDefaultValue, setName, setPlaceholder, setReadOnly, setReadOnlyConditionals, setRequired, setRequiredMessage, setShowInQueryBuilder, setValidationSchema, targetIsCollection, targetIsNotCollection, validationMethod, validationSchema, validationSchema
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.FormComponent
getHelpText, getHint, getTooltip, helpText, helpText, helpText, hidden, hidden, hint, hint, isHidden, notHidden, setHelpText, setHidden, setHint, setTooltip, tooltip, tooltip
-
Method Details
-
includeCountryCode
Include the country code input for this phone field. This input is used to manage the countryCode property on the phone. Defaults to true. UseexcludeCountryCode()
to exclude this input ex. the number +1 (555) 555-5555 would include the field to enter 1 as the area code. which the result would be an object like: { countryCode: '1', phoneNumber: '5555555555' }- Returns:
- this
-
includeExtension
Include the country code input for this phone field. This input is used to manage the extension property on the phone. Defaults to true. UseexcludeExtension()
to exclude this input ex. the number +1 (555) 555-5555 ext. 123 would include the field to enter 123 as the extension. which the result would be an object like: { extension: '123', phoneNumber: '5555555555' }- Returns:
- this
-
excludeCountryCode
Excludes the country code input for this phone field. Sets countryCode attribute to false. UseincludeCountryCode()
to include this input ex. the number +1 (555) 555-5555 would NOT include the field to enter 1 as the area code. which the result would be an object like: { phoneNumber: '5555555555' }- Returns:
- this
-
excludeExtension
Excludes the extension input for this phone field. Sets extension attribute to false. UseincludeExtension()
to include this input ex. the number +1 (555) 555-5555 ext. 123 would NOT include the field to enter 123 as the extension. which the result would be an object like: { phoneNumber: '5555555555' }- Returns:
- this
-
placeholderCountryCode
Configures the the field to have the placeholder with the desired country code ex. desired placeholder: 27 placeholder number: 27 (555) 555-5555 NOTE: the default is '1'- Returns:
- this
-
placeholderExtension
Configures the the field to have the placeholder with the desired extension ex. desired placeholder: 123 placeholder number: 1 (555) 555-5555 ext 123 NOTE: the default is blank i.e. ''- Returns:
- this
-
placeholderPhoneNumber
Configures the the field to have the placeholder with the desired extension ex. desired placeholder: 800-588-2300 placeholder number: 1 (800) 588-2300 NOTE: the default is: (555) 555-5555- Returns:
- this
-