dropdown element

i am experimenting with the dropdown element in order to capture a list of options. 2 questions

1. is there a way to sort the entries on load so they are in alpha order instead of entry order?

2. Where is the data stored? I want to be able to let people add an item to the dropdown but when I review it I may need to delete duplicate entries or junk entries. I can't see where to edit the data that gets populated.

Thanks
 
The answer to both those questions is "use a join element, not a dropdown".

Create a simple lookup table ... make a new List, default type (so just 'id' and 'date_time'), add a "name" element to it (call it what you want, it'll store the "label" for the dropdown entries) as a simple 'field' element. Set validations on the 'name' element, like "not empty" and "is unique".

Create a join element on your main form, select that new table, set the "value" to 'id' and the "label" to 'name'. Make it a dropdown. Allow "Front end add".

You should now have a dropdown on your form, with a "+" button that pops up the form for your lookup list, where you can add new entries.

You can also add a List menu item to the front end for your lookup list, after setting the Access permissions on the list appropriately, so people can remove and edit entries. The "is unique" validation should prevent duplicates being added.

-- hugh
 
Thank you. That seems to work. However upon saving i get this error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'join FROM lookup WHERE parent_id = 164' at line 1 SQL=SELECT id, join FROM lookup WHERE parent_id = 164

Also, now my list seems to be corrupt or something. I get a 500 error when trying to view the list.
 
i changed that and updated all of the forms and databases. I'm still getting a 500 error when trying to view the list on the front end and backend. Do I have a bad entry in the database?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top