Join Now

Click here to join our
growing community:

JOIN LOGIN



Docs

Welcome Tour
Handbook
      Markups
      Variables
      Conditions
      Functions
      Forms
      Commands
      Concepts
Extensions
Pro Modules
Developers



Copyright © 2020
Terms of Use
Privacy Policy
BoltWire

Handbook

Abort

This conditional is triggered if the page is called from a form that has been aborted. Usually this occurs when the form submission fails some test.

Here's a simple example:

[form]
[radio color red] Red   [radio color blue] Blue
[submit]
[command if "equal {=color} red ? warn='Don't pick this one!'"]
[command warn]
[form]

[if abort]You picked the wrong one![if]

If you pick the wrong radio button, the warning message is assigned to the warn command, which then causes the form to abort. The warning message then goes to the messaging system and the abort conditional is triggered to give a second message.

Here's another example. This demonstrates how to check whether a specific input field or command causes the form to abort, and send back custom messages:

[form]
Field 1 [text field1 required]
[text field2 required]
[submit]
[form]

[if abort field1]Field 1 Required[if]
[if abort field2]Field 2 Required[if]

If you submit the form without entering either value, only the first abort conditional will be triggered as the form will have never made it field2.

This approach to giving abort error messages is separate and independent from BoltWire's built-in messaging system. The input fields above generate their own system messages, so you could more easily just do this:

[form]
Field 1 [text field1 required]
[text field2 required]
[submit]
[form]

[messages]