Hello.
i have applied this example from SC channel in order to change the value of a field when another is selected.
https://www.youtube.com/watch?v=aDeUvgqksh0
in my case the master table is drug_category while the child table is drug.
of course they are in to separate tables and there is a foreign key in the drug table referring drug_category table.
the ajax processing works and in the application the user correctly sees the name of the drugs or the category whan one or the other is selected, the problem is that in the DB for the dug_category is written the id of the drug_category. i want that in the db is written the actual name of the drug_category, not its id.
in my form in the field category i have:
SELECT iddrug_category , drug_category
FROM drug_category
ORDER BY drug_category
in this field i have enabled ajax processing
in the other (drug) i have:
SELECT drug, drug
FROM drug
WHERE iddrug_category = ‘{category}’
ORDER BY farmaco
is that possible?
Thank you