database join filter after ajax validation of first form field

louisaas

New Member
Hi,
Im making a booking system.

I have 2 lists:
1- Hotels
2- Reservations

In Hotels we can have many hotels. Fields of form ( Hotel name, e-mail, city )

In reservations an user choose a hotel . Fields of form ( Hotel, city, room type, Number of peoples)

In Reservations form, In field "Hotel" i use a database join element of "Hotel db" and in field "city" too.

But want when the user choose the Hotel (ajax verification), the city of the hotel auto fill in "city" field of reservation form (automatic fill after ajax verificatio of "Hotel" field).

How can i do that?
What code i need use in database join filter? (I don't know PHP very much)

Thanks you !
 
You can use a calc field for the reservation city, and use a php script which looks up the city from the Hotels record using the id of the Hotel dropdown. Setting Ajax to Yes on the calc field, Fabrik will recognise that you used the placeholder for the Hotel dropdown and whenever a different Hotel is selected, it will recalculate the city field and look up the city again. :)
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top