Package =TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded.On this page:
ClassMethod new (%...)Construct a new FieldDefinition. Parameters are passed in a hash. See Form.pm for how it is called. Subclasses should pass @_![]() ObjectMethod finish ()Break circular references.isEditable() -> $booleanIs the field type editable? Labels aren't, for example. Subclasses may need to redefine this.isMultiValued() -> $booleanIs the field type multi-valued (i.e. does it store multiple values)? Subclasses may need to redefine this.isTextMergeable() -> $booleanIs this field type mergeable using a conventional text merge?isMandatory() -> $booleanIs this field mandatory (required)?renderForEdit( $web, $topic, $value ) -> ($col0html, $col1html)$web - the web containing the topic being edited
$topic - the topic being edited
Render the field for editing. Returns two chunks of HTML; the
$col0html is appended to the HTML for the first column in the
form table, and the $col1html is used as the content of the second column.
@classes
Construct a list of the CSS classes for the form field. Adds additional
class specifiers related to the attributes of the field e.g mandatory.
Pass it a list of the other classnames you want on the field.
|