NetTalk Central

Author Topic: Popup form, validation alert not showing  (Read 6726 times)

vklemet

  • Newbie
  • *
  • Posts: 30
    • View Profile
Popup form, validation alert not showing
« on: January 22, 2014, 04:53:57 AM »
Hello,

Working now with NT 7.31, I have a problem with the validation alert message not showing at all when form is in popup mode.

When not in popup mode (so form is not opened on top of browse), if some required field is missing the red bar appears at the top of the form saying the text I have coded, but the bar missing in the popup mode.

Currently I put values to loc:invalid and loc:alert if the field is required. Is this the wrong way to do this?

-Vesa-

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Popup form, validation alert not showing
« Reply #1 on: January 23, 2014, 05:58:00 AM »
There are a few things that are in play here.

Firstly, in popup mode, you don't get the "red bar at the top of the screen" so much. At least not in NT7. That system would need to be refactored somewhat to work in popups, because they'd need to be named in a unique way on each popup.

What you can have on a popup is the comment contain the error, as well as a "popup up message" that indicates the error to the user. Check out the "Validation" example to see what it does.

cheers
Bruce

vklemet

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Popup form, validation alert not showing
« Reply #2 on: January 24, 2014, 01:43:39 AM »
Thanks once again Bruce!

I checked the example and after that I was able to pinpoint the problem.

I was doing the validation in ValidateInsert and ValidateUpdate routines, which worked when using NT6 on this project.

In NT7 I did not get any messages (alert-popups was what I got with C6) when the validation failed even when I added similar validation for a field as used in the example, only sign was the form not closing. When I commented out my hand-code validation, popups started to work.

So some refactoring needed to my validation code, but now I think can get it to work. The red-bar functionality would be nice, as I need to do some not field spesific validation. Although think I can get close enough functionality by adding a display-type field to the start of the form and show it only when there is some error to show.

-Vesa-