Hi folks,
I don't get any further...
I have three forms.
The first writes values through a few different fields to a database table. It works fine
the second and third are connected via multi-page.
the second consists of a dropdown, which gets its values via dynamical data from the stored values of the database table, it is meant to let an user choose which database entry to load into form 3. This also works perfectly fine, I can load all database entries into the dropdown.
form 3 consists of exact the same fields as form 1, but they are disabled, so you can only see the values, but not change them manually.
here is my problem, because I cant get the chosen dropdown value of form 2 work as a condition for my DB Read in form 3, the form fields are always filled with the values of the first database entry.
my custom code in the DBRead action looks like this
I'm grateful for every useful hint
I don't get any further...
I have three forms.
The first writes values through a few different fields to a database table. It works fine
the second and third are connected via multi-page.
the second consists of a dropdown, which gets its values via dynamical data from the stored values of the database table, it is meant to let an user choose which database entry to load into form 3. This also works perfectly fine, I can load all database entries into the dropdown.
form 3 consists of exact the same fields as form 1, but they are disabled, so you can only see the values, but not change them manually.
here is my problem, because I cant get the chosen dropdown value of form 2 work as a condition for my DB Read in form 3, the form fields are always filled with the values of the first database entry.
my custom code in the DBRead action looks like this
$user = JFactory::getUser();
$con=mysqli_connect("localhost", "root", "", "usr_web225_4");
// Check connection
if (mysqli_connect_errno())
{
echo "Error!: " . mysqli_connect_error();
}
$FormData = mysqli_query($con,"SELECT * FROM "joom_chronoengine_chronoforms_datatable_bedarfsanalyse"
WHERE text7=".$form->data['Data0']['dropdown1']." ORDER BY id DESC LIMIT 1");
$line = mysqli_fetch_array($FormData);
I'm grateful for every useful hint
Hi gate,
v5 Conditions format should be like this:
I hope this helps.
regards,
Max
v5 Conditions format should be like this:
<?php
return array("table_field_name" => $form->data("form_field_name"));
I hope this helps.
regards,
Max
This topic is locked and no more replies can be posted.