12 Posts
Albat
9 years ago
6
Topic

Hi Everyone. I am desperate for help. I have the following problem.

I have 3 fields, all in the same table;

User ID

User Mobile

User eMail 

The select Dynamic Cascade works perfectly when you select the user ID and it fills the User Mobile and User email fields. Great.

Here is my problem. I now need the Use ID to be filled with the live value of the logged in user. I do this under "Number 2 - Live + Live values"

When the form is loaded in the front end the User ID field is filled in correctly but the other two fields remain blank. Only when I select a user ID does it trigger.

How do I get the User Mobile and User eMAil fields to trigger when the form loads based on the live value in the User ID field?


Any help will be appreciated. Thank you.

 

Get a Book for SEBLOD
9 years ago
1
Level 1

Hello Albat,

I don't really understand your need.

In which content type do you use the select cascade ?

is that the user may have several mobile and/or several emails?


Best regards.

Lionel

12 Posts
Albat
9 years ago
0
Level 2

Hi Lionel

Thank you for the reply. Much appreciate.

I have changed the normal Joomla user table to include one email and one mobile for each user. This is included when the user is created. I have created a new form and when I load that form (through a menu)  the first field get's the live value from the user id.

If I can try to explain better, this is what I need.

I need to be able to create a form that I can load from a menu item. On this form the currently logged in users name, email and mobile number must be displayed when the form loads. All three fields are part of my standard joomla registration form.

I hope this makes better sense.

9 years ago
1
Level 1

Hello Albat,

thank for your complement.

So it's what I was thinking, you don't need to use the select cascade plugin.

To fill automatically the name, email and the phone of the user connected, you must use the plugin live Joomla! User with the property your need.

In your example :

  • Name :  Live User with parameters "name"
  • Mail : Live User with parameters "email"
  • Phone : Live User with parameters "phone"

property name depend on the column name in database that you have set for each field, in the registration form.


Best regards.

Lionel

12 Posts
Albat
9 years ago
0
Level 2

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

71 Posts
Dgikar
8 years ago
1
Level 1

Hi All! I'm sorry for my English

According to this lesson, in Select Dynamic Cascade (Country), I select in Live: User, and to Configure, insert specified column from the database: country

The Select Dynamic Cascadeis "registered" in the content type User -> Profile. Created with an open padlock. The name of the Select Dynamic Cascade (Name): my_country, This Select Dynamic Cascade is used in a different content type than the content type User...

I thought did all right...?! Why is not displayed the country?


Thank you in advance for your answers

8 years ago
0
Level 2

Hi Dgikar,

What's the configuration of the select dynamic cascade field ? Can you share with us a screen shot.

If used this field in several content types then you should to be sure that these content types are used the same object : article, user, category.

Can you explain us more the functionning of the workflow you described.

Get a Book for SEBLOD