'Get the mobile form for a resource
@param resource: the S3Resource
@returns: an S3SQLForm instance'

@staticmethod
def mobile_form(resource):

    form = resource.get_config('mobile_form')
    if (form is None):
        form = resource.get_config('crud_form')
    if (not form):
        readable_fields = resource.readable_fields()
        fields = [field.name for field in readable_fields if (field.type != 'id')]
        form = S3SQLCustomForm(*fields)
    return form
