1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Contact Form Error Message

Discussion in 'Web Design & Development' started by EspressoBean, May 12, 2017.

Thread Status:
Not open for further replies.
Advertisement
  1. EspressoBean

    EspressoBean Thread Starter

    Joined:
    Feb 29, 2016
    Messages:
    229
    I have a working contact form that uses validation.js for validation and PHP to actually send the email. Currently, error messages for empty required fields are displayed right next to the fields but I am looking to get the error messages setup at the top like so:

    [​IMG]

    Can someone help me out in changing this around so where the error messages in a block?

    Source Files

    index.html
    https://hastebin.com/suqocutevu.html

    custom.css
    https://hastebin.com/etiwiluguh.css

    contact.php
    https://hastebin.com/oqawukavor.php

    contact.js
    https://hastebin.com/akizohobal.js

    Test Link:
    http://contactform.x10host.com/
     
  2. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,003
    This div (at the top of the form):
    HTML:
                <div class="row">
                    <div class="col-md-12">
                        <div id="ValidationResults" class="alert alert-danger"   style="display: none;"  >
                            <strong>Validation Errors</strong></br />
                            <div class="validation-summary-valid" data-valmsg-summary="true">
                                <ul>
                                    <li style="display:none"></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
    
    ... should be postioning your error message block correctly.
    This code was taken from the 'Test Link' you provided, but looks nothing like your example above???
     
    Last edited: May 24, 2017
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1189848