-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
When there is an error in the form, we stay on bottom of the page (where is the button) instead of going back to top (where is description of the error).
How to reproduce :
- Create a survey with some field in order to need scrolling
- Declare some fields mandatory
- Don't answer to a mandatory field
- Clic on submit button : you stay near the submit button and you cannot see the error
A part of the patch here (do not take account of about the liseret div) :
<script type="text/javascript"> function survey_display_errors (id, pos, errors) { $j($j('#survey-' + id + '-page-' + pos + ' .liseret')[0]).before('<div class="error"><a name="errors"></a><i18n:text i18n:key="PLUGINS_SURVEY_FORM_ERRORS"/><ul></ul></div>'); for (var i=0; i < errors.length; i++) { $j('div.error ul').append('<li>' + errors[i].label + " : " + errors[i].message + '</li>'); } window.location.href = "#errors"; } </script>