Class FormField.Builder<F extends FormField,​B extends FormField.Builder<?,​?>>

    • Method Detail

      • setDescription

        public B setDescription​(String description)
        Sets a description that provides extra clarification about the question. This information could be presented to the user either in tool-tip, help button, or as a section of text before the question.

        If the question is of type FIXED then the description should remain empty.

        Parameters:
        description - provides extra clarification about the question.
        Returns:
        a reference to this builder.
      • setLabel

        public B setLabel​(String label)
        Sets the label of the question which should give enough information to the user to fill out the form.
        Parameters:
        label - the label of the question.
        Returns:
        a reference to this builder.
      • setRequired

        public B setRequired()
        Sets if the question must be answered in order to complete the questionnaire.
        Returns:
        a reference to this builder.
      • setRequired

        public B setRequired​(boolean required)
        Sets if the question must be answered in order to complete the questionnaire.
        Parameters:
        required - if the question must be answered in order to complete the questionnaire.
        Returns:
        a reference to this builder.
      • build

        public abstract F build()