Possible invalid id of checkboxes in MailForm
Reported by Charles Brunet | November 12th, 2008 @ 02:23 PM | in 5.0.3 (closed)
In MF_Widget_Checkbox, checkbox value shoud be separated from label. Actually, if you specify a value with many words in settings.php file, it results into an invalid id. (In fact, checkbox get to id fields, one from the name, and one from the value... this is an other bug)
Separating value from label would also allow translating the label.
I propose to set value like this:
[mycheckbox]
type = checkbox
value 1 = yes, String to identify yes
value 2 = no, String to identify no
Comments and changes to this ticket
-
Charles Brunet July 29th, 2009 @ 03:27 PM
- Assigned user changed from lux to Charles Brunet
- State changed from new to open
We actually can specify a different key from label, using setValues like that:
setValues = "eval: array ('key1'=>'label 1', 'key2'=>'label 2')"
What should be done would be to convert invalid keys into valid ones to prevent invalid xhtml.
-
Charles Brunet August 7th, 2009 @ 02:50 PM
- State changed from open to resolved
- Milestone set to 5.0.3
Another way is to use the syntax:
value[] = A first value value[] = A second value value[] = A third value default_value = 0,2
I did some corrections to ease translation of checkboxes ans to generate more valid xhtml (ids were duplicated...)
It is still possible to create invalid checkbox values, but there are ways to avoid that.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
The Sitellite web content management system.