Interface FormActionFields
- All Known Subinterfaces:
ContinueActionFields,FormActionConfigurator
public interface FormActionFields
Builder interface allowing the addition of fields to a form action being built.
- Since:
- 5.4.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCheckboxField(String name, Message label, String value, boolean checked, boolean readonly) Adds a checkbox field to the form.voidaddHiddenField(String name, String value) Adds an hidden field, which is a field with a value provided by the server and not collected from the user (i.e.voidaddPasswordField(String name, Message label) Adds a field to collect a password.voidaddPasswordField(String name, Message label, Message placeholder) Adds a field to collect a password.voidaddSelectField(String name, Message label, Consumer<? super FormActionSelectFieldOptions> init) Adds a multiple option select field.default voidaddTextField(String name, Message label) Adds a field to collect free-form text.default voidaddTextField(String name, Message label, @Nullable String value) Adds a field to collect free-form text.voidAdds a field to collect free-form text.default voidaddTextField(String name, Message label, FieldKind kind) Adds a field to collect free-form text.default voidAdds a field to collect free-form text.voidaddTextField(String name, Message label, FieldKind kind, @Nullable String value, Message placeholder) Adds a field to collect free-form text.default voidaddUsernameField(String name, Message label) Adds a field to collect an username.default voidaddUsernameField(String name, Message label, @Nullable String value) Adds a field to collect an username.voidAdds a field to collect an username.
-
Method Details
-
addUsernameField
Adds a field to collect an username.- Parameters:
name- the field name.label- the field label.
-
addUsernameField
Adds a field to collect an username.- Parameters:
name- the field name.label- the field label.value- the optional initial value for the field.
-
addUsernameField
Adds a field to collect an username.- Parameters:
name- the field name.label- the field label.value- the optional initial value for the field.placeholder- the optional field placeholder.
-
addPasswordField
Adds a field to collect a password.- Parameters:
name- the field name.label- the field label
-
addPasswordField
Adds a field to collect a password.- Parameters:
name- the field name.label- the field label.placeholder- the field placeholder.
-
addSelectField
void addSelectField(String name, Message label, Consumer<? super FormActionSelectFieldOptions> init) Adds a multiple option select field.- Parameters:
name- the field name.label- the field label.init- builder allowing the addition of selection options.
-
addHiddenField
Adds an hidden field, which is a field with a value provided by the server and not collected from the user (i.e. hidden from the user).- Parameters:
name- the field name.value- the field value.
-
addTextField
Adds a field to collect free-form text.- Parameters:
name- the field name.label- the field label.
-
addTextField
Adds a field to collect free-form text.- Parameters:
name- the field name.label- the field label.value- the optional initial value for the field.
-
addTextField
Adds a field to collect free-form text.- Parameters:
name- the field name.label- the field label.value- the optional initial value for the field.placeholder- the field placeholder.
-
addTextField
Adds a field to collect free-form text.- Parameters:
name- the field name.label- the field label.kind- the field kind.
-
addTextField
Adds a field to collect free-form text.- Parameters:
name- the field name.label- the field label.kind- the field kind.value- the optional initial value for the field.
-
addTextField
void addTextField(String name, Message label, FieldKind kind, @Nullable String value, Message placeholder) Adds a field to collect free-form text.- Parameters:
name- the field name.label- the field label.kind- the field kind.value- the optional initial value for the field.placeholder- the field placeholder.
-
addCheckboxField
Adds a checkbox field to the form.- Parameters:
name- the field name.label- the field label.value- the field value, present in the form submission if the checkbox is checked.checked- the initial checked state.readonly- iftrue, then the initial checked state is not changeable.
-