WordPress.org

Ready to get started?Download WordPress

Forums

Required Field Issue, Contact Form 7 (4 posts)

  1. roybenjey
    Member
    Posted 3 years ago #

    I've been using this plugin for awhile and haven't had any issues, say one. The only required field that seems to work is email*. Any other text or textarea that I make text* or textarea* won't act as a required field. For example, if I make three text fields required as well as the email field, the user can just enter their e-mail and successfully send a blank form (even though there are other required fields).

    Anyone know how to fix this?

  2. katethompson
    Member
    Posted 3 years ago #

    this has worked for me: Insert a * after field type

    <fieldset>
    *required field
    <div class="row"><label for="inp1">Full Name* </label>[text* name id:inp1 class:text]</div>
    <div class="row"><label for="inp2">Organization</label>[text Organization id:inp2 class:text]</div>
    <div class="row"><label for="inp3">Email Address*</label>[email* E-Mail-Address id:inp3 class:text]</div>
    <div class="row"><label for="inp4">Telephone</label>[text Telephone id:inp4 class:text]</div><div class="row"><label for="area">Message</label>[textarea Message 30x10 id:area class:area]</div>[submit class:btn-send "send"]</fieldset>

  3. roybenjey
    Member
    Posted 3 years ago #

    I did that. But it doesn't seem to work with anything other than the email*. Meaning, I can only get email* to behave as a required field. text* or textarea* doesn't seem to do anything.

  4. katethompson
    Member
    Posted 3 years ago #

    weird. I get the normal error dialog if user doesn't fill in Name. Maybe some sort of override in another part of your code... good luck. hopefully smarter bulbs than I can weigh in.

Topic Closed

This topic has been closed to new replies.

About this Topic