Page 1 of 1

Form Builder error messages

Posted: Wed Apr 18, 2007 1:40 pm
by gdinfo
Hi,
is there a way to avoid Form Builder validation to present errors in at the beginning of the form?
Where can I found the error/messages presentation code?

This is the HTML generated code for error messages:


Please enter a value for "Message"
Please enter a value for "Company"
Please enter a value for "Person"
Please enter a value for "Email"

I tried to put a CSS display: none; in the h4 tag and it work fine but I would prefer to comment the code

Thanks.

Re: Form Builder error messages

Posted: Wed Apr 18, 2007 2:02 pm
by calguy1000
the proper solution is to style the output.

why not just mark the fields as not required in your form if you're not concerned about the errors.

Re: Form Builder error messages

Posted: Wed Apr 18, 2007 2:05 pm
by gdinfo
I would like to face with the standard mark ( <--- ) without the message.

Thanks.

Re: Form Builder error messages

Posted: Wed Apr 18, 2007 2:15 pm
by calguy1000
You're right, the way that the output message is handled is kind of ugly
What your looking for is in the validate method of Form.class.php

Re: Form Builder error messages

Posted: Wed Nov 12, 2008 12:05 am
by actionslax
gdinfo wrote: I would like to face with the standard mark ( <--- ) without the message.

Thanks.
did you manage to sort this problem?

I too am having this issue.

Cheers

Re: Form Builder error messages

Posted: Wed Nov 12, 2008 12:37 am
by dinot
I did remove the second error message (with the form builder)

Look for this line:

Code: Select all

{if $entry->valid == 0} <--- {$entry->error}{/if}
So just remove theĀ  {$entry->error} part if you don't want the error message to show.

Re: Form Builder error messages

Posted: Wed Nov 12, 2008 6:12 pm
by actionslax
cheers dinot that did the trick!

I didn't even try to look for the ascii eqivallent of that < shhheessh.

Also for anyone else having similar problem I

changed this --

Code: Select all

{if $entry->valid == 0} <--- {$entry->error}{/if}
to

Code: Select all

{if $entry->valid == 0} <span class="validation">*required field</span> {/if}
which I can now control much easier. I also plan to replace the asterix with a small star image for more accessibility options.

cheerss!

slax