I am creating a settings page for a specific Webform in version 6.x-3.x which finds all select option components in the form and creates a numeric textfield setting correlating to each select option. The Select Options are in fieldsets. On the settings page, I want the numeric textfields to show up in the same order that the select options show up in the form.
db_querying the right select options in the
webform_component table is working fine, but the select options show up out of order when ordering by
Fieldset 1 - Textfield 1 - Select Option 1 - Select Option 2 Fieldset 2 - Select Option 3 - Select Option 4
db_query('SELECT * FROM drupal_webform_component WHERE TYPE = "select" AND nid=123 ORDER BY weight'); generates results like this:
Select Option 1 Select Option 3 Select Option 4 Select Option 2
How do I order Webform results of components within fieldsets to reflect the order they appear on the form? What would the db_query look like?