webformitembang
webformitembang
BANG

The webformitembang statement sets the text generated by the webformitembang( function.

Parameters

This statement has one parameter:

bang – text that be will generated if item has an error. If this parameter is empty then the default error bang text is restored, the exclamation mark (!).

Description

This statement sets the text generated by the webformitembang( function. Out of the box, the webformitembang( function returns a single exclamation mark, but using webformitembang you can customize it to whatever you want. For example, this code will set the bang to a stop sign emoji.

    webformitembang "🛑"

Normally this only affects the current database, but you can add the prefix `global` to make this symbol work on all databases on this server.

    webformitembang "global 🛑"

The bang will remain in effect until you change it, or until you reset it like this:

    webformitembang ""

If the bang text ends with .gif, .png, .jpg or .jpeg it will be treated as an image url, and converted into an `<img>` tag.

    webformitembang "http://somesite.com/images/red_circle.jpg"

The code above will cause webformitembang( to return this HTML code:

    <img src="http://somesite.com/images/red_circle.jpg">

Usually you’ll want to display images from your own server (it’s generally frowned upon to side-link images from someone else’s server). To do that, you can simply leave off the domain name. This code assumes that you have an images folder at the root level of your web server, which contains a file named red_circle.jpg.

    webformitembang "/images/red_circle.jpg"

For this to work you have to have set up the server domain in the Preferences>Server panel.

See Also

- deletewebtemplate -- deletes the web template (a dictionary) associated with a form (if any).
- getwebtemplate -- retrieves the web template (a dictionary) associated with a form (if any).
- getwebtemplate( -- retrieves the web template (a dictionary) associated with a form (if any).
- getwebtemplatetext -- retrieves the text of the web template (a dictionary) associated with a form (if any).
- getwebtemplatetext( -- retrieves the text of the web template (a dictionary) associated with a form (if any).
- grabwebformitems -- grabs multiple web form items and stuffs the values into fields and/or variables.
- listwebtemplates -- retrieves a list of web templates in the specified database, if any.
- listwebtemplates( -- retrieves a list of web templates in the specified database, if any.
- makeformwebtemplate -- converts a Panorama form into the equivalent HTML/CSS.
- renderwebform -- renders a Panorama web form into HTML, merging data into the template as necessary.
- renderwebform( -- renders a Panorama web form into HTML, merging data into the template as necessary.
- retrywebform -- retries a web form that has missing or invalid data.
- savewebtemplate -- saves a web template (a dictionary) associated with a form.
- sethiddenwebformitem -- adds a hidden field to a form on a web page.
- webdatabasetoform -- fills in an HTML form with database field values.
- webfontsubstitutes -- generates an array of standard font substitutions for web browsers.
- webformallitems( -- returns a list of POST parameters passed from a form to the web server as a carriage return separated list.
- webformerrors( -- returns a list of errors that have been collected with the WebFormItemCheck statement.
- webformhiddenitems( -- returns a list of the hidden items in the web form submitted to this web procedure.
- webformitemnames -- returns a list of POST parameters passed from a form to the web server as a carriage return separated list.
- webformitemnames( -- returns a list of POST parameters passed from a form to the web server as a carriage return separated list.
- webformitems( -- returns a list of POST parameters passed from a form to the web server, including both visible and invisible items (but excluding the special items Panorama generates for its own internal use).
- webformmerge -- fills in an HTML form with database values (fields and variables).
- webformrecordid -- adds a RECORD_ID hidden field to the HTML of a web form.
- webformselection -- selects data based on input from a web form. The web form must have fields that match the database fields.
- webformtodatabase -- updates the current database with information from the web form that was just submitted.
- webformvisibleitems( -- returns a list of the visible items in the web form submitted to this web procedure.
- webmerge -- merges an external HTML template file with fields and variables from the current record.
- webthisrecordkey -- makes a key for use with the WebURLSelect statement to specify the current record.

History

Version | Status | Notes
10.2 | No Change | Carried over from Panorama 6.0.