'Get the mobile form for the target resource
@param r: the S3Request instance
@param attr: controller attributes
@returns: a JSON string'

def mform(self, r, **attr):

    resource = self.resource
    msince = r.get_vars.get('msince')
    if msince:
        msince = s3_parse_datetime(msince)
    mform = S3MobileForm(resource).serialize(msince=msince)
    mform['controller'] = r.controller
    mform['function'] = r.function
    output = json.dumps(mform, separators=SEPARATORS)
    current.response.headers = {'Content-Type': 'application/json'}
    return output
