Posts: 3
Threads: 1
Joined: Oct 2011
Reputation:
0
Is it possible to have option lists built from value pairs in the database table? This would make it more dynamic.
For example - I'd like to have a list of companies and codes in a table and have a drop-down in my form with the list of companies and return the codes as a value. That list of companies/codes would also have a form that could so that list can grow or change.
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Interesting. Sort of, yes...!
With FT 2.1.0+ when you create a radio, checkbox, dropdown or multi-select dropdown, you have the option to specify *either* an Option List as the data source for the field, or the contents of a separate form field (but on from a different form). To do this, just edit the field on the Edit Form -> Fields tab, and go to the second tab in the dialog window that appears. There, in the Option List / Content field, pick the form field.
So you could create a form #1, that has an "event" field. Then in the second form, target the contents of that form field for the dropdown field (or whatever). Then the content of that dropdown would always reflect what's in that other form.
It's dynamic, but pretty limited. Plus it only pulls from a single form field - and it has to be in a separate form. So it's definitely not perfect, but it may help for certain cases.
Any use?
- Ben
Posts: 3
Threads: 1
Joined: Oct 2011
Reputation:
0
Oh cool, I didn't realize you could reference another form field for a dropdown. My only issue here - you've already pointed this out - is that I can't pick two fields. One for the value, and the other for the display text. For example - "C" as the value and "Commercial" as the display text for the dropdown. I'm currently using VFront (another php/mysql form/database webapp) but it has its' own issues - it doesn't appear to be actively developed and much of the code is in Italian which is frustrating. But I like some of the form building features - such as integrated validation and key-value pairs for dropdowns. When I found Form Tools - I was pretty excited to find an alternative that's being updated regularly. Perhaps using the option lists won't be a huge deal. I'll have to take a closer look at the validation options though. It's kinda strange the way FormTools allows you to add a record before you update it - leaving all the form fields blank.