We want our users to be able to contact each other directly, but not give away the email address of the user account.

Personal Contact forms do just this, however, we need a few more fields and other triggers to happen alongside this. Things that webforms already does.

What I'd like to do is use a %get parameter to pass the id of the user they are contacting into the form, and pre-populate the email into a hidden field. This will allow me to use the webform email function to notify user 2 that user 1 would like to contact them.

So there are two users involved. User 1 = logged in user. User 2 = the person they are contacting.

The url would be mysite.org/webformid?uid=2

Where the uid is the id of contact 2.

Using that id, the webform could pull their email into a hidden form field.

Is this possible?


1 Answer 1


You can use hidden fields in your webform which are associated with user's details, such us email, id etc.

  • Sorry, should have explained clearer, it's the information about another user that I want to populate. User 1 is logged in. I want them to contact User 2. I want User 2's email to be a hidden element in the form. User 1 can't see their email but the webform will email their submission to them.
    – Heather O.
    Commented Jun 4, 2015 at 7:56
  • Please clarify this in the description :) You can create your webform and add a hidden field programmatically through hook_form_FORM_ID_alter(). Commented Jun 4, 2015 at 7:59
  • Thanks for the suggestion. No programming skills so was hoping for something easier :) Perhaps that does exist!
    – Heather O.
    Commented Jun 4, 2015 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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