I have created a file type custom field and discovered that you can upload any type of file on the field so I want to restrict the custom field to only upload image files. Is it possible?

1 Answer 1


You can use validateForm in an extension to restrict it.

You can also vote for this ticket: https://lab.civicrm.org/dev/core/-/issues/2410

  • Although it didn't directly fix my problem but this helped me get the idea how to fix it.. thanks Commented Mar 9, 2021 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.