Join Now

Click here to join our
growing community:



Welcome Tour
Pro Modules

Copyright © 2020
Terms of Use
Privacy Policy


Text Box

The text box input (textarea) allows you to create a multiline box for input and submit it to the form. It takes both a starting and finishing tag. Here's how it looks:

[box content cols=40 rows=5][box]

The field name is "content", and the cols and rows determine the box size. You can set those values to any number you wish. Normally the default value is set by the source function, often retrieving an entire page. Be sure not to have any extra spaces or line breaks between the opening and closing tag, or the contents of the box will be affected. Here's how it looks:

[box content cols=40 rows=5]<(source post=content)>[box]
[command warn "Abort this form!"]

The post=content tag gets the source function to look for a post value if the form has been submitted, and will insert that in the box, in order to preserve the user's modifications. If a post value is not found, the contents of is inserted. A default parameter could be added to the source function as well, and its value will be inserted if nothing else can be found.

I've added the warn command to abort the form, so you can see how the value is preserved when the form fails--even though it has not been saved in any way.

Additional Parameters

BoltWire adds the following commands to filter and/or modify user input:

required, filter, if, case, trim, fmt, strip, lines

The required parameter conflicts with the HTML5 parameter, which is allowed. That is, if you set required=true, HTML5 browsers will block form submission--before BoltWire has a chance to. Older browsers will not recognize the parameter and ignore it, allowing BoltWire's check to kick in. If you want to rely fully on BoltWire so all users have the same experience, you can reset the HTML parameters allowed in config.php to not include "required". You can see the default value in variables.php.

By default the following html parameters are allowed:

name, cols, rows, class, id, style, disabled, autofocus, readonly, required, wrap

To override the default message created when a form fails some input check, set msg to the value you wish, or set it to false to turn it off.

For information about how to insert javascript into a form element, please see that tutorial.