request form value type :records and checkboxes

Bug #619081 reported by petschki
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Medium
Unassigned

Bug Description

we have a html form like this:

<form>

    <input type="checkbox" name="index.enabled:records" value="0" />
    <input type="text" name="index.name:records" value="index 1" />

    <input type="checkbox" name="index.enabled:records" value="1" checked="checked" />
    <input type="text" name="index.name:records" value="index 2" />

</form>

so the result in zope 2.10 of REQUEST.form['index'] was:

[{'name':'index 1'}, {'enabled':'1', 'name':'index 2'}]

but now in zope 2.12 we get

[{'enabled': 'name':'index 1'}, {'name':'index 2'}]

i think it's because unchecked checkboxes are missing in the request (as usual) but the first checked checkbox is falsely dedicated to the first record ... this is bad.

can anybody confirm this?

Revision history for this message
petschki (petschki) wrote :

sorry for the typo ... the correct zope 2.12 REQUEST.form['index'] value is:

[{'enabled':'1', 'name':'index 1'}, {'name':'index 2'}]

Revision history for this message
petschki (petschki) wrote :

after a bit more testing it turns out that, as long as the checkbox field isn't the first input field, the request gets rendered correct.

this only occurs, when the checkbox field is the first one ... is this a bug or does it only have to be documented somewhere?

Changed in zope2:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

re-reported the bug on the Github project
https://github.com/zopefoundation/Zope/issues/568

Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.