NetTalk Central

Author Topic: Popup messages when form validation fails.  (Read 18290 times)

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Popup messages when form validation fails.
« on: August 17, 2007, 12:23:26 AM »
In Version 4.29 I've simplified the method for displaying popup messages on a Form.

For an example, see example number 3. You will see this has resulted in a simplification of all the examples that do logins.

How it works

set a local variable (loc:alert) when you set loc:invalid.
The contents of loc:alert will be displayed as a popup message when the form is re-loaded.

It will also be displayed as a message on the form, just below the sub-header of the form. The CSS Class of this message is set on the CSS Classes tab (Alert:).

If you wish to suppress the popup, and display only the message, the tick off the option on the Advanced tab ("Popup Alert Message")

Advanced:
This feature works on the existance of a Value called ALERT. So if you would like to call a form, and include a popup message when the form opens, then you can append the parameter to the URL. For example:
'MySurveyForm?Alert=You must be over 18 to take this survey'

Considerations for those upgrading from 4.28 or earlier

If you have used a technique based on the login examples (In other words a combination of the XHTML tab, and the DisplayLoginMessage, and PopupLoginMessage procedures) then you might want to revise it to use this new (easier) approach.

Cheers
Bruce



Edvard Korsbaek

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Email
Re: Popup messages when form validation fails.
« Reply #1 on: August 17, 2007, 10:34:18 AM »
version 4.29 8)?
Not on www.capesoft.com

Its friday, and you promissed EIP on 'A friday.....'

Edvard Korsbæk