Forums

French accents in select boxes

gfisch 28 Apr, 2010
Hi;

I have a number of select boxes in a form that uses french accents.
The results are saved properly in the database but when I go to edit the
form in chronoconnectivity, the select boxes do not show the selected options.

If I remove the accents all works well but I'd like to preserve them for the report to the client.

Any ideas on how to fix that? Where would the select boxes get build in the code?

Thanks
Gord Fisch arboreta.ca
GreyHead 29 Apr, 2010
Hi Gord,

I'm not sure why that should be - tracking accents through HTML, PHP JavaScript and MySQL does seem to work OK if everything is set to UTF-8 but it's a rather arcane art.

My tendency with drop-down values is to code the values into an array and save the coded values. This lets you recover the accented values OK - but causes other problems with searching :-(
$borough_array = array(
  1 => 'La Cité–Limoilou',
  2 => 'Les Rivières',
  3 => 'Sainte-Foy–Sillery–Cap-Rouge',
  4 => 'Charlesbourg',
  5 => 'Beauport',
  6 => 'La Haute-Saint-Charles');
. . .
<option value='1'>La Cité–Limoilou</option>
. . .

Bob
gfisch 04 May, 2010
Thanks GreyHead.

Another problem, and maybe I should start a new topic.

I have a select that is multiple and I want it to be required.

If I do not check 'Add Choose Option:' then, when presented in the front end, the first option is highlighted and, I suppose, considered selected. No validation takes place. It is never marked as 'required' and if the client does not change it, the first option is taken as selected.

If I do add a choose option. All is fine until I open a record it in ChronoConnectivity.
Then the choose option is always selected and I cannot save the record. It doesn't matter if I leave the choose option selected or if I unselect it. I get the 'required' message and cannot save.

Any ideas there?
GreyHead 06 May, 2010
Hi Gord,

I don't know why that would happen. Can you post a link to a form?

Bob
This topic is locked and no more replies can be posted.