Hi guys,
I’ve created a self registration web application. I have various fields on the form and a submit button. The submit button firstly validates the form (checks to see if all the fields have been filled out) then processes the form and sends an email via an agent.
I have also created a view in which i can see who has registered.
The problem i am having is that a user can register multiple times. How can i stop this?
Forgot to mention that the validation on the button is written in javascript.
Subject: Validation…
you can add hidden computed field on your form and check the name using dblookup, and if name the same you can fill this filed by special number. then you can use this field in your validator.probably there are some another better approach… so you could try to find something another.
Subject: RE: Validation…
Hi Dmytro,
I tried the dblookup method but it seems that in javascript i am unable to get a handle on a computed field.
Subject: RE: Validation…
Computed fields are rendered to the browser as plain text. To make them accessible to JavaScript, you have to either check the form porperty to generate HTML for all fields (which will make ALL hidden and computed fields visible in the source of the page) or create a matching hidden input yourself as pass-through HTML.
One big disadvantage of the @DbLookup solution might be, that anonymous needs reader access to all existing person records! Personally, I would not want that. You can use a WebQueryOpen agent instead, that runs on behalf of some technical user.
As the number of users increases, this approach will however reach it’s limits as well because of maximum field size. I would prefer to offload this part of the validation to a WebQuerySave agent. This means, that the page has to be reloaded if an error occurs, but it’s more robust.