automatic display/changed field values when selecting a contact in relate to field

Hi,

What I am trying to achieve is to be able to automatically display some information of the contact within meeting module whenever a contact has been selected from the “relate to” field.

I have been able to pull through the data but just having issue when changing the contact. It should be automatically displayed/changed when selecting a contact.

Can anyone please give me an idea how to achieve this and in what file should I apply the code?

I have attached a screenshot for reference.

You need to override the callbacks for the SQS object, and the open_poup and then set these fields

Hi Simeon,

Can you please give me a sample (I need this just to have an idea pls.) and what are the files I needed to modify for this?

hi, any update please?..

Here is an example of what the onclick of the selector would have for Users. You can see the call_back_function, which is set_return by default. So you could modify the onclick so that the call back function is something you specified. And you can modify the field to name array as well to get the fields you want.

open_popup(
"Users", 
600, 
400, 
"", 
true, 
false, 
{"call_back_function":"set_return","form_name":"EditView","field_to_name_array":{"id":"assigned_user_id","user_name":"assigned_user_name"}}, 
"single", 
true
);

Example sqs object, modify the field list to get the fields and the populate list to populate them.

                    sqs_objects['ConfigureSettings_distribution_user_name']={
                        "form":"ConfigureSettings",
                        "method":"get_user_array",
                        "field_list":["user_name","id"],
                        "populate_list":["distribution_user_name","distribution_user_id"],
                        "required_list":["distribution_user_id"],
                        "conditions":[{"name":"user_name","op":"like_custom","end":"%","value":""}],
                        "limit":"30",
                        "no_match_text":"No Match"};

Hi Simeon,

I will also appreciate if you can specify the folder location of the files as I am lost in the moment. (really sorry to be a pain) :slight_smile:
I am not sure if these files are located in /modules/{module_name}
Thank you in advance.

Hi,

I really appreciate Simeon’s effort to discuss that I should need to override the callbacks for the SQS object, and the open_poup and then set these fields.

However, I am lost. I just can’t figure out in what file (and its location) should I be looking at.

Any idea please?

These are both javascript which will appear on the page.
You need to modify the onclick of the selector to the open_popup code(with what you want in the parameters). You need to modify the current SQS object on the page so that the populate and required list meet what you need.

1 Like

Hi Simeon,

I have something to confirm and hopefully you can help me.

Right now, I managed to override the javascript in the onclick of meeting module by placing this code in the view.edit.php (and it is working):

$jsscript = <<<EOQ

EOQ;

However, I can’t figure out how can I override the onclick of the meeting in the calendar? Do you have any idea please?