GeoHazardWatch

Page Actions


Using FormPlugin

The FormPlugin embeds a submission form into any page using a form definition stored on the server.

Description

Use this plugin to place a data-entry form on a page. The form is defined as a JSON file on the server by an administrator — the plugin renders it as a Bootstrap form with client-side validation and submits responses without a page reload. Submissions are stored on the server and viewable in the admin panel.

For the full JSON schema used to define a form — field types, prefill, section grouping, and proxy submission — see Form Definition Reference.

Note: This plugin requires the forms add-on to be enabled by your administrator before it will work. The named form definition must also exist before the page is visited.

Syntax

[{Form id='your-form-id'}]

Parameters

ParameterTypeDefaultDescription
idstring(required)The form identifier. Must match the filename of a form definition in the forms data directory (without the .json extension).

Examples

Embed a contact or reservation form on any page:

[{Form id='contact-us'}]
[{Form id='clubhouse-reservation'}]

Two forms on the same page:

[{Form id='maintenance-request'}]

[{Form id='event-proposal'}]

Note: The form only renders if the definition file exists on this site. The id must match a file under the forms data directory.

Notes

  • If the form definition is not found, the plugin renders a warning box instead of crashing the page.
  • Prefill: if the form definition specifies "prefill" on a field, logged-in users see that field pre-populated with data from their profile (name, email, phone, unit address). The value is editable. Anonymous users see the field empty.
  • Section grouping: fields of type "section" in the definition create labelled <fieldset> groups. They contribute no data to the submission.
  • Proxy submission: if the form definition has "proxySubmission": true, an extra fieldset (For Another Occupant) appears so staff can submit on behalf of a resident.
  • Time validation: if the form has both startTime and endTime fields, the server rejects submissions where the end time is not later than the start time.
  • Duplicate time slots: if the form is connected to a calendar handler (e.g. clubhouse reservation), submitting a time slot that is already reserved returns an inline error — no page reload required.
  • Each form on a page submits independently. Multiple [{Form}] directives with different id values can appear on the same page.
  • Submitted forms show a success message and reset the fields. The page does not reload.

No footnotes on this page.

No comments yet.