Skip to:
Content
Pages
Categories
Search
Top
Bottom

Anonymous posting fields


  • prokops
    Participant

    @prokops

    Hello!

    When my users post to my forum, the forum asks them to fill in:

    Name (required)
    Mail (required)
    Website (optional)

    I would like to change this to:
    Name (required)
    Membership Nr (required)

    Can this be done and how? If email field is a must-have, then I would like to add the Membership field as the 3rd required field.

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)

  • Robin W
    Moderator

    @robin-w

    you’d need to amend

    \bbpress\templates\default\bbpress\form-anonymous.php


    prokops
    Participant

    @prokops

    I can delete the email field in the file you specify. But the forum still tries to validate and thus gives me an “ERROR: Invalid email address.”

    How to define what to validate and disable email field validation?

    Cheers


    Robin W
    Moderator

    @robin-w

    change

    <p>
    			<label for="bbp_anonymous_email"><?php esc_html_e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br />
    			<input type="text" id="bbp_anonymous_email"   value="<?php bbp_author_email(); ?>" size="40" maxlength="100" name="bbp_anonymous_email" />
    		</p>

    to

    <input type="hidden" id="bbp_anonymous_email" value="anon@anon.com" name="bbp_anonymous_email" />

    that just makes all entries anon@anon.com, so it passes the email format check


    prokops
    Participant

    @prokops

    It would do the trick but it is not the best solution :/
    I will try to develop an submission verification based on user custom field.


    Robin W
    Moderator

    @robin-w

    have fun

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar