'The mobile form configuration (lazy property)
@returns: a dict {tablename, title, options}'

@property
def config(self):

    config = self._config
    if (config is DEFAULT):
        tablename = self.resource.tablename
        config = {'tablename': tablename, 'title': None, 'options': {}}
        forms = current.deployment_settings.get_mobile_forms()
        if forms:
            for form in forms:
                options = None
                if isinstance(form, (tuple, list)):
                    if (len(form) == 2):
                        (title, tablename_) = form
                        if isinstance(tablename_, dict):
                            (tablename_, options) = (title, tablename_)
                            title = None
                    elif (len(form) == 3):
                        (title, tablename_, options) = form
                    else:
                        continue
                else:
                    (title, tablename_) = (None, form)
                if (tablename_ == tablename):
                    config['title'] = title
                    if options:
                        config['options'] = options
                    break
        self._config = config
    return config
