Hi,
All conditions failures are shown at one time.
However, required is performed before conditions and failures in required stop conditions from being checked.
So, use required OR conditions, but not both.
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
I am writing a form that is intended to provide information to AANE (Asperger's Association of New England) about all kinds of community resources. I am so impressed with this program! I have my entire form working including good and bad templates, and the template that formats the output email to our db administrator. I do have one question (I think this is is the only one left...)
Using required fields, I get a list of all missing fields. When I use multiple condition statements, however, I get only the first error field.
Both error conditions are working, because when I make only one error, I get output from whichever one is incorrect (e.g. if I do not put in a valid email address, but I do put in name, I get a correct message that I need a valid email address; conversely, if I put in a correct email address, but do not put in the name, I get a correct message that the name field is blank).
Does formmail provide just the first error, or am I doing something wrong? I
Normally, I would use 'required' because it is simple and works well, but I do like the field validation that I found in the forums (it's not quite right, hyphen is also a legal character and I'll post that as a reply) so that I can (sort of) validate the email address. Of course that does not stop someone from putting in micky.mouse@disney.com, but I'm assuming that my users are not intentionally trying to be funny.
Hi,
All conditions failures are shown at one time.
However, required is performed before conditions and failures in required stop conditions from being checked.
So, use required OR conditions, but not both.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
I'm only using conditions, not required. I have conditions1 and conditions2. If there are errors in both conditions statements, only the errors in conditions1 are reported. If there are errors in conditions2 but not in conditions1, then the conditions2 errors are reported.
I would thus assume that the conditions statements alone are formatted correctly, but that there's some setting or other that says not to stop evaluating conditions statements if you find an error in the first one.
Hi,
Your reasoning is correct. And I think I was a little misleading in my earlier answer.
If you have, say, 5 tests in "conditions1", all errors in those 5 tests will be shown at one time.
But, "conditions2" is not evaluated if "conditions1" reports errors.
This is by design, because it allows later "conditions" fields to rely on the success of earlier "conditions" fields.
So, what you want to do is to merge your "conditions2" tests into "conditions1".
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks