Skip to main content
Skip table of contents

Adding combo-box component for multi-selection of entries

Combo-box component can be configured with various configuration parameters. For the overall context see Introduction to Details Pane Templates.

Configuration for the property Class of an entry

HTML
{{#form-container legacyController=legacyController 
                  $changeClass=false}}
    {{#if editable}}
        {{#responsive-grid-area}}  
            <div data-col="sm-4 xs-12 valign-sm-center valign-xs-bottom">
                {{check-box checked=$changeClass}}
                <label style="padding-left:5px">Change Class:</label>
            </div>
            <div data-col="sm-8 xs-12 valign-center" class="editable-field">
                {{combo-box 
                    stateChanged=$changeClass
                    model=editModelArray
                    field="Class"
                    mode="select"
                    ariaLabel="Select Class"
                }}
            </div>          
        {{/responsive-grid-area}}
    {{else}}
        {{#responsive-grid-area}}
            <div data-col="sm-4 xs-12 valign-sm-center valign-xs-bottom">
                Perfect:
            </div>
            <div data-col="sm-8 xs-12 valign-center">
                {{bulk-text-box model=model field="Class" readonly=true}}
            </div>
        {{/responsive-grid-area}}
    {{/if}}
{{/form-container}}

Internationalization is supported. e.g. in German, all classes will be displayed in German in the combo-box and the drop down.

Allowed classes of the tables of the entries is also taken into account, please refer to Adding combo-box component with fixed data source at section “With Class property”.
You can also suggest a subset of classes by updating the template combo-box with the following block.
The source here is just as an example.

CODE
                {{combo-box 
                    stateChanged=$changeClass
                    model=editModelArray
                    field="Class"
                    mode="select"
                    ariaLabel="Select Class"
                    source="['Audio', 'Music']"
                }}

Configuration for definitions

See Adding combo-box component and binding to dynamic data sources for the list of available definition fields and information about canCreate=true.

CODE
{{#form-container legacyController=legacyController 
				  $changeAuthor=false
				  $changeInstrumentation=false
				  $changeEndcode=false
				  $changePresenter=false
				  $changeEditor=false as |form|}}

	{{#if editable}}
		<table class="modern-table"> 
			<tbody>
                <tr><td>{{check-box checked=$changeInstrumentation}}<label>Change Instrumentation:</label></td><td class="editable-field">
			        {{combo-box stateChanged=$changeInstrumentation model=editModelArray field="Instrumentation"}}
                </td></tr>
                <tr><td>{{check-box checked=$changeEndcode}}<label>Change Endcode:</label></td><td class="editable-field">
			        {{combo-box stateChanged=$changeEndcode model=editModelArray field="Endcode"}}
                </td></tr>
                <tr><td>{{check-box checked=$changePresenter}}<label>Change Presenter:</label></td><td class="editable-field">
			        {{combo-box stateChanged=$changePresenter model=editModelArray field="Presenter"}}
                </td></tr>
                <tr><td>{{check-box checked=$changeAuthor}}<label>Change Author:</label></td><td class="editable-field">
			        {{combo-box stateChanged=$changeAuthor model=editModelArray field="Author" canCreate=true}}
                </td></tr>
                <tr><td>{{check-box checked=$changeEditor}}<label>Change Editor:</label></td><td class="editable-field">
			        {{combo-box stateChanged=$changeEditor model=editModelArray field="Editor" canCreate=true}}
                </td></tr>
			</tbody>
		</table>
	{{else}}
		<table class="modern-table">
			<tbody>
				<tr><td>Instrumentation:</td><td>{{bulk-text-box model=model field="Instrumentation" readonly=true}}</td></tr>
				<tr><td>Endcode:</td><td>{{bulk-text-box model=model field="Endcode" readonly=true}}</td></tr>
				<tr><td>Presenter:</td><td>{{bulk-text-box model=model field="Presenter" readonly=true}}</td></tr>
				<tr><td>Author:</td><td>{{bulk-text-box model=model field="Author" readonly=true}}</td></tr>
				<tr><td>Editor:</td><td>{{bulk-text-box model=model field="Editor" readonly=true}}</td></tr>
			</tbody>
		</table>
	{{/if}}
{{/form-container}}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.