Support » Plugins » [Plugin: Contact Form 7] autofill email of logged in user

  • Hi

    Does any one knows if it is possible to do following:

    Normally when i build form i include ’email’ and ‘name’ fields and when visitors fill them in i get there name and email as it was intended.

    But for users that are logged in i want to leave those fields out, it could be frustrating when you are logged into have to fill your name and email all over again.

    But when i leave those fields out, i do get email but no idea from whom.

    Is it possible to somehow fetch email off logged in user and put if in the form so i would know which of logged in users has sent the form?

    thnax in advance for you help

Viewing 1 replies (of 1 total)
  • fuzzie


    I’m trying this too:

    <?php global $current_user; if ( isset($current_user) ) {
    echo $current_user->user_login;
    [contact-form 3 “Contact Form 1 – registered users”]

    <?php } else { ?>
    [contact-form 1 “Contact form 1”]
    <?php } ?>

    Haven’t figured out how to include the name and email yet, but at least it displays the name.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Contact Form 7] autofill email of logged in user’ is closed to new replies.