• First of all thanks for the plugin, I believe its really one of the best free plugins for contact forms in Wrodpress.
    Have a question. I have this form on the page only for registered users, so in fact I already know who is on the page and will send me mail.
    So, is it possible to avoid field From and automatically include there mail from the registered user’s profile? Same for his name.

    Thank you for your answer in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter Vrefr

    (@vrefr)

    If there is no solution in the plugin, I found one not maybe the very correct but working.
    You can create text field with id for example “authoremail” within the plugin and pass registered user email to it on window onload. Smth like:

    <script type="text/javascript">
    <?php global $current_user;
          	get_currentuserinfo();
    	$useremail=$current_user->user_email;
    ?>
    
    window.onload = function() {
    var authoremail = document.getElementById("authoremail");
    authoremail.value = "<?php echo $useremail; ?>";
    }
    </script>

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Contact Form 7] include from: registered user mail’ is closed to new replies.