RE: How to limit adding to attachments to 5 for notes .
Hello,
unfortunately you can do it from front end only with an unsupported way and it's need big effort:
First, you create new field (attachementsCounter) to count attachement regarding your record. Then a plugin wish will increment this field by 1 when an attachement is created.
Well, after that you need a JavaScript function. It execute onChange of the new field (attachementCounter). This function will hide the button (unsupported) you need to manupilate the DOM !!
Personnally, i will handle this scenario only in the back-end. I will use the field attachementsCounter. If i reach the limit i will throw an exception...
Mehdi,
Please tick as verified if the answer is useful.