i found that the xhtml created by is invalid when the components have latin characters like ã ç or commas etc.
here's the error returned by http://validator.w3.org/check
Line 276, Column 242: character "(" is not allowed in the value of attribute "id"
…-profissional-disponibilidade-Misto-(Pós-–-Laboral-e-Sábados)" value="Misto (

this is big bug because I whanted to use jquery and it fails

check this example

<input id="edit-submitted-recursos-humanos-e-formacacao-profissional-enumere-as-razoes-pelas-quais-nunca-frequentou-uma-accao-de-formacao-Não-existe,-na-localidade,-estruturas-de-apoio-à-formação" class="form-checkbox" type="checkbox" value="Não existe, na localidade, estruturas de apoio à formação" name="submitted[recursos_humanos_e_formacacao_profissional][enumere_as_razoes_pelas_quais_nunca_frequentou_uma_accao_de_formacao][Não existe, na localidade, estruturas de apoio à formação]"/>
Não existe, na localidade, estruturas de apoio à formação
</label>
CommentFileSizeAuthor
webformbug.png19.72 KBfmmribeiro

Comments

quicksketch’s picture

Priority: Critical » Normal

Thanks for the report. This is the way Drupal handles all checkboxes in the entire system. I'm not entirely sure where to correct this problem. You can always theme the form (see THEMING.txt) to add additional classes to checkboxes if you need to target them specifically with jQuery.

Alternatively, if you use key|value pairs to specify your values, you can shorten up the value (and therefor the ID) of your checkboxes.

quicksketch’s picture

Status: Active » Closed (fixed)

This has been fixed in 3.x, where checkboxes are now just assigned numeric IDs (1, 2, 3, etc.), which should enforce correct HTML. In the 2.x version I'd suggest using key|value pairs until you can upgrade (though using key|value pairs is always a good idea anyway).