chornoform and dropdown list data for table saved ?

Populate a dropdown list with data from a database table in ChronoForms.

Overview

The dropdown was not displaying because the data path was incorrectly configured and the key/value fields were not set.
Leave the model ID empty to use the default, correct the data path to point to the form data array, and ensure both the text and value key fields are properly defined in the dropdown settings.

Answered
an angykristal 19 Aug, 2014
:) Hello everyone
I have a problem with chronoform when I go to insert the dropdown field like this:
I set the fields in the dropdown so you can read the data in the table saved from a previous form that text1 and file2 as records and I have worked in this way:

in the setup form:
onload:
dbread: edit:
enabled = yes
table-name = mytable created by the previous form
Multiread = yes
enable model = yes
model id = lnt
fields = text1 // -> only field that should be listed


in the form designer:
insertion dropdown and edit:
dynamic data:
enabled = yes
data path = $ form-> data lnt ---- or $ form-> data ['lnt'] in both cases does not show anything.

I save all settings and start the test but does not appear in the dropdown list of the data record

I forgot something?
if I have to use the custom where I work?

sorry for my english (I use a translator)
thanks in advance and good work

angy๐Ÿ™‚
an angykristal 19 Aug, 2014
Answer
:D ๐Ÿ˜ฒ
I have always solved thanks to the research into web
in the following setting:

quote

in the setup form:
onload:
dbread: edit:
enabled = yes
table-name = mytable created by the previous form
Multiread = yes
enable model = yes
model id = lnt
fields = text1 // -> only field that should be listed


in the form designer:
insertion dropdown and edit:
dynamic data:
enabled = yes
data path = $ form-> data lnt ---- or $ form-> data ['lnt'] in both cases does not show anything.


I changed model id = lnt leaving it empty so that 'sets the default value of "Data"

then I changed data path = $ form-> lnt date with the value date

and at the end I added the two missing values โ€‹โ€‹and text key value key

I apologize if I repeat what I already 'had to be the solution for both cf but having only installed version v5 escaped me some details of the v4, I hope that was helpful too๐Ÿ˜ถ


hello from angy; D๐Ÿ˜€ ๐Ÿ™„
This topic is locked and no more replies can be posted.