-2

In new ticket form, I have 2 picklists:

  1. Category has 2 items: C1 and C2
  2. Assigned To has 2 items: A1 and A2.

When user chooses C1 from picklist "Category", item A1 is selected automatically from picklist "Assigned To". When user chooses C2, "Assigned To" is changed to A2 automatically.

As I know, Vtiger 6.x picklist is not using Select2 jquery since the picklist still work when I removed Select2 .js files.

linuxartisan
  • 2,206
  • 3
  • 18
  • 39

2 Answers2

0

There will be two options for you:

  1. Write the workflow for ticket where you can add condition if category is C1 then assigned to field will be A1

    In this case you will not see the assigned to field updated in edit view but once you saved you can see the assign to field as A1

  2. You can do this pragmatically using javascript:

    onchange event on catgory dropdown:- change value of assign to field.

Community
  • 1
  • 1
Sachin I
  • 1,391
  • 2
  • 9
  • 27
0

You can use on change event of Category Field and add below code to set value of Assigned to Field using jQuery. This will definitely help you. You have to provide your field name value in this, value which you wanted to set, and extra things which you wanted to set.

container.find('[name="'+key+'"]').next().children('a').children('span').text('User1');
container.find('[name="'+key+'"]').val('User1');
container.find('[name="'+key+'"]').trigger('change');
Milan Malani
  • 1,679
  • 1
  • 19
  • 33