HTML select statements can be rendered from the database using the 'Dropdown' behavior: <select id="Status" name="Status" data-behavior="Dropdown" data-dropdown-options="{{ 'url': 'Application/ObjectStatus.ashx/List?output=Json', 'jsonEval': 'ObjectStatusCollection.ObjectStatusItem', 'value': 'ObjectStatus', 'text': 'Label',
<option value="">--</option> </select> The options passed to the behavior comprise:
The qbo3.DropdownType object contains the standard options for commonly used drop down lists, including:
To leverage these predefined options, specify a 'type' in the behavior options. For example: <select id="Status" name="Status" data-behavior="Dropdown" data-dropdown-options="{{ 'type': 'ObjectStatus' , 'data': {{ 'Object': 'Loan' }} }}"> <option value="">--</option> </select> |