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 Details

    • addUsernameField

      default void addUsernameField(String name, Message label)
      Adds a field to collect an username.
      Parameters:
      name - the field name.
      label - the field label.
    • addUsernameField

      default void addUsernameField(String name, Message label, @Nullable String value)
      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

      void addUsernameField(String name, Message label, @Nullable String value, Message placeholder)
      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

      void addPasswordField(String name, Message label)
      Adds a field to collect a password.
      Parameters:
      name - the field name.
      label - the field label
    • addPasswordField

      void addPasswordField(String name, Message label, Message placeholder)
      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

      void addHiddenField(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. hidden from the user).
      Parameters:
      name - the field name.
      value - the field value.
    • addTextField

      default void addTextField(String name, Message label)
      Adds a field to collect free-form text.
      Parameters:
      name - the field name.
      label - the field label.
    • addTextField

      default void addTextField(String name, Message label, @Nullable String value)
      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

      void addTextField(String name, Message label, @Nullable String value, Message placeholder)
      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

      default void addTextField(String name, Message label, FieldKind kind)
      Adds a field to collect free-form text.
      Parameters:
      name - the field name.
      label - the field label.
      kind - the field kind.
    • addTextField

      default void addTextField(String name, Message label, FieldKind kind, @Nullable String value)
      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

      void addCheckboxField(String name, Message label, String value, boolean checked, boolean readonly)
      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 - if true, then the initial checked state is not changeable.