2 Replies Latest reply on Oct 23, 2008 10:08 PM by fober1

    Form Validation CodeBase

      Hi all.

      I'm quite new to ColdFusion (about 3 weeks), and I just left a company that built a library of code that allowed designers to drag and drop form elements with pre-determined names, maxlengths, ids, etc. And their validation library took care of all the validation. I'm looking to create the same deal for my company, I've peeked into FlashForms, XML forms, using the onError method in the Application.cfc file. As well as using Dreamweaver Snippets (I'm new to DW too) that Developers can just drag-and-drop into place.

      I was leaning towards using pre-built snippets for each form element (email, address, firstName, lastName, phone, fax, etc) which all follow a specific naming convention and create my validation libraries based on the naming conventions. I feel like I'd be wasting my time with everything that's out there already, but I'm concerned about killing too much time going in one direction that may lead to a dead end. I was hoping to find someone who might be inclined to point me in what they think is the best direction to go in, to create our own self-validating Forms library with the ability for a programmer to add in custom validation for those tricky form request. :)

      Thanks. Sorry this post was so long... any help is appreciated. ;)
        • 1. Re: Form Validation CodeBase
          Level 1
          Ok. So, basically what I've decided to do is just forge ahead and just re-build all the form objects (with standard width's/heights, names, etc), create a Validation object, and Error display object, However, not just regular form objects, but commonly used ones like: email, firstName, lastName, as well as Name (which extends the aforementions first/last name), date (mm-dd-yyyy), etc etc....

          All form elment tags will allow for additional custom validation that a programmer would have to jump in for. (Again, I want to create this for designers, so this is just for those very strange instances we run into in form validation.

          The new form tags will register themselves with the validator which will pull everything in order as they appear. The Error display object will take info from the validator and display it above/below the form elements.

          I'm thinking I'll end up packaging these up as Snippets at first and maybe migrate them over to Dreamweaver Extensions later and provide a nice little interface for Designers to use.

          If anyone has any recommendations or think I need to be steered in another direction, I would love to hear form you. Thanks.
          • 2. Re: Form Validation CodeBase
            fober1 Level 1
            Hi,

            You may want to have a look at a legal web forum too, to make sure you don't run into any issue regarding copyright-, intellectual property, or trade-secret laws (especially that one).

            It seems you were an employee at that company not just an external contractor, and in this situation you need to be really careful as individuals are usually not very well protected. Depending on the contract and your position, the company may even own any line of code you have developed Saturday at midnight on your home computer.

            I would also expect most CF developers have their own library of user interface components that they use. I certainly have my library that I always use.

            cheers,
            fober