webformerrors(
webformerrors(
FORMAT
)

The webformerrors( function returns a list of errors that have been collected with the WebFormItemCheck statement.

Parameters

This function has one parameter:

format – format of the list that is returned. If this parameter is `""`, then a carriage return delimited list will be returned. If the parameter is `"<ul>"` or `"<ol>"` then an unordered or numbered HTML list will be returned. If the parameter is `"<table>"` then an HTML table will be returned. You may place options in the table tag, for example `"<table border=1 cellpadding=3>"`.

Description

This function returns a list of errors that have been collected with the WebFormItemCheck statement. The parameter controls the format of the list that is returned. If this parameter is `""`, then a carriage return delimited list will be returned. If the parameter is `"<ul>"` or `"<ol>"` then an unordered or numbered HTML list will be returned. If the parameter is `"<table>"` then an HTML table will be returned. You may place options in the table tag, for example `"<table border=1 cellpadding=3>"`.

For even more control you can specify separate header=, footer=, prefix= and suffix= tags. The prefix and suffix will be added to each individual error message. The header and footer tags will be added at the top and bottom of the entire list. Here’s an example for creating a custom html table:

    webformerrors(|||header="<table border=0>" footer="</table>"
        prefix="<tr><td><font face="Verdana" size=-1>"
        suffix="</font></td></tr>"|||)

Here is a complete example that shows how this function can be used with the webformitemcheck statement to check for and report data entry errors in a web form.

    webformitemcheck "Name",
        "Please enter a valid name.",
        wordcount(import())<2 or rangenotmatch(import(),"AZaz  ")
    webformitemcheck "Card",
        "Please enter a valid credit card number.",
        cardvalidate(import())=false()
    webformitemcheck "CardYear",
        "Your credit card is expired or has an invalid expiration date.",
        cardexpirevalidate(webformitemvalue("CardMonth"),import())=false()
    cgiHTML=webformerrors("<ul>")
    if cgiHTML<>"" rtn endif
    ...
    ... continue with data entry procedure
    ...

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.
- webformhiddenitems( -- returns a list of the hidden items in the web form submitted to this web procedure.
- webformitembang -- sets the text generated by the webformitembang( function.
- 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.