WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Contact form with logged in username (11 posts)

  1. Elliot_Sowersby
    Member
    Posted 3 years ago #

    Hello,

    Is there a plugin I can download, or a code I can put on a page, in which allows me to have a custom contact form on my website, but for name it has there username on the website. I want the contact form to be only accessable when they are logged in as I need to track there username along with the details.

    It is for my gaming tournaments site; http://www.team-vanity.com/tournaments and the form will be to sign up, and I will need there usernames for future reference.

    So what I need:
    - Contact form.
    - Sends there username in the email when they are logged in.
    - I can edit the fields.

    If anyone can help, this would be much appreciated.

    Many thanks,
    Elliot.

  2. Elliot_Sowersby
    Member
    Posted 3 years ago #

    Help please?

  3. Mike Challis
    Member
    Posted 3 years ago #

    Fast Secure Contact Form has this feature
    http://wordpress.org/extend/plugins/si-contact-form/

    Install it and go into Advanced Options where the extra fields are.

    There is a setting "Enable auto form fill."
    Auto form fill email address and name (username) on the contact form for logged in users who are not administrators.

    Also the email footer will have the WP username in the footer details.

  4. Elliot_Sowersby
    Member
    Posted 3 years ago #

    Mike, thank you for the reply. Does it allow users to edit the username if they are logged in? If so I dont want it to.

    Ill take a look now.

  5. Elliot_Sowersby
    Member
    Posted 3 years ago #

    No it doesnt. I need one where it sends there username with the form, and they can not change it, unless they sign into a new account. Ill just make the page only viewable when logged in so thats not a problem, just need it so I can view there username and they cant change it.

    I found a plugin: Grunion Contact Form - http://wordpress.org/extend/plugins/grunion-contact-form - that displays there usename when logged in, but the changing of fields is very hard (Not possible) and just has 1 box: http://team-vanity.com/tournaments/aaaaasdasd213 (See there for test/example).

    Any idea's or other plugins?

  6. Mike Challis
    Member
    Posted 3 years ago #

    Yes, but they cannot edit the username that is sent in the email footer.

  7. Elliot_Sowersby
    Member
    Posted 3 years ago #

    I tested it and no username was in the footer?

  8. Elliot_Sowersby
    Member
    Posted 3 years ago #

    Theres got to be one like the grunion contact form but has more options? Theres so many contact forms but cant find one that matches my needs. Any help please?

  9. Mike Challis
    Member
    Posted 3 years ago #

    >I tested it and no username was in the footer?
    because it skips this for the admin

  10. Elliot_Sowersby
    Member
    Posted 3 years ago #

    Sorted, thanks alot for your support.

    What I did to fit my needs if anyone else would like to do the same:

    - Download, install and activate: http://wordpress.org/extend/plugins/si-contact-form/
    - Create the fields you would like in form 1, then save.
    - Download PHP Execution plugin: http://wordpress.org/extend/plugins/php-execution-plugin
    - Enter the following code into a page:

    <strong><span style="color: white;">Forum Username:</span> <span style="color: gold;"><?php global $current_user; if ( isset($current_user) ) { echo $current_user->user_login; } ?></span> (Please use this account for team updates)</strong>
    [si-contact-form form='1']

    - This will then display there username above the form, as well as the username sending in the form.
    - Go into Editing si-contact-form/si-contact-form-process.php
    - change the code to:

    [Huge chunk of code moderated as per the Forum Rules. Please use the pastebin]

    This will then send the form and username only in the email.

  11. Elliot_Sowersby
    Member
    Posted 3 years ago #

    Thread may now be closed, once again thank you for the support.

Topic Closed

This topic has been closed to new replies.

About this Topic