hcl-bot
February 14, 2005, 3:18pm
1
I am trying to do form validation where the form remains displayed if there is a validation error, rather than generating a new page as @failure does.
My validation formula looks like:
failed:=(@thisValue=“”);
@If (
@ClientType=“Web” & failed;
@Do (@SetField (“ValidationMessages”;@Trim (ValidationMessages:“validation failure”));@Success );
@ClientType != “Web” & failed;
@Failure (“validation failure”);
@Success )
My save action contains:
FIELD ValidationMessages:=“”;
FIELD SaveOptions:=“0”;
@Command ([FileSave]);
@If (ValidationMessages=“”;
@Do (
@SetField("SaveOptions";"1");
@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow])
);
“”)
The @PostedCommand ([filesave]) call triggers an “Unknown OS error” message on the server.
Is there a similar way of doing this without resorting to javascript, parameter manipulation or webagents? Being able to do this would make form validation error handling on the web more in-line with applications we see on the web today where validation messages are displayed at the top of the form and do so in a simple fashion.
Thank you,
Rich
hcl-bot
February 15, 2005, 7:34am
2
Subject: use @isvalid rather than filesave
I think you are only doing the first save to make the validation formulae run.
hcl-bot
February 16, 2005, 6:43pm
3
Subject: RE: use @isvalid rather than filesave
I tried using @isValid . That formula isn’t valid in this context.
hcl-bot
February 14, 2005, 3:24pm
4
Subject: Using [FileSave] twice on web generates “Unknown OS error”
Why are you forcing a validation refresh instead of using JavaScript validation at the client side?
hcl-bot
February 16, 2005, 6:41pm
5
Subject: RE: Using [FileSave] twice on web generates “Unknown OS error”
While javascript helps prevent roundtrips, in the end, validation still needs to be performed on the server, to prevent malicious entry as one reason.
What if javascript is not enabled at the time of form submission?
hcl-bot
February 16, 2005, 6:42pm
6
Subject: RE: Using [FileSave] twice on web generates “Unknown OS error”
While javascript helps prevent roundtrips, in the end, validation still needs to be performed on the server, to prevent malicious entry as one reason.
What if javascript is not enabled at the time of form submission?