Form 11 Shortcodes
Information
When issuing aThe Form 11,11 thereShortcodes arefeature aallows number of shortcodes that can be placed in the templateadministrators to dynamically auto-fill valuesspecific relatingviolation details into system templates. Its primary purpose is to automatically pull nested data directly from a violation record—such as ticket numbers, user profiles, or vehicle details—and populate the issued Form 11 accurately without manual data entry. This article is intended for OPS-COM administrators responsible for configuring system templates and violation notices.
Setup and Configuration
This feature involves adding specific formatting strings directly to your system templates.
Admin Side: Administrators must have the appropriate system role permissions to access and edit system templates.
User Side: This is strictly a backend configuration tool. End-users will simply see the fully rendered Form 11 document with their specific violation details already auto-filled.
Using this Feature
Administrators can use the following syntax rules and data packets to construct dynamic shortcodes for their Form 11 templates.
Understanding the Base Shortcode
The base shortshortcode codefor pulling Form 11 violation data is formatted like:
as follows:
[values show=violation._____]
The blank valuespace must be filled with a valuespecific variable name to pull from the violation info.information packet. The packet itself is always called violation, and this identifier must be placed at the very start of any value call.
Navigating Nested Values
For each nested value inwithin the system's data packet, the parent packet name must be added as part of the variable name,string. eachEach part of the path is separated by a period,period (.), with the specific variable you want to be output by the shortcode as the final part of the variable.
The packet itself is called by 'violation', and the name must be placed at the startend.
Example Shortcodes
The following table provides common examples of anyForm 11 shortcodes. To return a specific value call.in the same section, simply replace the provided variable name with the sibling value you want to output.
| Example Shortcode | Description |
[values show=violation.Ticket] |
Returns the violation ticket number. |
[values show=violation.user_info.username] |
Returns the username of the user the violation belongs to. |
[values show=violation.writer.DisplayName] |
Returns the display name of the admin who assigned the violation to the user. |
[values show=violation.vehicle.Plate] |
Returns the plate of the vehicle the violation was assigned to, if applicable. |
[values show=violation.vehicle.province.ProvName] |
Returns the province or state of the vehicle plate. |
[values show=violation.vehicle.colour.ColourName] |
Returns the registered colour of the vehicle. |
[values show=violation.vehicle.plate_type.TypeName] |
Returns the plate type of the vehicle. |
[values show=violation.vehicle.vehicle_type.TypeName] |
Returns the type of the vehicle. |
[values show=violation.vehicle.make.MakeName] |
Returns the make of the vehicle. |
[values show=violation.location.LocationName] |
Returns the name of the location the infraction happened. |
[values show=violation.details.0.Ticket] |
Returns the violation ticket number (alternate value location). |
[values show=violation.details.0.type.ViolationDescr] |
Returns the violation type description. |
If a shortcode is entered incorrectly, or if the targeted data field is empty (null) for that specific user or vehicle, the system will simply leave that space blank on the generated Form 11.
Violation Packet Reference
The violation info packet is formatted like thisthe example.
Theexample below. The values on the left are the exact variable names,names you must use in your shortcode path, while the values on the right are the example valuesoutputs returned by this packet.
{
"ViolationID": 237,
"SemPermitID": null,
"Ticket": "TT-19026",
"VehicleID": 5,
"Spoiled": 0,
"TicketType": 1,
"Issued": "2024-07-17 16:11:00",
"convNotice": null,
"Due": "2024-07-27 16:11:00",
"ViolationTypeID": -1,
"Fine": "50.0000",
"AdjustedFine": "20.0000",
"Towing": "0.0000",
"taxAmount": "0.0000",
"Writer": 7,
"LocationID": 10,
"Comment": null,
"TicketAppeal": null,
"appealType": 0,
"appealFormat": null,
"AccessAdminID": 50,
"ActionedPer": null,
"Created": "2024-07-17 20:12:08",
"AppealUserID": 0,
"AppealProcessDate": null,
"AppealAdminID": 0,
"AppealComment": null,
"AppealAdminComment": null,
"AutoNotice": 0,
"ProcessedByCollection": null,
"SentToCollections": null,
"PrivateComments": "",
"DriveAway": 0,
"UUID": null,
"VioNotice": null,
"latitude": null,
"longitude": null,
"Warning": null,
"userid": null,
"incidentID": null,
"failToIdentify": null,
"pin": "YL",
"duplicate": null,
"AdjustmentReason": null,
"notices_count": 1,
"user_info": {
"UserID": 5,
"studentNo": null,
"employNo": "00800147",
"username": "mashbury",
"firstName": "Michael",
"preferredname": null,
"lastName": "Ashbury",
"street": "688 Zaproxy Ridge",
"city": "East Romaineburgh",
"prov": 9,
"postal": "K2G5B1",
"email": "mash-bury@tomahawk.ca",
"display_name": "Michael Ashbury",
"account_no": "00800147",
"prov_name": "Ontario",
},
"writer": {
"AdminAccessID": 7,
"Username": "admin",
"DisplayName": "Administrator"
},
"vehicle": {
"VehicleID": 5,
"Active": 1,
"Plate": "MASH",
"Year": 1998,
"TotalVio": 12,
"TotalUnpaid": 2,
"TotalWarning": 0,
"vehicleAlert": true,
"vin": "JNAMA43H9XGE50339",
"electric_vehicle": false,
"province": {
"ProvName": "West Virginia",
"ProvCode": "WV",
},
"make": {
"MakeName": "Toyota"
},
"colour": {
"ColourName": "Black"
},
"plate_type": {
"TypeName": " Passenger"
}
"vehicle_type": {
"TypeName": " Van"
},
},
"location": {
"LocationID": 10,
"LocationName": "Hospital & Administration Building",
},
"details": {
"ViolationsDetailID": 359,
"ViolationID": 237,
"Ticket": "TT-19026",
"ViolationTypeID": 16,
"LocationID": 10,
"offenceFine": 50,
"discountFlag": 1,
"discountAmount": 20,
"discountHours": 240,
"type": {
"ViolationTypeID": 16,
"ViolationDescr": "No Parking Snow Route - Mandatory Towing",
"DefaultCost": 50,
"discountFlag": true,
"discountAmount": 20,
"discountHours": 240,
}
}
}
Examples
Best Practices and Considerations
-
AnMaintainexampleexact syntax: Variable names are case-sensitive and must exactly match the data packet format. For example, usingprovnameinstead ofProvNamewill cause the shortcodeistoprovidedfail.for -
section.Understand
Tonestedreturnlogic:aWhenspecifictargetingvaluenested arrays (like user_info or vehicle), ensure you include all parent variables separated by periods in your shortcode path. You cannot skip levels in thesamehierarchy.section, -
theTest
aprovidedtemplatesvariablethoroughly:nameAlwayswithtestthenewsiblingFormvalue11wantedtemplates by generating a sample notice foroutput. dummy violation.This shortcodes thatExampleverifiesShortcode allDescriptionare rendering formatting
and[valuescorrectlyshow=violation.Ticket] areReturnsastheexpectedviolationbeforetickettheynumber.[values show=violation.user_info.username]Returns the username of the user the violation belongs to.[values show=violation.writer.DisplayName] users.Returns the display name of the admin who assigned the violationsent totheliveuser.[values show=violation.vehicle.Plate]Returns the plate of the vehicle the violation was assigned to, if applicable.[values show=violation.vehicle.province.ProvName]Returns the province or state of the vehicle plate.[values show=violation.vehicle.colour.ColourName]Returns the colour of the vehicle.[values show=violation.vehicle.plate_type.TypeName]Returns the plate type of the vehicle.[values show=violation.vehicle.vehicle_type.TypeName]Returns the type of the vehicle.[values show=violation.vehicle.make.MakeName]Returns the make of the vehicle.[values show=violation.location.LocationName]Returns the name of the location the infraction happened.[values show=violation.details.0.Ticket]Returns the violation ticket number. Alternate value location.[values show=violation.details.0.type.ViolationDescr]Returns the violation type description.