Creating events with required fields
Permalink
Hi all,
Our client have asked us to add some required fields when creating new events. All the fields exist but they need some sort of basic validation that will prevent the user from creating the event.
I've looked through the concrete folder for the controller and I can't seem to find it. Where would the controller be and if there's a better way to add required fields, please let me know.
Thanks
Our client have asked us to add some required fields when creating new events. All the fields exist but they need some sort of basic validation that will prevent the user from creating the event.
I've looked through the concrete folder for the controller and I can't seem to find it. Where would the controller be and if there's a better way to add required fields, please let me know.
Thanks
The function called is addEvent() but the function really doing the heavy lifting is addCalendarEventVersionFromRequest()
Right now the only way you'd have to do what you want would be to override that function and at the end, where it saves attribute values, hard code the handles for the attributes you want to check and validate them yourself.
It makes no sense that they didn't plan for a "required" option for attributes the same way they did for users attributes IMHO. Maybe you could raise the issue in Github.