Forums

Removing E-mail Required off my Comments (3 posts)

  1. Ziriux_Photos
    Member
    Posted 3 years ago #

    Hey guys, how do I remove the field where it asks for a required e-mail. Even when i make it the e-mail not to be required the field is still there. How do I get rid of it?

  2. Hotel Audit
    Member
    Posted 3 years ago #

    You should edit your comments.php which is in the directory of your used theme. If you take a look at on this file I'm sure you'll find something like this:

    "
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
    "
    Just removed these lines from you comments.php and saved. After you'll see that the E-mail address will be not requested anymore from your commentators.

    p.s.: before you do this or anything else you should create a security copy about the original comments.php file for your safety.

  3. jchthys
    Member
    Posted 2 years ago #

    Another option would be to replace the code Hotel Audit described with the following:

    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email"><small>Mail (will not be published)</small></label></p>

    What this does is still let the user leave their email address, but it's just not required.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.