I use a db read on load to fill a dropdown if a from field has a zip code
I added a dropdown to the form with dynamic data enabled.
Is it possible to use multiple db fields as text key in that dropdown?
For example i populate from db via a db read id, zipcode and city.
I need in the dropdown <option value="id">zipcode - city</option>.
I also use an ajax event (Designer tab) (another db read + custom code) to fill the dropdown while typing.
The ajax event works great and i can manage the options via
$options[$d['id']] = $d['zipcode']." - ".$d['city'];
Can that be done also for the onload db read?
Using V5 by the way
You should be ale to use Custom code either to add a custom query that concatenates the column values' or after the DB read to do the same after the data is read.
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
Thanks for the info. I have the same question.
How do you obtain the values, to concatenate them?
I mean :
When you load the DB via DB read and the ModelID is "user" -> which contains 'name' and 'firstname'.
How do I approach those values then?
Something like user[name] ?
Please see this FAQ. To see exactly wht data you have after the DB Read you can add a Debugger action temporarily.
2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com