retrywebform

The retrywebform statement retries a web form that has missing or invalid data.


Parameters

No parameters.


Description

This statement retries a web form that has missing or invalid data. If there is an error the procedure can re-display the original form with the data the user entered. The user can then modify the data so that it will be acceptable and re-submit it. This example grabs the input data into variables, uses webformitemcheck statements to validate the input, then uses retrywebform to redisplay the input form if there are any problems.

grabwebformitems ""
webformitemcheck "webName",
    "Please enter a valid name.",
    wordcount(import())<2 or rangenotmatch(import(),"AZaz  ")
webformitemcheck "webCard",
    "Please enter a valid credit card number.",
    cardvalidate(import())=false()
webformitemcheck "webCardYear",
    "Your credit card is expired or has an invalid expiration date.",
    cardexpirevalidate(webCardMonth),import())=false()
if webformerrors("")<>""
    retrywebform
    rtn
endif
addrecord
stashwebformitems

If everything is ok, the stashwebformitems statement brings the new data into the database.


See Also


History

VersionStatusNotes
10.2No ChangeCarried over from Panorama 6.0.