I have customized the user-edit page in Drupal7 using user-profile-edit.tpl.php. I have also added reCAPTCHA to it using the reCAPTCHA module.

I would also like it so that there is an "I agree to terms and conditions" checkbox, and only when the user clicks this check box should the information be saved (i.e, it should be a required field).

How can I do that?

I found the Terms of Use module and the Legal module but they appear only on the registration form, whereas I want it in user-edit page (form). I thought of adding a field to the account settings for users but I am not getting any desired field for that.

Any suggestions?

Following the answer below, I was able to do some progress. However I want it to be a required field and if I click on that in its field setting then automatically it is shown on the user registration page which I do not want As you can see in the image if required field is selected then automatically it is displayed on registration form which I do not want...I only want it to appear in the user-edit page.

  • Any Ideas or suggestions please...is it that hard to achieve?
    – user145078
    Mar 28 '13 at 7:23
  • Any suggestions
    – user145078
    Apr 2 '13 at 8:54

You can select the Boolean field and widget type as Single on/off check box...This should solve your problem...No need to use any modules

  • yes but i want it to be a required field and if i click on that in its field setting then automatically it is shown on the user registration page which i do not want
    – user145078
    Mar 26 '13 at 9:17

You should be able to use the Field Permissions module in combination with the checkbox you've already set up if I'm reading your requirements correctly.

1) Set up your Boolean field as you already have

2) Set the field permissions so that only registered users can see/edit it

This will mean that when a user registers, they will not be able to see or edit the field, but as soon as they have registered they get the permissions on the field and it will become viewable on the user edit page.

  • i did that but its still appearing on the user registration page
    – user145078
    Mar 26 '13 at 9:57
  • 1
    hmm...if you make it an unrequired field (just for now), does it still show on the user registration page? One option would be to make it unrequired, and then use Rules to ensure it is filled in on the user edit page.
    – Chapabu
    Mar 26 '13 at 9:59
  • 1
    if its not a required field then its not appearing...the rules idea sounds interesting...let me work on it...will keep you posted...thanks
    – user145078
    Mar 26 '13 at 10:04
  • btw what condition should i have in the rule...i have figure out the action and event but stuck at condition
    – user145078
    Mar 26 '13 at 10:09
  • ok so in condition i added check data value to be empty and negated it
    – user145078
    Mar 26 '13 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.