Contact Form 7 Dynamic Text Extension
Grabbing username? (6 posts)

  1. ssmk
    Posted 4 years ago #

    My blog is only accessible to users who are logged in.

    I would like to be able to automatically grab the login name of the person who is using the contact form and have it displayed in the email so I know exactly who is contacting me.

    Can this be done with your plugin?


  2. Adam Capriola
    Posted 4 years ago #

  3. sevenspark
    Plugin Author

    Posted 4 years ago #

    This functionality is now available in version 1.0.4. The tag would look like this:

    [dynamictext user-email "CF7_get_current_user key='user_login'"]

    You could hide it using the new [dynamichidden] tag

  4. Drunkard100
    Posted 4 years ago #


    I was looking for the same thing. Worked like a charm! Great plugin btw. It saved me a grip of time. :)

  5. M Szatkowski
    Posted 3 years ago #

    @sevenspark fine, but we would rather have this user name or email address in the email body - not in the form :)

    Any ideas?

  6. sevenspark
    Plugin Author

    Posted 3 years ago #

    @motylanogha, if by "email body" you mean the actual text sent in the email, then yes, everything variable can be inserted there. If you mean the message textarea, then no - CF7 DTX works only with text and hidden inputs.

    So you could put the email/username in a hidden input if you like, e.g.:

    [dynamichidden user-email "CF7_get_current_user key='user_email'"]

    Then place the [user-email] tag in the CF7 message body to send it.

    You could not prepopulate the message textarea on the client side with this value, however.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7 Dynamic Text Extension
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic