Skip to main content

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.

ClassMethod OnPage() As %Status
    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."
    Quit $$$OK
FeedbackOpens in a new tab