When the user submits a survey and the survery does not pass validation then all the values in the form are reset when the page reloads. You can test this at http://drumbeatinsight.com/contactus. Enter values in all the fields except one required field and submit the form. When the page reloads the error message appears but all the form values are empty.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | survey_module_validate.patch | 875 bytes | dtan |
| #3 | survey.module.validate.patch | 875 bytes | dtan |
Comments
Comment #1
xolotl commentedThis issue still exists in latest CVS version as of 4/20/2005. Requiring fields but not reloading existing data on error is a serious usability issue.
Comment #2
Alex Reisner commentedI apologize for not having time to write a patch, but this problem is caused by the survey being submitted to node/submit/x and then the redirection to node/x if there's an error (you can see this in survey_submit()) which loses the POSTed data. To fix the problem I made surveys submit to their base path (ie, node/x instead of node/submit/x). This requires modifying:
Comment #3
dtan commentedThis patch should do the trick. It simply reloads the view if an error occurs.
Comment #4
dtan commentedhtml was added to previous patch. . .
Comment #5
jasonwhat commentedWas this added to the module? If so, what version?
Comment #6
urbanfalcon commentedAs of September 19th, this had not been included with the core module, but I really think it's a necessity. In fact, on top of the proposed addition, I would suggest also editing the _menu so that
$items[] = array('path' => 'survey/submit', 'title' => t('survey submission'),becomes
$items[] = array('path' => 'survey/submit', 'title' => t('please complete survey submission'),Aside from that, it seems to perform as advertised.
Comment #7
gollyg commentedSeems that the patch works, but the reloaded page no longer has a title - these fields appear blank. This is occuring when the survey is set to form part of a book hierarchy, don't know if it happens using regular taxonomy node
Comment #8
walkah commentedcommitted to both HEAD and DRUPAL-4-6. thanks ! :)
Comment #9
walkah commentedComment #10
(not verified) commented