Bold360 and BoldChat Developer Center

BCFormField Class Reference

Container class for information about an individual form field. This class also contains the value to be submitted. More...

#import <BCFormField.h>

Inheritance diagram for BCFormField:

Instance Methods

(id) - initWithType:key:isMultiline:label:labelBrandingKey:isRequired:isVisible:isDepartmentStatusVisible:defaultValue:options:
 The constructor for BCFormField. More...
 

Class Methods

(id) + formFieldWithType:key:isMultiline:label:labelBrandingKey:isRequired:isVisible:isDepartmentStatusVisible:defaultValue:options:
 The static constructor for BCFormField. More...
 

Properties

BCFormFieldType type
 Type of the form field. More...
 
NSString * key
 When submitting this is the key field that the server will be expecting. More...
 
BOOL isMultiline
 If the text field is BCFormFieldTypeText then this field indicates if the text input field should have multiple lines. More...
 
NSString * label
 The prompt label for the form field. More...
 
NSString * labelBrandingKey
 The branding value key that should be used for the label, or null if this is a custom field. If this returns nil then label should be used instead. More...
 
BOOL isRequired
 Indicates if there should be validation on this field to ensure the user enters information, or selects a value. More...
 
BOOL isVisible
 Determines if the field should be shown to the user or not. More...
 
BOOL isDepartmentStatusVisible
 If the field is type BCFormFieldTypeSelect and is a BoldChat department selection type of field then this field indicates if the online/offline status of the department should be shown to the user. More...
 
BCFormFieldOptiondefaultOption
 If the form field type is BCFormFieldTypeSelect or BCFormFieldTypeRadio it holds the default option. More...
 
NSArray * options
 If the field is BCFormFieldTypeSelect or BCFormFieldTypeRadio then this method returns all the options that should be given to the user. The array holds BCFormFieldOption objects. More...
 
NSString * value
 The value that has been set for this field, or nil if is unset. More...
 

Detailed Description

Container class for information about an individual form field. This class also contains the value to be submitted.

Since
Version 1.0

Method Documentation

+ (id) formFieldWithType: (BCFormFieldType)  type
key: (NSString *)  key
isMultiline: (BOOL)  isMultiline
label: (NSString *)  label
labelBrandingKey: (NSString *)  labelBrandingKey
isRequired: (BOOL)  isRequired
isVisible: (BOOL)  isVisible
isDepartmentStatusVisible: (BOOL)  isDepartmentStatusVisible
defaultValue: (NSString *)  defaultValue
options: (NSArray *)  options 

The static constructor for BCFormField.

Parameters
typeType of the form field.
keyWhen submitting this is the key field that the server will be expecting.
isMultilineIf the text field is BCFormFieldTypeText then this field indicates if the text input field should have multiple lines.
labelThe title label text of the field.
labelBrandingKeyThe branding value key that should be used for the label, or null if this is a custom field. If this returns nil then label should be used instead.
isRequiredIt indicates if there should be validation on this field to ensure the user enters information, or selects a value.
isVisibleIt determines if the field should be shown to the user or not.
isDepartmentStatusVisibleIf the field is type BCFormFieldTypeSelect and is a BoldChat department selection type of field then this field indicates if the online/offline status of the department should be shown to the user.
defaultValueThe default value of the form field, if the type is not BCFormFieldTypeSelect or BCFormFieldTypeRadio.
optionsIf the field is BCFormFieldTypeSelect or BCFormFieldTypeRadio then this method returns all the options that should be given to the user.
Returns
An instance of BCFormField class.
Since
Version 1.0
- (id) initWithType: (BCFormFieldType)  type
key: (NSString *)  key
isMultiline: (BOOL)  isMultiline
label: (NSString *)  label
labelBrandingKey: (NSString *)  labelBrandingKey
isRequired: (BOOL)  isRequired
isVisible: (BOOL)  isVisible
isDepartmentStatusVisible: (BOOL)  isDepartmentStatusVisible
defaultValue: (NSString *)  defaultValue
options: (NSArray *)  options 

The constructor for BCFormField.

Parameters
typeType of the form field.
keyWhen submitting this is the key field that the server will be expecting.
isMultilineIf the text field is BCFormFieldTypeText then this field indicates if the text input field should have multiple lines.
labelThe title label text of the field.
labelBrandingKeyThe branding value key that should be used for the label, or null if this is a custom field. If this returns nil then label should be used instead.
isRequiredIt indicates if there should be validation on this field to ensure the user enters information, or selects a value.
isVisibleIt determines if the field should be shown to the user or not.
isDepartmentStatusVisibleIf the field is type BCFormFieldTypeSelect and is a BoldChat department selection type of field then this field indicates if the online/offline status of the department should be shown to the user.
defaultValueThe default value of the form field, if the type is not BCFormFieldTypeSelect or BCFormFieldTypeRadio.
optionsIf the field is BCFormFieldTypeSelect or BCFormFieldTypeRadio then this method returns all the options that should be given to the user.
Since
Version 1.0

Property Documentation

- (BCFormFieldOption*) defaultOption
readnonatomicassign

If the form field type is BCFormFieldTypeSelect or BCFormFieldTypeRadio it holds the default option.

Since
Version 1.0
- (BOOL) isDepartmentStatusVisible
readnonatomicassign

If the field is type BCFormFieldTypeSelect and is a BoldChat department selection type of field then this field indicates if the online/offline status of the department should be shown to the user.

Since
Version 1.0
- (BOOL) isMultiline
readnonatomicassign

If the text field is BCFormFieldTypeText then this field indicates if the text input field should have multiple lines.

Since
Version 1.0
- (BOOL) isRequired
readnonatomicassign

Indicates if there should be validation on this field to ensure the user enters information, or selects a value.

Since
Version 1.0
- (BOOL) isVisible
readnonatomicassign

Determines if the field should be shown to the user or not.

Since
Version 1.0
- (NSString*) key
readnonatomiccopy

When submitting this is the key field that the server will be expecting.

Since
Version 1.0
- (NSString*) label
readnonatomiccopy

The prompt label for the form field.

Since
Version 1.0
- (NSString*) labelBrandingKey
readnonatomiccopy

The branding value key that should be used for the label, or null if this is a custom field. If this returns nil then label should be used instead.

Since
Version 1.0
- (NSArray*) options
readnonatomiccopy

If the field is BCFormFieldTypeSelect or BCFormFieldTypeRadio then this method returns all the options that should be given to the user. The array holds BCFormFieldOption objects.

Since
Version 1.0
- (BCFormFieldType) type
readnonatomicassign

Type of the form field.

Since
Version 1.0
- (NSString*) value
readwritenonatomicstrong

The value that has been set for this field, or nil if is unset.

Since
Version 1.0

The documentation for this class was generated from the following file: