The webformitembang( function returns an exclamation point, icon or symbol to indicate an error in a web form for data entry.


This function has one parameter:

item – the field name that may contain an error.


This function returns an error symbol for a specific web form item, if any. The function is designed to be used in a Text Display Object on a form. It should be placed next to a field item. If that item has an error, the Text Display Object will display an exclamation mark. You can change this to some other symbol (or to a URL for an image) by using the webformitembang statement.

For example, suppose you have a web form that allows input of a credit card, with code like this to process the data entry and add the information to the database.

grabwebformitems ""
webformitemcheck "webName",
    "Please enter a valid name.",
    wordcount(import())<2 or rangenotmatch(import(),"AZaz  ")
webformitemcheck "webCard",
    "Please enter a valid credit card number.",
webformitemcheck "webCardYear",
    "Your credit card is expired or has an invalid expiration date.",
if webformerrors("")<>""

If there is a problem with the credit card, the original data entry form will be redisplayed on the users' browser. But how will the user know what the problem is? The solution is to place a Text Display Object on the form next to the data entry field (assuming you are using Panorama to generate the web form), and use this formula in the object:


When the form is re-displayed, the user will see the error symbol next to the card number field. (Remember, the default symbol is the exclamation point, but you can change the symbol with the webformitembang statement.)

If you would also like to display the actual error message elsewhere on the form, use the webformitemerror( and or webformerrors functions.

See Also


10.2No ChangeCarried over from Panorama 6.0.