Multi Dropdown Selector - Required
Displays an option for selecting an option based on multiple dropdowns. This example marks the field as required.
- HTML
<div class="t-content" ng-controller="MultiDropdownSelectorExample as mdsExample"> <form class="c-form c-generalForm" name="exampleForm" autocomplete="off" style="width: 40%"> <fieldset class="c-fieldset"> <div class="c-fieldset-item is-required"> <label>Tax Exemption</label> <inv-multi-dropdown-selector label="Tax Exemption" additional-item-prompt="'Add an additional tax exemption'" is-required="true" first-dropdown-items="mdsExample.firstDropdownItems" second-dropdown-items="mdsExample.secondDropdownItems" ng-model="mdsExample.fieldModel"> </inv-multi-dropdown-selector> </div> </fieldset> <div class="u-flex u-flexRow u-flexEnd"> <button type="submit" ng-enabled="mdsExample.shouldEnableSubmit()" class="c-button c-button--primary ng-binding" tabindex="100">Submit</button> </div> <div class="u-flex u-flexRow" style="font-weight: 700;"> <span style="margin-right: 8px">Form Validity:</span> <span style="color: green" ng-show="mdsExample.shouldShowValid()">Valid</span> <span style="color: red" ng-show="!mdsExample.shouldShowValid()">Invalid</span> </div> <span style="margin-right: 8px; font-weight: 700;">Model:</span> <pre ng-bind="mdsExample.fieldModel | json"></pre> </form> </div>