Class FormField


  • public class FormField
    extends CustomField
    This class represents a HelloSign Form Field object.
    • Constructor Detail

      • FormField

        public FormField()
      • FormField

        public FormField​(FieldType type,
                         java.lang.String name,
                         int signer,
                         int x,
                         int y,
                         int height,
                         int width,
                         int page)
        Constructor to be used when creating a new FormField object.
        Parameters:
        type - FormField type
        name - String Field Label that will be displayed to the signer
        signer - int index of the signer that should complete this field (0-based index)
        x - int x coordinate location of this field in pixels
        y - int y coordinate location of this field in pixels
        height - int height of this field in pixels
        width - int width of this field in pixels
        page - int page number of the document in which this field will be placed (1-based index)
    • Method Detail

      • getSigner

        public java.lang.Integer getSigner()
        Returns the signer index for this form field.
        Returns:
        Integer signer index or null if not set
      • setSigner

        public void setSigner​(java.lang.Integer signer)
        Set the signer index that should complete this form field.
        Parameters:
        signer - Integer index
      • getPage

        public java.lang.Integer getPage()
        Returns the page number this component is on.
        Returns:
        Integer page number, or null if not set
      • setPage

        public void setPage​(java.lang.Integer page)
        Set the page number for this component. The (x, y) coordinates will be relative to the top left corner of that page.
        Parameters:
        page - Integer page number
      • getValidationType

        public ValidationType getValidationType()
        Return the validation rule being used for this field
        Returns:
        ValidationType validation type, null if not set
      • setValidationType

        public void setValidationType​(ValidationType type)
        Set the validation rule for this field. This will force the signer to enter data that conforms to the validation rule.
        Parameters:
        type - ValidationType
      • getValidationTypeString

        public java.lang.String getValidationTypeString()
        Return the validation rule being used for this field as a string
        Returns:
        String validation type, null if not set
      • setRequired

        @Deprecated
        public void setRequired​(boolean isRequired)
        Set this field as required.
        Parameters:
        isRequired - boolean true if field is required by signer
      • setValue

        public void setValue​(java.lang.String value)
        Description copied from class: CustomField
        Set the value for this field.
        Overrides:
        setValue in class CustomField
        Parameters:
        value - String