• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Linking two tables based on a field value

Linking two tables based on a field value 7 years 8 months ago #37228

FORM1 with three fileds:
Name_Coordinator: a Textbox filed type, that holds the Name of the Coordinator
Email_Coordinator: a Textbox filed type, that holds the E-mail of the Coordinator
Countries: a Checkbox Group field, that has all the countries in the world as options to be selected. The selected options are the countries (more than one) the coordinator is responsible for.

FORM2 with many fields. The ones I am interested in are:
Country: a Dropdown field where the user selects the country where he lives.
Coordinator: a Textbox field that shall receive FORM1.Name_Coordinator
Cemail: a Textbox field that shall receive FORM1.Email_Coordinator

I need to implement this:
The database of FORM1 is ready, with the information of all the coordinators and the countries each one is responsible for.
When the user submits FORM2, I must check {Country:value in FORM2} and search into FORM1 who is the coordinator responsible for this country. Loop through all records looking into the Countries (a Checkbox Group) checked values to find a match.

When a match is found, I must pass these fields from the found register in FORM1 to the just submitted record of FORM2 :
FORM2.Coordinator = FORM1.Name_Coordinator
FORM2.Cemail = FORM1.Email_Coordinator

Then, while in FORM2 realm, I shall send an $adminEmail to this FORM2.Cemail notifying about a new user (passing all the data submitted).
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!