Why doesn't field validation work on web form?

Hi,Can anyone help. I have been doing this for a zillion years, but for some reason in r6 it doesn’t want to know.

Here’s the problem.

If I make a form and put one field on it called TEST and a simple validation formula in the validation event - @If(Test=“”; @Failure(“failed”); @Success);

And add a simple button with @Command([FileSave]) in it,

All works well except that when the validation doesn’t fail the form just saves and re-opens in edit. Not very useful. This appears to be the result of having the “use javascript” database property ticked. Remove the tick and lose some useful features, but regain the $$Return field.

So, as a workaround I have been since r5 forst came out, either using the $$Return or adding @URLOpen(the_URL_to_go_to) after the Save command in the button. Doing that in r6 however seems to prevent validation working, it just saves the form and continues to the given URL regardless of whether the form failed validation or not.

HAs anyone got the answer or a better solution that @URLOpen (without using JavaScript to validat)

Subject: Not a solution, just a recommendation: Better do it with JavaScript

You can do more validations simultaniously.You get a better response posibilities (instead of the simple @Failure(html_code)

Lotus Workplace is programmed using JavaScript, so we will have to learn it anyway.

Subject: Why doesn’t field validation work on web form?

A “proper” submission is @Command([FileSave]);@Command([FileCloseWindow]). That will fire $$Return AND run your validation. @Command([FileSave]) only saves the document, which is HUGELY useful if you take the time to think about it.

I’d still suggest doing basic JavaScript validation, though – it can save your user quite a bit of annoyance and your server a lot of traffic if you just do the basics client-side. It’s not “proper” validation (it can’t be), but it will prevent round-trips that could have been avoided.