OnChange Required = False

This question is not answered

Heya guys,

Is it possible at all to be able to make something not required in onchange script?

I would like to be able to change the Required status of a field based on whether the user selects Customer or Supplier (with Supplier, I do not require a box to be required).

Thank you!


All Replies
  • Robin

    The mandatory nature of a field is checked server side when the data is submitted.  The client side API can highlight mandatory fields and you can combine it with JQuery or plain old JavaScript to control the behaviour of a field - perhaps hiding it or showing it depending on the value chosen in the first field.

    But have a look at what you can do with validation rules.  The rule on the case_slaseverity field within the case_detailbox will make the field mandatory if a value has been entered into the case_slaid field.

  • Hi Robin. As Jeff says if you set it mandatory within the fields config it’s quite hard to control.  However, if you set it via a validate script where you check for another fields entry before you save the record it can be dynamic.

    Sage CRM specialist and all round fan! Please feel free to follow me on twitter @dannycrm