View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
272 | Composr | recommend | public | 2011-07-19 12:38 | 2011-07-19 14:14 |
Reporter | Guest | Assigned To | Chris Graham | ||
Priority | low | Severity | minor | ||
Status | resolved | Resolution | fixed | ||
Summary | 272: Too many required fields when JS set as off | ||||
Description | The "recommend" page, when Composr thinks Javascript is off (eg. keep_has_js=0), shows 10 single-line inputs for "Your friend's e-mail address". The field "Your friend's e-mail address" itself shows as being required, however the form validation Javascript doesn't allow the form to be submitted unless all 10 lines are filled in. This probably cropped up for me due to the Javascript detection not working (since cookies are disabled for EU compliance), since the validation function obviously wouldn't run if Javascript truly were disabled. I think I've tracked down the issue to "form_input_line_multi" in form_templates.php, where there is a line: if (!has_js()) $num_required=max($num_required,10); Removing this line puts the number of inputs down to 1, so the solution would be to bump up the number of fields without increasing the number of required fields. | ||||
Steps To Reproduce | 1) Visit the recommend page on a site without Javascript (eg. base_url/index.php?page=recommend&keep_has_js=0). 2) Fill in the form with an email address to send to. 3) Click "Send". The form will refuse to submit. Using keep_has_js=0 is only there to force the issue. It can occur without it, when the site misidentifies a user as having Javascript disabled, but this is harder to reproduce. | ||||
Tags | No tags attached. | ||||
Attach Tags | |||||
Time estimation (hours) | |||||
Sponsorship open | |||||