'Report a problem' Form
Jadu Central forms are used to capture any information about the issue and optionally the reporter, that you may need in order to raise an Enquiry in Confirm. This may include asking for details to categorise and/or determine the severity of the issue, requesting photographs, etc.
Capturing location and asset data from Confirm
Prefills should be used to capture details that are passed into the form via the url, linked to from the map widget. These details would likely include:
- easting
- northing
- site code
- asset ID you may also want to consider capturing details of who is responsible for maintenance, so that you can prevent the user submitting the form if this lies with another party.
You will need to determine the name of each URL parameter in order to configure the prefills, the easiest way to do this is to configure the "Form link URL" in the Confirm map widget settings, view the widget on the site as a user and look at the resulting url. This may look something like:
from this we can tell that the names of the url parameters are as follows:
| Detail | URL parameter name |
|---|---|
| Easting | easting |
| Northing | northing |
| Site code | features_sitecode |
The URL parameter names will depend on which tables/fields have been used in the Data Source that has been defined for the map layer which the user is reporting against.
Non-map reporting route
As a general rule, it’s not possible to make an online map fully accessible, therefore it is advised that the user is offered an alternative way of reporting their issue if they are unable to use the map
For UK customers, the way that this is typically done is by providing a direct link to a form containing an integrated street lookup component as the USRN of a street is equivalent to the Confirm Site code.
Form Logics
To support an accessible reporting route, you may wish to present data usually shown on the map, within the form in a textual format, such as showing existing Enquiries or upcoming inspections/jobs around the reporting area. You may also want to look up individual values from Confirm to display, prefill fields, influence form branching and/or include in information included within a new report.
There are two Confirm integrated Predefined Form Logics included in Community Central which make this possible.
Both Logics use Data Sources to define the data to be fetched from Confirm. Data Sources used by maps (i.e. those that return spatial fields - geometry or easting & northing) have the following placeholders automatically added in order to filter the data returned by location (coordinates):
- %xmin%
- %xmax%
- %ymin%
- %ymax%
When used in the map, these represent the boundary of the current map view.
For use within logics, further placeholders can be manually added to filters where there is a need to make the value to filter by, dynamic (i.e. provided as part of the form submission). Placeholders are a sequence of characters wrapped in percent % signs, the characters between the signs become the name of the logic input.
For example, this GraphQL query lists all open Pothole Enquiries for a Site with code 1234:
{ centralEnquiries(filter: {subjectCode: {equals: "POTH"}, outstanding: {equals: "Y"}, siteCode: {equals: "47712317"}}) { Reference: enquiryReference enquiryNumber Description: description enquiryStatus { Status: name } Logged_date: loggedDate Status_notes: notes actionOfficer { Officer: name } centralSite { Site: name } } }
We can adjust this to make the Site code dynamic, by replacing 1234 with a placeholder, e.g. %sitecode%:
{ centralEnquiries(filter: {subjectCode: {equals: "POTH"}, outstanding: {equals: "Y"}, siteCode: {equals: "%sitecode%"}}) { Reference: enquiryReference enquiryNumber Description: description enquiryStatus { Status: name } Logged_date: loggedDate Status_notes: notes actionOfficer { Officer: name } centralSite { Site: name } } }
Multiple placeholders can be added, as needed. As the API does not support pagination, you should consider the amount of data that could be returned when defining the GraphQL query both from a performance and a user experience point of view.
Confirm - Display results from Data Source as a table

This logic returns the HTML to render a table of the results of the GraphQL query, displaying the selected columns. It is intended to be used to output onto a page.
Confirm - Fetch single result from Data Source

This logic returns the value selected in Value to return for the first result returned by the GraphQL query. Alternatively you can configure the logic to return the number of results.