Toggle menu

Advanced Use - Customising the Report Form

Report It is designed so that all of your reports can use the same form and they all benefit when new features are added. It is also possible to copy and customise the form.

Using your own versions of the Report It form should be done with care. You will be responsible for maintaining your copies, which you may need to modify as we release new versions of the core product.

Copy The Form

Copy the "Report It - Citizen (Blueprint)" form. Give it a new name and description:

A Report It form with a new name and description
 

Move your form out of the GOSS form group.

Using Your Copy

Use your new form in exactly the same way as you would use the standard blueprint. Create an article using the "Forms Service - Configuration Manager" template. Pick your report configuration in the article extras. Relate your new form to the article.

At this point your form, and your report, should work in exactly the same way as a report using the standard form.

Recording and Displaying Additional Information

The most common reason to create custom forms is to record additional information about the thing that's being reported. This extra data can be displayed on the map pin pop-ups.

1. Adding Fields to your Form

We recommend using drop-down (or other fixed-text) fields on your form rather than free text. This gives you some control over what will be shown on your maps.

You can add new fields to an existing page, or add a new page to your form. This example adds some more options to the "Type" page:

Adding new fields to your form
 

2. Add New Mappings

The values of your new fields need to be mapped to the labels and values that will appear on the pop-up.

On the CHECK page find the additionalDisplayData variable: 

The additionalDisplayData variable field
 

Open the Default Function and create a map similar to:

A map of additionalDisplayData
 

The "key" will be used as the label on the pop-up.

The mappings are added to the "labelc" reporting data set against the event property "riAdditionalDisplayData". The data is stringified and then base64 encoded. If you need to modify the data at a later date you can retrieve, modify and write a new event to the same history - the latest value will be used.

3. Map Pop-Up

Now, when viewing existing reports, the new fields are visible in the pop-ups:

The map pop-up showing additional data
 

Last modified on December 13, 2021

Share this page

Facebook icon Twitter icon email icon

Print

print icon