jgulledge19 / Church-Events-Calendar

⛔️ Abandoned ⛔️ A calendar for MODX Revolution
http://rtfm.modx.com/display/ADDON/Church+Events+Calendar
4 stars 0 forks source link

How can I modify the FormIt calls? #1

Closed astrodaz closed 12 years ago

astrodaz commented 12 years ago

Hi,

I want to be able to modify the validation on the Event Admin form. For example, I don't want the Contact details to be mandatory.

Where can I go to change the logic for the validation?

Thanks

jgulledge19 commented 12 years ago

You can do this here is how. On the [[!ChurchEventsCalendar]] snippet call add in the validate call with something like this:

[[!ChurchEventsCalendar?
  &validate=`public_start:required:isDate=^%m/%d/%Y^,
    repeat_type:required,
    calendar_id:required:isNumber,
    category_id:required:isNumber,status:required,
    event_type:required,title:required,
    public_desc:required:allowTags,
    notes:allowTags,
    contact:required,
    contact_email:email:required`
]]

You can see the default in /core/churchevents/model/churchevents/calendar/calendar.class.php on lines 256-307

'validate' => 'public_start:required:isDate=^'.$this->getFilter('dateFormat').'^,repeat_type:required,
                                       calendar_id:required:isNumber,category_id:required:isNumber,status:required,
                                       event_type:required,title:required,public_desc:required:allowTags,notes:allowTags,
                                       contact:required,contact_email:email:required',
astrodaz commented 12 years ago

Perfect! Many thanks!!!

Is there a document with a list of all the parameters?