Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormSelect 'selected' syntax #495

Closed
zyspec opened this issue Jun 27, 2016 · 0 comments · Fixed by #612
Closed

FormSelect 'selected' syntax #495

zyspec opened this issue Jun 27, 2016 · 0 comments · Fixed by #612

Comments

@zyspec
Copy link

zyspec commented Jun 27, 2016

In \Xoops\Form\Select (XoopsCore/htdocs/xoops_lib/Xoops/Form/Select.php) setting the selected attribute uses selected="selected" however per HTML standard should just be selected...

in renderOption() method change lines 104-106 from:

if (in_array($optionValue, $selected)) {
    $rendered .= ' selected="selected"';
}

to:

if (in_array($optionValue, $selected)) {
    $rendered .= ' selected';
}

This effects multiple XoopsForm Objects since several classes use \Xoops\Form\Select. Same issue exists in XOOPS 2.5.x series - I'll open a separate issue there too...

geekwright added a commit to geekwright/XoopsCore that referenced this issue Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant