Class FormField
- java.lang.Object
-
- com.hellosign.sdk.resource.AbstractResource
-
- com.hellosign.sdk.resource.support.CustomField
-
- com.hellosign.sdk.resource.support.FormField
-
public class FormField extends CustomField
This class represents a HelloSign Form Field object.
-
-
Field Summary
-
Fields inherited from class com.hellosign.sdk.resource.support.CustomField
CUSTOM_FIELD_API_ID, CUSTOM_FIELD_AVG_TEXT_LENGTH, CUSTOM_FIELD_EDITOR, CUSTOM_FIELD_HEIGHT, CUSTOM_FIELD_NAME, CUSTOM_FIELD_NUM_CHARS_PER_LINE, CUSTOM_FIELD_NUM_LINES, CUSTOM_FIELD_REQUIRED, CUSTOM_FIELD_TYPE, CUSTOM_FIELD_VALUE, CUSTOM_FIELD_WIDTH, CUSTOM_FIELD_X, CUSTOM_FIELD_Y
-
Fields inherited from class com.hellosign.sdk.resource.AbstractResource
dataObj, warnings
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Integer
getPage()
Returns the page number this component is on.java.lang.Integer
getSigner()
Returns the signer index for this form field.ValidationType
getValidationType()
Return the validation rule being used for this fieldjava.lang.String
getValidationTypeString()
Return the validation rule being used for this field as a stringvoid
setPage(java.lang.Integer page)
Set the page number for this component.void
setRequired(boolean isRequired)
Deprecated.void
setSigner(java.lang.Integer signer)
Set the signer index that should complete this form field.void
setValidationType(ValidationType type)
Set the validation rule for this field.void
setValue(java.lang.String value)
Set the value for this field.-
Methods inherited from class com.hellosign.sdk.resource.support.CustomField
getApiId, getEditor, getEstimatedCharsPerLine, getEstimatedTextLines, getHeight, getName, getType, getTypeString, getValue, getWidth, getX, getY, isRequired, setApiId, setEditor, setHeight, setIsRequired, setName, setType, setWidth, setX, setY
-
Methods inherited from class com.hellosign.sdk.resource.AbstractResource
add, addToList, clearList, get, getBoolean, getConstructor, getDate, getInteger, getJSONObject, getList, getList, getLong, getObject, getString, getWarnings, has, hasString, set, toString, toString
-
-
-
-
Constructor Detail
-
FormField
public FormField()
-
FormField
public FormField(org.json.JSONObject json) throws HelloSignException
- Throws:
HelloSignException
-
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 typename
- String Field Label that will be displayed to the signersigner
- int index of the signer that should complete this field (0-based index)x
- int x coordinate location of this field in pixelsy
- int y coordinate location of this field in pixelsheight
- int height of this field in pixelswidth
- int width of this field in pixelspage
- 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)
Deprecated.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 classCustomField
- Parameters:
value
- String
-
-