Skip to content

Organisation Form

We built the contact form in an earlier guide document. Given that the details are much the same for an organisation, Let's change the contact form to an 'organisation' form.

Components Used in this template:

The organisation template is built first because of the relationship required between the contact and the organisation. When the organisation template is built, we can generate a document, so that when we build the contact template, we can then build and test the 'related' query on that template easily.

A quick tip - Check Organising Your App Development for a guide on how to keep track of the documents you create

{
    "systemHeader": {
        "systemType": "template",
        "templateId": "74746c80-8378-11e6-99b1-71ee944cf59f",
        "summaryName": "Organisation Template"
    },
    "summaryNameRule": "Organisation: {{{orgName}}}",
    "formColor": "#f3f3f3",
    "appTags": [
        "myApplication",
        "organisation"
    ],
    "components": [
        {
            "componentName": "sc-static-html",
            "label": "Organisation Details",
            "name": "panel1",
            "fullWidth": true,
            "wrapClass": "panel-primary",
            "wrapAction": "open",
            "wrapHtmlType": "wrap"
        },
        {
            "componentName": "sc-text-box",
            "name": "orgName",
            "label": "Organisation Name",
            "mandatory": true,
            "fullWidth": true
        },
        {
            "componentName": "sc-phone-number",
            "name": "phone",
            "label": "Phone Number"
        },
        {
            "componentName": "sc-email",
            "name": "email",
            "label": "Email Address"
        },
        {
            "componentName": "sc-street-address",
            "name": "addressGeo",
            "maxZoom": 15,
            "enabled": true,
            "language": "en",
            "positionMandatory": true,
            "geocodeSearchService": [
                {
                    "apiKey": "a2338e05-e3cb425e93ad-109049bfb516",
                    "autocompleteUrl": "https://www.geocode.farm/v3/json/forward/?addr=",
                    "geocodeUrl": "https://www.geocode.farm/v3/json/reverse/",
                    "name": "geocodefarm",
                    "geocoderDefaultCountryOff": "Australia"
                }
            ],
            "mapParameters": {
                "zoom": 8,
                "defaultLat": -38.1499181,
                "defaultLon": 144.3617186,
                "minResolution": 0.0116670900008467,
                "maxResolution": 2116.670900008467
            },
            "country": "au",
            "heightNum": 2,
            "fullWidth": true,
            "label": "Address"
        },
        {
            "componentName": "sc-static-html",
            "name": "panel1",
            "wrapAction": "close",
            "wrapHtmlType": "wrap"
        },
        {
            "componentName": "sc-static-value",
            "name": "appTags",
            "value": [
                "myApplication",
                "organisation"
            ],
            "visible": false
        }
    ]
}