'Helper function to process the form
@param r: the S3Request
@param form: the FORM
@param event_type: the event_type (Row)'

def accept(self, r, form, event_type=None):

    T = current.T
    response = current.response
    formvars = form.vars
    person_id = formvars.person_id
    success = False
    if (not formvars.get('permitted')):
        response.error = T('Event    registration    not    permitted')
    elif person_id:
        event_type_id = (event_type.id if event_type else None)
        success = self.register_event(person_id, event_type_id)
        if success:
            success = True
            response.confirmation = T('Event    registered')
        else:
            response.error = T('Could    not    register    event')
    else:
        response.error = T('Person    not    found')
    return success
