Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default verify form data

    Sorry, n00b question here. How do I verify form data? i.e. I have an html form
    that passes data to my insert statement, I want to verfiy that certain fields
    have been filled out on the form and return an error if they aren't. Thanks for
    any help!

    mkauspe Guest

  2. Similar Questions and Discussions

    1. Autopopulated form not displaying data in pdfunless the form field is clicked
      Within my online application, I have a pdf form that is auto generated and displayed to the user in the browser. My problem is that the populated...
    2. file upload form enctype="multipart/form-data
      I'm upload a file using cffile upload and that seems to work fine except I need to use enctype="multipart/form-data on the form side. This isn't a...
    3. Getting client file name from a submitted form usingmultipart/form-data
      Ive got a simple form with an type="file" -- all works fine, but what i want to do is get the extension of the file uploaded but not have to upload...
    4. mx 7 flash form The form data has expired, Please reloadthis page in your browser.
      When i first go to any flash form on my CFMX 7 server i get the following message. The form data has expired, Please reload this page in your...
    5. Have website login form check a forum database to verify registration
      I need help with having a Login Form on a website that goes to a member only section, to beable to check my forum database so that when people...
  3. #2

    Default Re: verify form data

    You can use the 'required' attribute of the fields you want the user to fill out.

    <cfform .............. required="yes" message="Please fill out">
    rmorgan Guest

  4. #3

    Default Re: verify form data

    On 2005-06-19 12:16:54 -0500, "mkauspe" <webforumsuser@macromedia.com> said:
    > Sorry, n00b question here. How do I verify form data? i.e. I have an
    > html form that passes data to my insert statement, I want to verfiy
    > that certain fields have been filled out on the form and return an
    > error if they aren't. Thanks for any help!
    This is generally done with a combination of Javascript on the client
    side (check out [url]http://www.javascriptkit.com[/url] for lots of samples and
    tutorials on form validation) and CF on the server side. Particularly
    if a database is involved, you absolutely can't rely on javascript
    alone doing everything for you, but it's a good first pass at the
    validation.

    Also as rmorgan pointed out you use cfform and cfinput with the
    required="yes" attribute in your cfinput tags. This essentially writes
    the javascript for you on the client side, or if you're using CFMX 7,
    there are new options (validateAt) that allow you specify validation on
    the client, server, or both.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139