SurveyForm Class Reference
| Inherits from | NSObject |
| Declared in | SurveyForm.h |
Overview
SurveyForm is a the class responsible for creating and managing form fields. Creating a new form
for use, you must subclass SurveyForm using the properties to to define your fields, as you would subclass
NSManagedObject to create a CoreData object class for use with CoreData.
Subclassing
Methods to Override
In a SurveyForm Subclass the following methods are optional
– fields
Tasks
-
fieldReferenceTableA field reference to allow all child classes access to form fields *
property -
fieldDelegateThe delegate for Survey specific field subclasses to ease use of blocks
property -
fieldsThe collection of fields created from the subclass defined field properties. *
property -
valuesThe values of all the fields in the form, using key/value pairing. *
property -
errorsField errors collected using field name as a key, and it’s value as a collection of errors from the field. *
property -
isValidDetermines if all fields within the form return valid data.
property -
– indexOfField:Returns the index of passed field.
-
– getFieldAtTabIndex:Returns the index of a field.
-
+ fieldsA class method to determine the desired order of fields defined in the form subclass
Properties
errors
Field errors collected using field name as a key, and it’s value as a collection of errors from the field. *
@property (readonly, nonatomic) NSDictionary *errorsDiscussion
Field errors collected using field name as a key, and it’s value as a collection of errors from the field. *
Declared In
SurveyForm.hfieldDelegate
The delegate for Survey specific field subclasses to ease use of blocks
@property (strong, nonatomic) SurveyFieldDelegate *fieldDelegateDiscussion
The delegate for Survey specific field subclasses to ease use of blocks
@discussion Rather than making a field responsible for it’s own delegate, or a category hack, a central place for delegates to be managed. *
Declared In
SurveyForm.hfieldReferenceTable
A field reference to allow all child classes access to form fields *
@property (strong, nonatomic) NSArray *fieldReferenceTableDiscussion
A field reference to allow all child classes access to form fields *
Declared In
SurveyForm.hfields
The collection of fields created from the subclass defined field properties. *
@property (readonly, nonatomic) NSArray *fieldsDiscussion
The collection of fields created from the subclass defined field properties. *
Declared In
SurveyForm.hisValid
Determines if all fields within the form return valid data.
@property (readonly, nonatomic) BOOL isValidDiscussion
Determines if all fields within the form return valid data.
@discussion Fields are responsible for their own validation, this triggers the validation methods on each field and stores their responses in the errors ivar. *
Declared In
SurveyForm.hClass Methods
fields
A class method to determine the desired order of fields defined in the form subclass
+ (NSArray *)fieldsReturn Value
Array of strings using property names to specify form field order. *
Discussion
A class method to determine the desired order of fields defined in the form subclass
@discussion Do to weird behavior or the runtime methods to get properties list, order of a classes properties are not honored.
Declared In
SurveyForm.h