Display fields rules

Ask your questions here.
Post Reply
pepe
Sponsor
Sponsor
Posts: 556
Joined: 25 Aug 2015, 21:35
Name: Pepe
Location: Graz, Austria
Contact:

Display fields rules

Post by pepe »

I am using the display fields rules feature to hide/show various fields in a form for tasks.
I have several user fields like owner (created_by) of the record, responsible to finish the task (leadership), participants, etc.
There are various roles to derive from the users, some of them are:
- admin
- responsible
- participant
- copy_to
Depending on the role, a user must have edit access to fields. Therefore, the approach of using display fields rules. When the form is being loaded, jquery function determine the user role and sets the corresponding value in a dummy dropdown field.
When I pick a particular value in the form using mouse or keyboard, then the defined display fields rules are applies accordingly.
However, when I use jquery function to set a value programmatically, then display fields rules are not applied to the form.
Does someone know a solution to that problem?
Thank you, regards, Pepe
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Display fields rules

Post by support »

once you change value you have to trigger change event, for example:

Code: Select all

$("#fields_13").val("11").trigger("change")
Post Reply