hi,

in the checkbox option (profile module) i checked 'the user must enter a value' to make this field required

when i create a new user and i don't checke the checkbox field the response is not you must enter a value

don't remember that i checked this option

thanks
simone

CommentFileSizeAuthor
#6 profile.module-D7x-28-03-08.patch361 bytesricabrantes

Comments

ricabrantes’s picture

Version: 6.0 » 6.x-dev

Confirmed in D6.x-dev and D7.x-dev...

When i create a new account, and don´t check the checkbox, the account is create..

anamorfosi’s picture

same problem in d6.1

scoutbaker’s picture

Version: 6.x-dev » 7.x-dev

Since it's still a problem in 7.x, moving to current dev.

floretan’s picture

The label says "The user must enter a value". A checkbox has two possible value, checked and unchecked, so changing the validation not to accept "unchecked" as a value would create another problem.

I think the problem comes from the fact that there is a confusion with other checkbox fields (cck for example), where a required checkbox field only validates if it is checked. If fields make it in core for drupal 7 they will most likely replace the profile module and this inconsistency will be removed.

anamorfosi’s picture

Version: 7.x-dev » 6.1

in drupal 5.1 work correctly, in drupal 6/6.1/7 doesn't work

it's an important module for me, for a new user that must accept Privacy Policy or Terms of Service

others solutions for this problem?

thanks

ricabrantes’s picture

Version: 6.1 » 7.x-dev
Status: Active » Needs review
StatusFileSize
new361 bytes

I wrote a patch to correct this issue..
It will apply to D6.x and D7.x

Please tell me your opinion

anamorfosi’s picture

Version: 7.x-dev » 6.1

thankyou very very very much

next week I test the patch :-))

vm’s picture

Title: 'the user must enter a value' doesn't work » required fields don't work correctly
Version: 6.1 » 6.x-dev

if this works as expected it would likely go into the next d6 relase as this seems more a bug fix then a feature. changing version to reflect this.

dannypfeiffer’s picture

Presents some problems for me post-registration.

With multiple profile categories, when i go to update info in one profile category it gives me "warning, xxx is required" message for items that aren't even in the category i'm editing.

gábor hojtsy’s picture

Hm, last time I tried adding a checkbox to a user profile and making it required made it only accept the submission if the checkbox was checked. So this could have been used for an "Accept terms of service" type of checkbox, which is required to be checked. Do I understand this report right that it is about this checkbox not being actually required?

coyotegrey’s picture

I see this issue in 6.2.

Steps:
1. setup a profile field of type checkbox. Make it required by checking "the user must enter a value".
2. on the registration page when first creating an account, you can leave your new checkbox unchecked and proceed without error.
3. once the account is created, if you edit your profile you cannot leave the box unchecked or you get an error.

Desired behavior:
On step 2, the registration form should throw the same error as step 3 if the box is left unchecked.

WorldFallz’s picture

tested on a d6.5 site: 1) the problem still exists and 2) this tiny patch fixes it. I didn't notice any problems with its behavior. It would be nice to get another data point before marking RTBC.

Anonymous’s picture

Version: 6.x-dev » 7.x-dev
Status: Needs review » Needs work

Patch needs to be created from the source root directory. Please re-roll the patch.

dave reid’s picture

Status: Needs work » Closed (duplicate)

This is a core issue - duplicate of #179932: Required radios/checkboxes are not validated. Please focus patches in that issue on 7.x first, then we can backport.