To reproduce this issue, create a webform with a single field of type grid and configure it this way:
Label : whatever you want
Checkbox : whatever you want
Questions: put in the following line:

l'amore è bello

And make the field mandatory.
Now if you try to fill the webform, Drupal says that the field is not compiled, no matter which answer you select.

Change the question into:

l amore è bello

And everything works fine.

In my installation, this bug is systematic.

Comments

kalbun’s picture

Update: the same problem also appears with the quote (") symbol.

quicksketch’s picture

Status: Active » Fixed
StatusFileSize
new2.53 KB

Thanks, this was caused by quotes breaking the HTML within the page. I've applied the following patch which removes the quotes while displaying the form, then restores them for the saved values so data is saved in the original form.

kalbun’s picture

Thank you for the patch, it seems to solve the issue but there is still something. I have had some problems in a selectfield that allows multiple answers. I'll try to isolate and reproduce the issue.

kalbun’s picture

Title: Answers in grid fields not accepted if questions contain apostrophe » Answers in select fields not accepted if questions contain apostrophe AND the field accepts multiple answers
Version: 6.x-2.3 » 6.x-2.4
Status: Fixed » Active

To reproduce the issue, create a new select field and make it mandatory.

Now write one or more answers, at least one must contain the apostrophe (') and/or the quote(")

L'amore è bello

Set the field to accept multiple answers, this turns radio buttons into check boxes.

If you try to send the webform, this field returns an error message such as "invalid value, contact administrator".

passa’s picture

i run throught the same issue with checkbox and apostrophes (').
Any news or solution on that ?

That a significant probleme for french langage which use a lot of apostrophes ....

amir simantov’s picture

Is this solved in 6.x-2.7 ?

quicksketch’s picture

The problem still exists in 2.7 and the latest development versions, if there are any updates on this I'll post them here.

mainer’s picture

No, it is still an issue. I have tried to re-word question and leave a simple 'yes/no' as a choice... no go.

My need is to have the select as a mutli-choice (to have a checkbox) but only have one value (the condition itself)... so that they can 'accept' the statement (kind of term of agreement thing).

Cannot make it mandatory and have it functional.... arrrrgh.

Suggestions anyones? The other mandatory fields work... just this field and the date field... no go.

SeanA’s picture

Version: 6.x-2.4 » 6.x-2.7

For now, I used the backtick character ` in place of an apostrophe ' to get around this problem.

amir simantov’s picture

I also do not understand why this fix did not entered to the newest version. Nate? Anyone? I thought that if I install the new version then all fixes are inside it. As I see it, is not a patch for some specific scenario, but indeed a fix for a bug. Thanks!

PixelClever’s picture

I am experiencing the same thing. Any apostrophe breaks the submission. Removing it lets it run, but it severely limits range of text options especially in foreign languages.

wrightnow’s picture

Not surprisingly, this bug extends to four characters, which are

' " ] \

Of course, easily avoided by using the machine_name|readable_name name/value pair.

quicksketch’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new10.79 KB

This has been fixed in 3.x with the attached patch. I'm not particularly planning on backporting the fixes to 2.x, so the bug still exists in earlier versions.

quicksketch’s picture

Status: Patch (to be ported) » Closed (fixed)

Closing as 2.x will not be receiving any further updates and this has been fixed in 3.x.

euskarez’s picture

Version: 6.x-2.7 » 6.x-3.x-dev

goodmorning,
for me the problem persist also with 3-dev version.
I have a multiple select with 4 values. one of theese have a single quote like this: l'italiano
the 3 values without quote in the key value has registered. the other no.
help me please. thanks!