Dropdownlist Bug

If you have a dropDownList as the first element in a form it will not display the "cannot be blank" error when you focus the next form element. It will only display the error if it first gains focus.

*EDIT: Scrub that, it happens on any form element. They will not display the error unless the element has first had focus.

If you wish, you can set a default focus on a field when page loads, through simple HTML markup (assuming HTML5 support):


<input type="text" name="fname" autofocus>


Alternatively you can use javascript.

This is expected behavior, we do not show error on fields you have not changed yet. Error will only occur on submit.

No, I would expect the behavior to be that if you skip past a required input it will throw an error. I know this is somewhat more difficult to program, but is how it should be.

This depends on how you define "if you skip past". You can see it in two ways:


[*]element gets focus, you change it or not and it looses focus when you go on

[*]an element that is in the form at some point after this element gets focus.


We implemented the first interpretation because it is easier to implement. The input order is also not necessarily clear from the order of php function calls so your approach is a bit harder to implement. You can create an issue on github if you want the second approach to be added as an option. You can also try implementing it yourself and send a pull request.

As I said, it is somewhat more difficult to program, however in my experience a form is normally completed from the top down. I have myself created forms which function in just this way: If a user skips a required input it immediately throws an error. Far more user friendly.

can you report an issue about this on github?

I’m currently working on an application which requires errors to function in this way. I will bring this up later down the track when perhaps I can contribute something useful.