FormEntryPrompt class

A question at a form index: its texts, answer, choices, constraint message and state.

Port of org.javarosa.form.api.FormEntryPrompt.

Inheritance

Constructors

FormEntryPrompt(FormDef form, FormIndex index)
The prompt for the question at index in form.

Properties

answerText → String?
The answer as displayed: choice labels for selects, asterisks for secret inputs.
no setter
answerValue → AnswerValue?
The current answer. For deprecated <copy> itemsets, the selections matching the copied subtrees; for itemsets without <value>, null.
no setter
appearanceHint → String?
The appearance attribute.
no setterinherited
audioText → String?
The label's audio URI, if any.
no setterinherited
bindAttributes → List<TreeElement>
The bind attributes not handled by JavaRosa itself.
no setter
controlType → ControlType
The question's control type.
no setter
dataType → DataType
The instance node's data type.
no setter
element → FormElement
The group, repeat or question.
finalinherited
form → FormDef
The form.
finalinherited
formElement → FormElement
The group, repeat or question.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
helpText → String?
The hint: localized, else the literal hint.
no setter
imageText → String?
The label's image URI, if any.
no setterinherited
index → FormIndex
Where the element is.
finalinherited
isReadOnly → bool
Whether the question is read-only.
no setter
isRequired → bool
Whether an answer is required.
no setter
localizer → Localizer?
The form's localizer.
no setterinherited
longText → String?
The label (long form, else default form, else literal label).
no setterinherited
multiplicity → int
The repeat instance index (-1 outside repeats).
no setterinherited
numRepetitions → int
The number of instances of this repeat.
no setterinherited
question → QuestionDef
The question.
no setter
repeats → bool
Whether the element is a repeat.
no setterinherited
repetitionsText → List<String?>
The header of every instance of this repeat.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectChoices → List<SelectChoice>
The choices: static ones, or the itemset's for this question.
no setter
shortText → String?
The short label, falling back to longText.
no setterinherited
textId → String?
The itext id of the label, if localized.
no setterinherited
treeElement → TreeElement
The question's instance node.
final
viewWidget ↔ QuestionWidget?
The widget notified of changes, once registered.
getter/setter pairinherited

Methods

constraintText({String? textForm, AnswerValue? attemptedValue}) → String?
The constraint message (in textForm, if given), evaluated with attemptedValue as the candidate; null without a constraint.
itext(String? textId, String? form) → String?
The raw itext for textId in form (or the default form) in the current language; null without a localizer or text.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
questionText([String? textId]) → String?
The label text for textId (by default this element's).
inherited
register(QuestionWidget widget) → void
Notifies widget of state changes until unregister.
override
repeatText(String typeKey) → String?
A repeat caption: mainheader, add, add-empty, del, done, done-empty or delheader, with JavaRosa's English defaults.
inherited
repetitionText({required bool newRepeat}) → String?
The header of this repeat instance, such as Child 2/3.
inherited
requestConstraintHint(ConstraintHint hint) → void
Initializes hint with this question's constraint; throws UnpivotableExpressionException without one.
selectChoiceText(SelectChoice choice) → String?
The label of choice.
selectItemText(Selection selection) → String?
The label of the choice selection refers to.
specialFormQuestionText(String? form, [String? textId]) → String?
The form text form of the label (textId by default this element's), if any.
inherited
specialFormSelectChoiceText(SelectChoice choice, String? form) → String?
The form text form of choice's label, if any.
specialFormSelectItemText(Selection selection, String? form) → String?
The form text form of selection's label, if any.
substituteStringArgs(String? template) → String?
template with its ${n} outputs filled in at this index.
inherited
toString() → String
A string representation of this object.
inherited
unregister() → void
Stops notifying the registered widget.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited