Option group within matrix forms


#1

Hi guys

  • running 4.18.0
  • checked manuals


    Just wondering if there are any option for setting option groups within the select question within matrix forms? Using <optgroup>


    We have a long list of faculties and schools in which out team want to output in groups. Within these groups the options would also need to be alphabeticalised.

    Thoughts appreciated.


    Many thanks

    Fuzz

(Anthony) #2

Could you build the Squiz form with just the regular <option> entries, then totally separately nest an asset listing elsewhere on the page, inside a hidden DIV, that created out the whole <optgroup> structure (using asset list groupings). Finally use a line of jquery at page load to slice out the entire contents of the select question and replace it with your optgroup html from the hidden DIV? I think that would achieve the required UI and by the time the form got posted back I'm assuming Squiz wouldnt know the difference as long as your asset listing gave all the options within the optgroups the same id's, values etc

 

Tony


(Nic Hubbard) #3

No, this isn't possible.

 

What we have done in the past was nest an asset listing in grouped format that would build the optgroup just how we wanted. Not the best option in the world but it worked well.


#4

Thanks guys so much for your feedback and input. I was thinking asset listings but was just hoping there was magical option in the manusls that the technical writers hid - and revealed when you asked - lol!!