Sunday, October 16, 2011

How to trigger "onchange" event for the fields in locked section

There is  "Scheduling Information" section on  Appointment and Service Activity entity forms.
You can not  change the properties of the fields in this section. You cannot add javascript to "OnChange" events of these fields. If you double click on any of the field in this section, you will get a message "You can not modify the properties of this element because it is with in a locked section"
















So how can you add javascript to onchange event on these fields? It is simple and here is what I did to achieve this.
  • Add a new tab to the form.
  • In the visibility section of tab unctick the "Visible by default" checkbox .


























  • In the field explore window untick "Only shows unused fields". It will display all the available entity  fields in the list.
  • Add the fields to this newly created tab. ( Fields that are also present on the locked section)
  • Add the "On Change" event to one of the field.
  • Save the changes and publish the entity.
  • Now if you change the value of field in the locked section, it will trigger the event you defined in the newly created tab's field.

No comments:

Post a Comment