Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    looking for making messaging fields required. Please Help

    Hey guys. I am a complete noob to html and had someone else do my website that is no longer available to help.
    where and what do i need to do to make the four fields required to submit messages? and is there a way to possibly have a notification if they fail to enter all fields and add a addition captcha to this. i greatly appreciate anything y'all can do to help me

    my coding looks like this

    [code]
    <tr>
    <td>
    <font face="calibri" color="#FFFFFF">
    Your Name:
    </font>
    </td>
    <td valign="top" rowspan="10">
    <table>
    <tr>
    <td>
    <font face="calibri" color="#FFFFFF">
    Message:
    </font>
    </td>
    </tr>
    <tr>
    <td>
    <textarea rows="10" cols="30" name="message"></textarea>
    </td>
    </tr>
    </table>
    </td>
    </tr>

    <tr>
    <td>
    <input type="text" size ="30" name="name">
    </td>
    </tr>
    <tr>
    <td>
    <font face="calibri" color="#FFFFFF">
    Your E-Mail:
    </font>
    </td>
    </tr>
    <tr>
    <td>
    <input type="text" size ="30" name="email_address">
    </td>
    </tr>
    <tr>
    <td>
    <font face="calibri" color="#FFFFFF">
    Phone Number:
    </font>
    </td>
    </tr>
    <tr>
    <td>
    <input type="text" size ="30" name="subject">
    </td>
    </tr>
    <tr>
    <td colspan="10">
    <input type="submit" name="send_message" value="Send Message!">
    </form>
    </td>
    </tr>
    </table>
    </td>
    <td valign="top">
    <table>
    <tr>
    <td width="10">
    </td>
    <td>
    <table>
    <tr>
    <td valign="top">
    [code/]

  • #2
    New Coder
    Join Date
    Feb 2012
    Posts
    18
    Thanks
    0
    Thanked 1 Time in 1 Post
    You can enforce this using javascript to check if the fields are filled and if not display a custom message and prevent form from being submitted.

    If you need more than just explanation then post the whole code for your form and we will help you further.

    Also your code is out of shape, try to rewrite it so it meets today's standards.

    Regards
    Mahdi Eftekhari


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •