Hi Lionel
Thanks again for your response and apologies for my late reply. My requirements have completely changed. I have redesigned my entire form and it works perfectly, to a point and now I am again stuck.
The website is only used for employees of a company that has offices in different cities. I have modified my user registration form to include a dropdown list for each user to select an "office" when they register in Joomla. This value is then stored in the "office" column in the #__users table.
The list of office comes from a separate table in the database called Offices.
Here is what I need to do:
I am using the Dynamic Select on a Form and Content type. I then created the following;
Type: Dynamic select
Group Identifier: SelectOffice
Option name: office
Option value: office
Behavior=Start.
Type: Dynamic select
Group Identifier: SelectOffice
Option name: office_tel
Option value: office_tel
Behavior=In between
Type: Dynamic select
Group Identifier: SelectOffice
Option name: office_email
Option value: office_email
Behavior=End
(all of these fields come from the Office table)
I then now need to start a new Dynamic select.
Type: Dynamic select
Group Identifier: Selectuser
Option name: name
Option value: name
Behavior=Start.
Type: Dynamic select
Group Identifier: Selectuser
Option name: email
Option value: email
Behavior=End
(Both these fields come from the #__users table)
This all works well, however what I need is for the 2nd dynamic select group to only display users that are in the office that are currently selected in the "Office" field in the first dynamic select.
What I have managed to do is to place the following in the Where block of the "name" field
office="any_office_in_the_list"
and this will then only display that particular office. I need to change the "any_office_in_the_list" to the value in the "office" field that is currently selected.
I really hope this makes sense and that you can tell me how to change the WHERE clause to achieve this.
Thanks