selectpopulate(selms, tname, suffix)

Populate drop downs and other elements that uses option elements. It read what to use from the definition of the element. This is read from 'data-selectpopulate' attribute. Supported types are 'tdf', 'table'  and list.The default is to use data from the table definition. The auto form will automatically read the table definition for all tables used in the form, all the table data and all lists used. If you use this manually you need to make sure all data needed are present under formdefs for the tdf type, under formdata for the table type and under formlists for the lists. The method read data from the element to know what to populate. A full definition can be found in the auto form definition section.


- selms : an array of elements to update in jQuery format

- tname : the name of the table this form element is part of. If this is a tdf select the choice of the field def i used, in table the choice list is populated from a key value table defined by selecttablequery and list for list an empty tname value means to read the list from root of formdef, if not same rules as for the rest of the coices are use.

- suffix : character used for suffix seperator Ex. '_' that is what is used in auto form