Skip to content

AdminLTETags: Default variable values #826

Description

@oyeaussie
        {{adminltetags.useTag('fields',
            [
                'component'                             : component,
                'componentName'                         : componentName,
                'componentId'                           : componentId,
                'sectionId'                             : sectionId,
                'fieldId'                               : 'id',
                'fieldLabel'                            : 'ID',
                'fieldType'                             : 'input',
                'fieldHelp'                             : true,
                'fieldHelpTooltipContent'               : 'Company ID',
                'fieldRequired'                         : false,
                'fieldBazScan'                          : true,
                'fieldBazPostOnCreate'                  : false,
                'fieldBazPostOnUpdate'                  : true,
                'fieldHidden'                           : true,
                'fieldDisabled'                         : true,
                'fieldValue'                            : companyId
            ]
        )}}

In the above example, we are providing information about component, componentName, componentId, which should be available to the package via View. So we do not need to define them every time for each tag call.

Also, we need to make sure we have defaults for field values, like fieldRequired should be false by default, no need to set it.

Metadata

Metadata

Assignees

Labels

P3I will get to this in a week or a month, bribe me to prioritisetaskPerform a Task

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions