ORKFormStep Class Reference
|Inherits from||ORKStep : NSObject|
ORKFormStep class is a concrete subclass of
ORKStep, used for presenting multiple questions
on a single scrollable page.
ORKFormStep, instantiate the object, fill in its properties, and include it
in a task. Next, create a task view controller for the task and present it.
When the task completes, the user’s answers are encoded in the result hierarchy
in the task view controller.
Each question in the form is represented by an
ORKFormItem object. The form items have an
optional property that defaults to
YES. All required questions need to be answered for the
Continue button to be enabled. If all the form items are optional, at least one question needs to
be answered for the Continue button to be enabled. You can allow the user to completely skip a
form step using the Skip button, even if it has required form items, by setting the form step
optional property to yes.
The form can be broken into sections by using an
ORKFormItem object that includes only a section
Returns an initialized form step using the specified identifier, title, and text.
- (instancetype)initWithIdentifier:(NSString *)identifier title:(nullable NSString *)title text:(nullable NSString *)text
The string that identifies the step (see
The title of the form (see
The text shown immediately below the title (see
As initialized form step object.
Additional text to display for the step in a localized string at the bottom of the view.
@property (nonatomic, copy, nullable) NSString *footnote
The footnote is displayed in a smaller font below the continue button. It is intended to be used in order to include disclaimer, copyright, etc. that is important to display in the step but should not distract from the main purpose of the step.
The array of items in the form.
@property (nonatomic, copy, nullable) NSArray<ORKFormItem*> *formItems
A form step that contains no items is considered invalid and an exception will be thrown when it is presented.
The property to present the form with all the items in a card view. Default to YES;
@property (nonatomic) BOOL useCardView