Buy Now
Sign in

Dropdown field with chronoform v6 and Wordpress - External database and Table OK but no rows in the field

rotocal , November 25 2019, 16:51
R
rotocal 33
November 25 2019, 16:51 #390128
Hi everyone,
I was able to connect a form to an external database within wordpress. This means on Data model is OK = Data9 . The table is listed on field "Database Table*" it is choosen properly and already saved. Designed field receives then the variable : {var:read_data9} like other forms I have, .... and just one field of the table "dofs"is selected to appear in the dropdown list. However nothing is listed (Read_data is obviously before loading the form).
OkTableExternalDatabase.PNG
Database is in the samer server as the WordPress data, but certenly in other table different to WP tables. That is the reason I needed to connect via external database, because the table to select for the dropdown did not appear in the regular listing for selection.
OkVarData9.PNG
Question 1 : Is there a way to include tables ... different to the ones of Wordpress data (but in the same server) .... without recurring to an external database?
Question 2 : What might be the reason I don't have any item in the dropdown list having connection to the table?
Question 3 : I don't have a problem reading a table via PHP, but it is not clear to me how to pass the array to the dropdown field and see the listing for selection. Please give me a sample please, but complete sample ....since a I am not an expert and this is not precisely in the manual. If possible passing the the array within a custom php section. Not through </> PHP logic since Server answered with a security "Not authorized" page.
php_event.PNG
R
rotocal 33
November 29 2019, 15:57 #390176
Hello I need a solution ... Is Word press working ? I can't use version 6.1.4 doesn't load the page ....
I am stuck with version 6.0.7 and the problems mentioned above.
Sirs I really appreciate your answer
R
rotocal 33
December 27 2019, 13:11 #390501
Is Chronoforms for Worspress still working or it is dead? Please be kind and answer.
If not working please indicate in detail how to pass an array to a form field.
healyhatman 8
December 28 2019, 11:17 #390502
Are you returning an array of key/value pairs?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
R
rotocal 33
January 02 2020, 21:19 #390533
Yes. but actually could be also an indexed array . project[0]= "PRE-01001", project[1}= "PRE-010234", and so on.
If we use key / value perhaps is better PRE-01001 => "Description of project PRE-01001", and so on
My question: Using custom PHP before loading the form ... how can I populate the dropdown field having the array variable with the proper values ?.
Thank you
healyhatman 8
January 02 2020, 21:21 #390534
Just needs to be key => value.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store