I have 3 database tables:
Postalnr (unique postal numbers and name)
Monter (the monters data like name, email, address, monterid is unique)
Monter-postalnr (id, monterid, postalnr) (one-two-many relations with the Monter table. There will be a record for each postal number this Monter is serving)
And i am trying to implement the following function in my form, but all i do is seem to make a mess :
User should manually fill in the field Postalnr (cant use dropdown cause its 5000 records)
Based on the input from user i want a dropdown to be filled with data. As i see it it has to come from a join between the Monter table and the Monter-postalnr table. The dropdown should display Monters names from the Monter table, but ONLY if the Postalnr is found in the Monter-postalnr table.
Hope this was understandable. Any tip how to do this are very appreciated. Step-by-step is very fine
Postalnr (unique postal numbers and name)
Monter (the monters data like name, email, address, monterid is unique)
Monter-postalnr (id, monterid, postalnr) (one-two-many relations with the Monter table. There will be a record for each postal number this Monter is serving)
And i am trying to implement the following function in my form, but all i do is seem to make a mess :
User should manually fill in the field Postalnr (cant use dropdown cause its 5000 records)
Based on the input from user i want a dropdown to be filled with data. As i see it it has to come from a join between the Monter table and the Monter-postalnr table. The dropdown should display Monters names from the Monter table, but ONLY if the Postalnr is found in the Monter-postalnr table.
Hope this was understandable. Any tip how to do this are very appreciated. Step-by-step is very fine