WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. ssmk
    Member
    Posted 3 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?

    http://wordpress.org/extend/plugins/contact-form-7-dynamic-text-extension/

  2. Adam Capriola
    Member
    Posted 3 years ago #

  3. sevenspark
    Member
    Plugin Author

    Posted 3 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
    Member
    Posted 3 years ago #

    Awesome,

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

  5. M Szatkowski
    Member
    Posted 2 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
    Member
    Plugin Author

    Posted 2 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

About this Topic