Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1366 closed defect (fixed)

checkbox widget ignores "value" attribute

Reported by: guest Owned by: Adam Peller
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: checkbox Cc:
Blocked By: Blocking:

Description

The checkbox widget ignores the setting of "value" attribute. It always posts "on" instead of the setting of "value" attribute when checked.

<input type="checkbox" dojoType="Checkbox" name="PaymentMethods?[]" value="PayPal?" />

If dojoType="Checkbox" is removed, the setting of value attribute is used.

Change History (8)

comment:1 Changed 13 years ago by dylan

Milestone: 0.4

comment:2 Changed 13 years ago by Adam Peller

Owner: changed from bill to Adam Peller

from doughays@IBM:

Add the attribute: value="${this.value}" to the input tag in the file src/widget/templates/Checkbox.html and initialize the value value: "on", in the file src/widget/Checkbox.js

comment:3 Changed 13 years ago by Adam Peller

Ok to putting this in the template, as we should preserve any existing value on the node, but I don't think we want any initial or default value ("on" wouldn't be right). I believe that "value" is for submit only and is unrelated to the checkbox state.

comment:4 Changed 13 years ago by Adam Peller

oops. wrong about the 'on' thing. it is the default for value.

comment:5 Changed 13 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [5529]) fixes #1366: implement checkbox value attribute

comment:6 Changed 13 years ago by bill

Resolution: fixed
Status: closedreopened

this isn't working. when value isn't specified, it prints out ${this.value} as the value, rather than null.

comment:7 Changed 13 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [6219]) oops, erased value attribute by mistake; putting back. Fixes #1366.

comment:8 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.