17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1765 Views |
-
Field names in form validation messages

31 May 2008 at 6:11am
I'm using the Contact page to create a simple form. Everything's nice, including localised validation messages, except that I get things like "EditableEmailField1" for field names, like:
"EditableEmailField1 is required".Is it possible to change this? In the CMS or should I subclass the UserDefinedForm and tweak its display?
I'm using SilverStripe 2.2.1.
-
Re: Field names in form validation messages

31 May 2008 at 8:50am
Now, the fun starts when you use different browsers
The phenomenon described above can be experienced in Opera. The messages displayed are localised but they don't display correct field names.
In Firefox on the other hand the messages are not localised but the fields names are as I have entered in the CMS.
I can't wait to get my laptop near a Windows machine for IE testing :>This sheds some light on the issue however: in Opera the javascript validation doesn't seem to work - messages show only when I press the "submit" button. On Firefox the javascript validation works.
So, the javascript part is not localised and the server side part of the validation provides incorrect field names.Where do I start patching the code?
-
Re: Field names in form validation messages

6 June 2008 at 9:34am
Just for the record: I've opened a ticket and sent some patches for RequiredField (i.e. server-side validation).
This works in my case but I have not way to test it broadly - my knowledge of SilverStripe's guts is to shallow.
| 1765 Views | ||
|
Page:
1
|
Go to Top |

