Using Form Data
Next, we return to the TicketConfirm class—the one that gets called when the user clicks on the Complete Order button.
We need to determine if an e-mail address was entered. We can access the values of form elements via the %request object's Data Property.
If this value is not a zero-length string, we have some work to do.
—TicketConfirm.OnPage—
TicketConfirm.OnPage
ClassMethod OnPage() As %Status
{
&html<<html>
<head>
</head>
<body>>
If ($D(%session.Data("Order"))) {
Do ..CompleteOrder()
Write "Thank you for using Caché Cinema!<br>",!
If ($G(%request.Data("OrderEmail",1)) '= "") {
}
}
Else {
Write "Your order expired before it was completed."
}
&html<</body>
</html>>
Quit $$$OK
}