I’m attempting to use html.select as a multiple select, but can’t seem to work out how I would put it together, or even if it can be done.
I have the following:
`
#html.select(multiple=“true”, name=“employmentStatus”, bind=rc.profile.getEmploymentStatus(), bindProperty=“id”, options=Application.lookups.list(‘profile’,‘employment_status’), column=“id”, nameColumn=“description”, class=“form-control”, wrapper=“div class=‘col-md-8’”)#
`
Application.lookups.list(‘profile’,‘employment_status’) populates the options.
rc.profile.getEmploymentStatus() holds an array of objects for the currently selected options.
the id property of rc.profile.getEmploymentStatus() holds the value of the currently selected items. There can be more than one (thus an array of objects).
From what I can tell, the way I have set the method up, and the properties passing in, should tie it all together, but it doesn’t. Currently the select is populated with 4 options, and 2 should be selected, but the aren’t. The id property in both of the objects in the rc.profile.getEmploymentStatus() array should match the id column of 2 of the options, but they don’t.
Can anyone see if I am totally missing something here?
Many THanks!
Jason