How to use the meta.formId function in meta

To help you get started, weā€™ve selected a few meta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github posm / OpenMapKitServer / jekyll / js / submissions / index.js View on Github external
function createHyperLinkIfNeeded(field, object) {
    if (typeof field === 'string') {
        // a hyperlink
        if (field.indexOf('http') === 0) {
            return '<a href="' + field + '">' + field + '</a>';
        }
        if (typeof object === 'object') {
            // a file with an extension, discern a link
            var metaInstanceId = object['meta.instanceId'];
            var formId = object['meta.formId'];
            if (typeof metaInstanceId === 'string'
                &amp;&amp; typeof formId === 'string'
                &amp;&amp; field[field.length - 4] === '.') {
                var uuid = metaInstanceId.replace('uuid:', '');
                var href = OMK.omkServerUrl() + '/omk/data/submissions/' + formId + '/' + uuid + '/' + field;
                return '<a href="' + href + '">' + field + '</a>';
            }
        }
    }
    return field;
}

meta

tool for turning many repos into a meta repo. why choose many repos or a monolithic repo, when you can have both with a meta repo?

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis