I hope someone is willing to help me.
I have build a simple form with two fields. Year and Event ('Jaar' and 'Evenement' in Dutch).
When the Year is selected, a dynamic dropdown populates the Event field. This wors fine.
You can find it here http://bvdp.krah.nl/index.php?option=com_chronoforms5&chronoform=Achmea
After submit I want to display the results from a table that I build in the Joomla db,
I tried Db Read Action (in the 'on submit' event, but I lack the knowledge on how to set that up properly.
I also tried in stead of the DB read a custom code action that displays the result from the table based on the selections made in the form, but the query is not picking up my {year} and {event} in the query:
I use this:
This gives the desired result:
But the one with the variables does not seem to pick it up..
I am not a hero in PHP and searched the forum for hours for a solution but cannot find it.
I am sure it should be relatively easy, but I am running into a brick wall here.
Any suggestions/help are welcome.
I have build a simple form with two fields. Year and Event ('Jaar' and 'Evenement' in Dutch).
When the Year is selected, a dynamic dropdown populates the Event field. This wors fine.
You can find it here http://bvdp.krah.nl/index.php?option=com_chronoforms5&chronoform=Achmea
After submit I want to display the results from a table that I build in the Joomla db,
I tried Db Read Action (in the 'on submit' event, but I lack the knowledge on how to set that up properly.
I also tried in stead of the DB read a custom code action that displays the result from the table based on the selections made in the form, but the query is not picking up my {year} and {event} in the query:
I use this:
$result = mysqli_query($con,"SELECT * FROM bap_zk_achmea_uitslagen WHERE Jaar='{Jaar}' AND Evenement='{Evenement}' ");
This gives the desired result:
$result = mysqli_query($con,"SELECT * FROM bap_zk_achmea_uitslagen WHERE Jaar='2013' AND Evenement='10 KM' ");
But the one with the variables does not seem to pick it up..
I am not a hero in PHP and searched the forum for hours for a solution but cannot find it.
I am sure it should be relatively easy, but I am running into a brick wall here.
Any suggestions/help are welcome.