This topic is locked
[SOLVED]

 Autofill a different filed from a dropdown box

7/10/2018 2:47:07 PM
PHPRunner General questions
gehrenfeld author

I have a database with a table named recipes with fields mealtype and mealtype_id and I have another table called mealtype with fields id and type
I want to autofill recipes.mealtype_id from mealtype.id when the users selects from the dropdown using mealetype table as the resource.
I have recipes.mealtype as a dropdown menu and recipes.mealtype_id the next filed under recipes.mealtype
But when a user selects a meal type from the dropdown menu the recipes.mealtype_id does not get update with the mealtype.id
I have tried many things with both autofill on each recipes.mealtype_id and mealtype.id with no luck.
Thanks for any help you can give me.
Gary

admin 7/10/2018

Lookup wizard Autofill should do the job:

https://xlinesoft.com/phprunner/docs/lookup_wizard.htm
"Field events" can be used to achieve the same goal but some coding will be required. Here is the link just in case:

https://xlinesoft.com/phprunner/docs/field_events.htm

gehrenfeld author 7/10/2018



Lookup wizard Autofill should do the job:

https://xlinesoft.com/phprunner/docs/lookup_wizard.htm
"Field events" can be used to achieve the same goal but some coding will be required. Here is the link just in case:

https://xlinesoft.com/phprunner/docs/field_events.htm


I found the problem, you have to have the field your autofilling on the screen. Do not like that.
Not sure how to set it up in the event after record updated.
Update recipes.mealtype_id with mealtype.id Can someone give me an example of how to do that?
Thank you