Announcement Announcement Module
Collapse
No announcement yet.
php email form - min. characters required? Page Title Module
Move Remove Collapse
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • php email form - min. characters required?

    #1
    I am using the well-known sendit.php file to email an online form. My goal is to obtain a person's full name. This form is used by existing clients and I would like to prevent them from entering initials in the name fields. I am aware nothing can prevent a client from typing random characters but thought setting a minimum of characters would persuade them to fill it out accurately.

    I have already set the first and last name fields as "required." Now I want to ensure that more than 3 characters are entered by the viewer. Any tips on how to do this?

    Thanks in advance!

  • #2
    I am not sure how to do this... but not sure you would want to.
    I actually know people whose legal name is only two letters... might be frustrating for them if they can't enter their name...

    Comment


    • #3
      I've never heard of sendit.php, but you know how to work with PHP you can use the strlen() function to check the length of a given string:

      PHP Code:
      $fname strlen($_POST['fname']);

      if (
      $fname 4)
      {
         
      //Code telling PHP what to do if the first name is less than 4 characters...

      I agree with Audentia that someone named Al or Sue would probably be very frustrated at not being able to enter their name (I have a friend whose legal name is Kim).

      Digi

      Comment


      • #4
        empty() is a more user friendly option. I wouldn't recommend a minimum length because as others have said it is possible to have a 2 or 3 character name. I don't think it would be bad though to check for more then 1 using strlen().
        Last edited by tZ; 08-21-2009, 11:20 PM.

        Comment


        • #5
          Yeah, don't be hatin on all the Bos and Eds

          Comment


          • #6
            I work with someone whose last name is Ng. He'd be unable to fill out your form properly.

            Comment


            • #7
              Lots of people wouldn't be able to use it.

              Tom, Tim, Jim, Pam, Kim, Joe, Jak, Wu, Mat.

              Comment


              • #8
                LOL! Thanks guys. I appreciate your feedback very much.

                Comment

                Google search Google search Module
                Collapse
                Latest Topics Latest Topics Module
                Collapse
                • skribe's Avatar
                  I just found a feature I had over looked on how to get to the last unread post in a thread. I give the solution at the following link.

                  http://www.graphicdesignforum.com/fo...44#post1513444
                • skribe's Avatar
                  I have had more time to explore the new forum features and will add a bit to this. After the results are loaded you will be presented with a list of posts that look like the graphic below with some icons...
                • PrintDriver's Avatar
                  As a printer, if I change a file for a design client, I know the color won't shift. But. If the design client sends an entirely new file, I check it to be sure the color won't shift. There are so many...
                • Kool's Avatar
                  Thanks to Scribe and Longboy we have a couple of pretty effective workarounds. First create a couple of new bookmarks/favorites in you browser toolbar. Then add the following links to your new bookmarks....
                • rdan173's Avatar
                  Commented to Another Drawing
                  Here are the screen shots of the outlines.



                  ...
                • rdan173's Avatar
                  Commented to Another Drawing
                  I think I am getting a bit better with the pen tool, but let me know if you see where I can improve? Also, if there are areas to improve the illustration style, thanks?...
                • TriplesYT's Avatar
                  This is something I made in my free time.

                  I'm not planning on going to art school or anything like that, but I still like drawing and designing, so I'm planning on doing it as a side thing....
                • garricks's Avatar
                  Jeez Louise, all this time later the West Wing can still make me tear up. Just watched S10E10, In Excelsis Deo. Toby uses the President's name to secure an honor guard for a homeless Korean conflict vet...
                All Creative World Network All Creative World Network Module
                Collapse
                WebMediaBrands
                Mediabistro | SemanticWeb | Inside Network
                Jobs | Education | Research | Events | News
                Advertise | Terms of Use | Privacy Policy
                Copyright WebMediaBrands Inc. All rights reserved.
                Working...
                X