WebAssist Form Validation Toolkit extension

Hi everybody:
I use WebAssist Form Validation Toolkit extension to validate
my forms but any time I set everything in its wizard and I press OK
the following error occurs: While executing onClick in
WAFV_Server.htm, a JavaScript error occured.
I tested it with dreamweaver 8 and dreamweaver mx 2004 both
and the same error occured.
The webassist validation toolkit extension version is 2.00.
Please help me solve the problem. It is very critical for me.
thanks
Benign

I use it all the time with 8.0.2 :-)
Dave Buchholz
I-CRE8
www.i-cre8.co.uk
Skype ID: I-CRE8
"Murray *ACE*" <[email protected]> wrote
in message
news:efqs2s$h9p$[email protected]..
I have just used it on 8.0.2 with no problems.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Mark Fletcher *Adobe Community Expert*"
<[email protected]> wrote in
message news:efqi7n$78c$[email protected]..
> Hello Bengin,
>
> If upgrading to the latest version of the Validation
Toolkit does not
> solve your problems, please contact me off-list
>
> Thanks to both Dave and Murray for helping out here.
>
> Regards,
> Mark
> ----------------------------------
> Mark Fletcher
> WebAssist.com
> Email: [email protected]
> ----------------------------------
>
> Benign wrote:
>> Hi everybody:
>> I use WebAssist Form Validation Toolkit extension to
validate my forms
>> but any time I set everything in its wizard and I
press OK the following
>> error occurs: While executing onClick in
WAFV_Server.htm, a JavaScript
>> error occured.
>> I tested it with dreamweaver 8 and dreamweaver mx
2004 both and the same
>> error occured.
>> The webassist validation toolkit extension version
is 2.00.
>> Please help me solve the problem. It is very
critical for me.
>> thanks
>> Benign
>>

Similar Messages

  • Form Validation against database - Dreamweaver CS4 Spry

    Hi all,
    I'm trying to figure out how to implement a form validation
    of some fields, let's say a username. I have a form that inserts on
    MySQL table, and when the user is typing the username, after it
    looses the focus on field, validate it if there is a record on
    table with the specified username. If so, validation will fail.
    I already saw something similar with this on Dreamweaver MX
    using some extension (because at that time, it did not support
    ajax).
    Kind regards, and thanks in advance.

    I don't have a solution, but you may try posting in the Spry
    Forums, you might get a better response.
    http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602

  • Important form validation regression

    Hi,
    Using ADF Faces/Trinidad + ADF Data Bindings + ADF Business Components.
    I was experimenting with task flows vs transaction control vs form validation and met an important regression in 11G.
    To reproduce, build a simple form with a commit button. Make sure one of the field displayed in the form is bound to an entity attribute with a simple validation (like a length validation). Run the form (edit a row) and follow these steps:
    1- Edit the field value mentioned above and make sure the value will fail the validation;
    2- Press the commit button;
    3- Server returns an error message;
    4- DON'T fix the error, but modify another field value and make sure the value will pass the validations;
    5- Press the commit button;
    6- Server does not return an error. Commit is successful. Value in error is rollbacked to the original value?!?!?!?!?!??
    Reproduced with two applications. The first one was built from scratch with 11G. The second one was built in 10.1.3.3 and migrated to 11G. For your information, in 10G it worked perfectly!
    Thanx!
    Olivier

    Please email me a 10.1.3 sample application (removing the adf-faces-impl.jar and jsf-impl.jar) to keep the size down. Thanks. ([email protected])
    Please make your file be a *.jar or *.zipp extension since our email rejects *.zip files.
    Also, it would be helpful if you include a URL to this forum posting in your email for back-reference.

  • Safari 5.1.1 is not recognizing my html5 form validation "required".

    Safari 5.1.1 is not recognizing my html5 form validation "required". I've tried writing it several different ways with no luck. The "placeholder" validator does work. It works fine with Firefox. Help!

    When I reset safari I have everything checked. It does not hurt anything. What you did was one of the fixes I saw, The other was to not use tabs in safari. The reason I asked you to go to extension in safari preferences is to see if you had adware hiding in there. Apparently  you are not the only one using gmail that runs into this. You could go to you home folder/library/preferences and delete ether the safari plist. or the mail plist. I don't know which would control gmail. But the next time you open those apps the preferences recreate themselves. Some people set up their mail account in mac as gmail. The only think is the incoming is an imap instead of pop. And you are right, there is no update for safari. you would have to update your operating system. I run snow leopard to. My daughter runs yosemite, If I were to go to yosemite,I would have to delete a couple of apps as they will not run there.

  • Tabular Form Validation not working in tabular form APEX 4.0

    Hi,
    I am using APEX 4.0. I have a tabular form with Tabular form validation done with it.
    Item not null is the validation.. so if I dont type any value in the any of the fields in the tabular form and press the Submit button, the first time error is shown... but when I click the Submit button again, with still the empty rows the page is submitted.
    How to resolve this issue?
    Edited by: Suzi on Oct 5, 2010 11:13 AM

    Look at this thread - Re: Validations of tabular forms in 4.0

  • Is there a way to bypass the form Validation

    I'm getting really upset with the Coldfusion built-in form validation for any HTML formfield ending by _date , _required, _time and so on...
    My application proposes to the users to create some Properties for an object and later on to modify the values for all these properties.
    I've got a piece of code building dynamically some form fields named just like the properties (by a simple cfloop on a DB query getting the property list).
    And a registering page to records the new value in the DB.
    But it crashes onto the classical "
    Form entries are incomplete or invalid.
    I can't control what the users set as property name (one of them was Checklist_required).
    Is there any way to prevent this error by disabling this auto validation ?
    (I'd like to avoid having to rename any field dynamically created and rename any forms variables before registering them on the DB : it's just NO WAY for me to rename the properties created by the users)

    Fober1, that's not how it works.  It's pretty much the ultimate example of the disjoint between how HTML forms work and how the naive CFML Cfform / cfinput design wished they work.
    When a request is being processed by the coldfusion server, it just looks at the list of FORM (POST) variable names (whether it came from cfform or not; URL/GET params are exempt), and for those with certain suffixes (_date, _required, etc.), and it assumes their existence is intended to request validation another field without that suffix.  It doesn't actually know or care whether form submission, nor the HTML rendered in the user's browser, actually came from "cfform" or "cfinput".   The composition of the request that comes in (when a user clicks on "submit", or a hacker uses any tool imaginable) is out of the server's hands.  The cfform code is not used during form submission processing, because the receiving template (the form action="this_one.cfm") doesn't even have to be the same template that has the cfform in it. There could be multiple conflicting cfforms directing users to request the same template on a single site, with or without the validation, even without considering what a whole other person might decide to send to your server.
    The fact that it can work as intended for a typical user is irrelevant, because the purpose of validation is to deal with the atypical situation.  A malicious or merely mischievous user that wanted to circumvent the validation would simply modify a copy of the page to leave out the "validation request" fields.    For the developer to truly validate the input, additional code must be written, making the feature not only inadequate, but a complete waste of time.  There absolutely should be a way to disable it at worst; Ideally, it would be taken out of coldfusion completely.  It's not only useless, it's a security risk, wooing programmers to write code that doesn't do what they think it does.
    The error message it gives isn't so great, either, and it's a pity that it can't show more than one validation message at a time, either.  If more than one input is invalid, you could end up going through one round after another of submit + back button.
    edit: I forgot to add the other important reason that this feature should never have existed: It is a nuisance to everyone else who doesn't want to use it at all, too!  Those suffixes simply couldn't have been a worse choice, colliding with probably thousands of peoples' variable names.  Why not "*_cfval_date" "*_cfval_time" etc?

  • Form validation working on one page, but not the other....

    Hope someone can help with this.
    I have a page below with a load of contact forms which all work fine :
    http://www.goodsafariguide.com/judges/judges.php
    I've trued to recreate (admittedly mostly by saving as....) the same functionality here :
    http://www.goodsafariguide.com/awardssite/judges/
    They do work when fulled in correctly, but there's a glitch with the validation.
    Basically when you fill in a form incorrectly, the page reloads, with the form's accordion closed. When you open it up, its showing the ugly looking error at the top of the form.
    Any ideas what's causing it to act like this, as opposed to the way it works in the first link?
    Thanks.

    Iain71 wrote:
    I've trued to recreate (admittedly mostly by saving as....) the same functionality here :
    http://www.goodsafariguide.com/awardssite/judges/
    They do work when fulled in correctly, but there's a glitch with the validation.
    When looking at the source code I note that - unlike the first page - this one doesn´t contain any references to the ADDT form validation libraries ("../includes/tng/scripts/FormValidation.js" and "../includes/tng/scripts/FormValidation.js.php"), meaning that the validation can´t work.
    Cheers,
    Günter

  • What is your strategy for form validation when using MVC pattern?

    This is more of a general discussion topic and will not necessarily have a correct answer. I'm using some of the Flex validator components in order to do form validation, but it seems I'm always coming back to the same issue, which is that in the world of Flex, validation needs to be put in the view components since in order to show error messages you need to set the source property of the validator to an instance of a view component. This again in my case seems to lead to me duplicating the code for setting up my Validators into several views. But, in terms of the MVC pattern, I always thought that data validation should happen in the model, since whether or not a piece of data is valid might be depending on business rules, which again should be stored in the model. Also, this way you'd only need to write the validation rules once for all fields that contain the same type of information in your application.
    So my question is, what strategies do you use when validating data and using an MVC framework? Do you create all the validators in the views and just duplicate the validator if the exact same rules are needed in some other view, or do you store the validators in the model and somehow reference them from the views, changing the source properties as needed? Or do you use some completely different strategy for validating forms and showing error messages to the user?

    Thanks for your answer, JoshBeall. Just to clarify, you would basically create a subclass of e.g. TextInput and add the validation rules to that? Then you'd use your subclass when you need a textinput with validation?
    Anyway, I ended up building sort of my own validation framework. Because the other issue I had with the standard validation was that it relies on inheritance instead of composition. Say I needed a TextInput to both check that it doesn't contain an empty string or just space characters, is between 4 and 100 characters long, and follows a certain pattern (e.g. allows only alphanumerical characters). With the Flex built in validators I would have to create a subclass or my own validator in order to meet all the requirements and if at some point I need another configuration (say just a length and pattern restriction) I would have to create another subclass which duplicates most of the rules, or I would have to build a lot of flags and conditional statements into that one subclass. With the framework I created I can just string together different rules using composition, and the filter classes themselves can be kept very simple since they only need to handle a single condition (check the string length for instance). E.g. below is the rule for my username:
    library["user_name"] = new EmptyStringFilter( new StringLengthFilter(4,255, new RegExpFilter(/^[a-z0-9\-@\._]+$/i) ) );
    <code>library</code> is a Dictionary that contains all my validation rules, and which resides in the model in a ValidationManager class. The framework calls a method <code>validate</code> on the stored filter references which goes through all the filters, the first filter to fail returns an error message and the validation fails:
    (library["user_name"] as IValidationFilter).validate("testuser");
    I only need to setup the rule once for each property I want to validate, regardless where in the app the validation needs to happen. The biggest plus of course that I can be sure the same rules are applied every time I need to validate e.g. a username.
    The second part of the framework basically relies on Chris Callendar's great ErrorTipManager class and a custom subclass of spark.components.Panel (in my case it seemed like the reasonable place to put the code needed, although perhaps extending Form would be even better). ErrorTipManager allows you to force open a error tooltip on a target component easily. The subclass I've created basically allows me to just extend the class whenever I need a form and pass in an array of inputs that I want to validate in the creationComplete handler:
    validatableInputs = [{source:productName, validateAs:"product_name"},
                         {source:unitWeight, validateAs:"unit_weight", dataField:"value"},
                   {source:unitsPerBox, validateAs:"units_per_box", dataField:"value"},
                        {source:producer, validateAs:"producer"}];
    The final step is to add a focusOut handler on the inputs that I want to validate if I want the validation to happen right away. The handler just calls a validateForm method, which in turn iterates through each of the inputs in the validatableInputs array, passing a reference of the input to a suitable validation rule in the model (a reference to the model has been injected into the view for this).
    Having written this down I could probably improve the View side of things a bit, remove the dependency on the Panel component and make the API easier (have the framework wire up more of the boilerplate like adding listeners etc). But for now the code does what it needs to.

  • Script for Form validator in head causes error

    When I use the Window/Behaveiors/ to create a form validator, Dreamweaver CS5 puts script in the Head of page, and seems to work ok. But when I validate page with W3c it says there are errors with code and as Dreamweaver created this I have no idea what to do to put right, so could someone please help. This is code generated by Dreamweaver, all other pages have past with flying colors!
    <script type="text/javascript">
    function MM_validateForm() { //v4.0
      if (document.getElementById){
        var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
        for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
          if (val) { nm=val.name; if ((val=val.value)!="") {
            if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
              if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
            } else if (test!='R') { num = parseFloat(val);
              if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
              if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
                min=test.substring(8,p); max=test.substring(p+1);
                if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
          } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
        } if (errors) alert('The following error(s) occurred:\n'+errors);
        document.MM_returnValue = (errors == '');
    </script>

    If the script is working fine in all browsers, you could put it in an external JS file and link to it, then the W3C validator won't find an error.
    If you don't know already, learn about how to do this:
    http://www.hypergurl.com/jsfiles.html

  • Submit by email not working as form validation failed.

    Ive created a form with mulitple pages. Three pages require form validation.
    Each page is a unique process so I'm trying to use the "Submit button" to only submit that
    particular page. I've created dummy fields as defaults to cure the validation problem but
    can't seem to get the e-mail button to work. I also created a email dummy button with the
    scripting:
    EmailSubmitButton.execEvent("click");
    I did this to try to force the the form to be sumitted via PDF. I am a novice at this so please
    help. I'd be happy to send the form as well for review

    You may need to enable usage rights in your form. You must have version 8 to do this. Open the form in Acrobat Pro (not Livecycle), click on Advanced tab, then select "enable usage rights in Adobe Reader"

  • Form Validations

    How to perform form validations in ADF. And also can i customize the behaviour of "Required" property of a UIComponent? I dont want alert boxes to be shown Can i change that?

    you might want to think about using one of the popup LOV item types for your employee ID field. popup LOVs are great for cases where you don't want to weigh your page down w/large lists of values. about your validation, if you really want to do it client-side, then javascript's probably the way to go (search google for code). if you do that, though, let the record show that you'd have to fetch your valid values down to your page for your comparison logic, anyhow. i'd consider using a regular htmldb validation for your emp id field. you seemed concerned in your post with the page submission. i'm assuming that's because you didn't want processing to occur unless the validation passes. if that's the case, fear not, it's a simple matter to set your processing to occur only after your validations have passed. check out the available "Process Point"s and "Computation Point"s for htmldb Processes and Computations to see what i mean.
    hope this helps,
    raj

  • PHP Form Validation and Radio Group

    Hi David,
    I'm trying to set the initial state of a radio group to none.
    Please look at the file http://ecopethandbags.com/contact.php. The initial state is set to "No"
    In Dreamweaver, I've set the initial state to "Unchecked"
    I don't understand the code for the radio buttons in my file (see attachment).
    What I am trying to do is to have the radio group initially unchecked but required.
    I have 2 questions:
    1) - How can I control the initial status of the radio group when I use the PHP form validation?
    2) - How can I set the validation so, when one of the radio buttons is not checked by the user, a warning flag like "Please make a choice" comes up.
    Thank you much!

    Just change the following section of code:
    <?php
    if (!$_POST || isset($missing) && $_POST['subscribe'] == 'n') {
      echo 'checked="checked"';
    } ?>
    Remove the !$_POST || like this:
    <?php
    if (isset($missing) && $_POST['subscribe'] == 'n') {
      echo 'checked="checked"';
    } ?>
    The checked="checked" will be inserted into the code only if the form has been submitted, but neither radio button has been selected.

  • David Powers --- Regarding form validation with dreamweaver behaviors

    I am in the chapter teaching about form validation with the Zend Framework. I have done the entire lesson with the lesson files and everything works perfectly...
    but I went back to use the form valdation techniques for my own site and it is not working properly. In the book, Chapter 6 teaches how to create a user login and editing the database through the site. But in chapter seven the form validation does not build on top of this and therefore does not teach how to integrate the form validation with the registered user already set up.
    I have user registration completly working on my site and everything runs fine. I am trying to add the form validation but it is all completly ignored. When I leave a field blank it simply takes me to another blank page that reads "Column 'first_name' cannot be null"
    here is index.php code...
    <?php require_once('Connections/CSSU_Write.php'); ?>
    <?php require_once('Connections/CSSU_Read.php'); ?>
    <?php require_once('script/user_registration.php');
    ?>
    <?php
    if (isset($_POST['password'])) {
              $_POST['password'] = sha1($_POST['password']);
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO sign_up (first_name, family_name, user_email, password, gender, bday_month, bday_day, bday_year) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['first_name'], "text"),
                           GetSQLValueString($_POST['last_name'], "text"),
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['password'], "text"),
                           GetSQLValueString($_POST['gender'], "text"),
                           GetSQLValueString($_POST['bday_month'], "text"),
                           GetSQLValueString($_POST['bday_day'], "text"),
                           GetSQLValueString($_POST['bday_year'], "text"));
      mysql_select_db($database_CSSU_Write, $CSSU_Write);
      $Result1 = mysql_query($insertSQL, $CSSU_Write) or die(mysql_error());
      $insertGoTo = "login.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['email'])) {
      $loginUsername=$_POST['email'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "logoOutRedirect.php";
      $MM_redirectLoginFailed = "logoOutRedirect.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_CSSU_Write, $CSSU_Write);
      $LoginRS__query=sprintf("SELECT user_email, password FROM sign_up WHERE user_email=%s AND password=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $CSSU_Write) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
              if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;               
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>CSSU</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div class="container">
      <div class="header">
      <div class="logo">
                <a href="index.php">
                  <h1/>
            .CSSU { UNIVERSITY; }
            </h1>
            <h2>
            <code><<code>!</code>-- Learn/Apply/Master --></code>
            </h2>
        </a>
      </div> 
        <!-- end .header --></div>
        <div class="headerBar">
        <div id="nav">
                  <ul id="links">
                      <a href="#"><li>CSSU</li></a>
                      <a href="#"><li>Classes</li></a>
                      <a href="#"><li>Pricing</li></a>
                      <a href="#"><li>Degree</li></a>
                  </ul>
        </div>
        <form name="form2" method="POST" action="<?php echo $loginFormAction; ?>" class="form2">
        <p>
            <label for="email" id="email" class="loginLabel">Email:</label>
            <input type="email" name="email" class="loginField" />
            <label for="password" id="password" class="loginLabel">Password:</label>
            <input type="password" name="password" class="loginField" />
                  <input type="submit" value="Log In" name="submit" class="submit login" />
        </p>
        </form>
        </div>
      <div class="container2">
      <div class="sidebar1">
        <h1>Sign Up</h1>
        <h2>Earn an Official CSS Masters Certification!</h2>
        <table>
        <form name="form1" method="POST" action="<?php echo $editFormAction; ?>" class="form1">
        <tr >
            <td class="formLabel"><label for="firstName" id="firstNameLabel" >First Name:</label>
                      <span>
                         <?php
                                  if ($_POST && isset($errors['first_name'])) {
                                            echo $errors['first_name'];
                                  ?>
                </span>
            </td>
            <td><input type="text" name="first_name" class="inputField" id="firstName" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="lastName" id="lastName" >Last Name:</label></td>
            <td><input type="text" name="last_name" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="yourEmail" id="yourEmail" >Your Email:</label></td>
            <td><input type="user_email" name="email" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="yourEmail2" id="yourEmail2">Re-enter Email:</label></td>
            <td><input type="email" name="reEnter_email" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="password" id="password">New Password:</label></td>
            <td><input type="password" name="password" class="inputField" /></td>
        </tr>   
        <tr>
            <td class="formLabel"><label for="gender" id="gender" class="formLabel">I am:</label></td>
          <td><select name="gender" class="selectMenu selectMenu1 gender">
              <option value="select">Select Sex:</option>
              <option value="male" name="male">Male</option>
              <option value="female" name="female">Female</option>
                        </select>
          </td>
              </tr>
               <tr>
            <td class="formLabel"><label for="bday">Birthday:</label></td>
               <td>
            <select name="bday_month" class="selectMenu selectMenu1 bday">
              <option value="male">Month:</option>
              <option value="January">January</option>
            </select>
    <select name="bday_day" class="selectMenu bday">
              <option value="Day">Day:</option>
              <option value="1">1</option>
                        </select>
    <select name="bday_year" class="selectMenu bday">
              <option value="Year">Year:</option>
            </select>
         </td>
        </tr>
        <tr>
                  <td class="submitTd" colspan="2"><input type="submit" value="Sign Up" name="submit" class="submit signup" /><td>
        </tr>
        <input type="hidden" name="MM_insert" value="form1" />
        </form>
        </table>
        <!-- end .sidebar1 --></div>
      <div class="content">
        <h1>CSSU</h1>
        <!-- end .content --></div>
      <div class="footer">
        <!-- end .footer --></div>
        </div> <!-- end container2 -->
      <!-- end .container --></div>
    </body>
    </html>
    And here is user_registration.php code just for the first_name field...
    <?php
    $errors = array();
    if ($_POST) {
      // run the validation script
      require_once('library.php');
      try {
              // main script goes here
              $val = new Zend_Validate_Regex('/^[a-z]+[-\'a-z ]+$/i');
              if (!$val->isValid($_POST['first_name'])) {
                $errors['first_name'] = 'Required field, no numbers';
      } catch (Exception $e) {
              echo $e->getMessage();
    And from here, here is the library.php code....
    <?php
    $library = '.../html/zend/library';
    set_include_path(get_include_path() . PATH_SEPARATOR . $library);
    require_once('Zend/Loader/Autoloader.php');
    try {
    Zend_Loader_Autoloader::getInstance();
      $write = array('host'     => 'hostname',
                                             'username' => 'cssu',
                                             'password' => 'password',
                                             'dbname'   => 'cssu');
      $read  = array('host'     => 'hostname',
                                             'username' => 'cssu',
                                             'password' => 'password',
                                             'dbname'   => 'cssu');
      // Comment out the next two lines if using mysqli
      // and remove the comments from the last two lines
      $dbWrite = new Zend_Db_Adapter_Pdo_Mysql($write);
      $dbRead = new Zend_Db_Adapter_Pdo_Mysql($read);
      //$dbWrite = new Zend_Db_Adapter_Mysqli($write);
      //$dbRead = new Zend_Db_Adapter_Mysqli($read);
    } catch (Exception $e) {
              echo $e->getMessage();
    I replaced some code here to protect myself, but the library.php file is completely functional and has been tested... I am sure the problem ins't in here.
    Please let me know if you need any further code to help you out. I am brand new to PHP and so far everything has ran smoothly up til now. I have my Zend Framework uploaded to my server and tested that my site is connecting to it properly. Any help on this would be so so awesome! This is for a school project and I can't move on until this is resolved! Thank you so much for trying!
    You can also view the issue at my website... all the files have been uploaded to the server. www.CSSU.com

    I am in the chapter teaching about form validation with the Zend Framework. I have done the entire lesson with the lesson files and everything works perfectly...
    but I went back to use the form valdation techniques for my own site and it is not working properly. In the book, Chapter 6 teaches how to create a user login and editing the database through the site. But in chapter seven the form validation does not build on top of this and therefore does not teach how to integrate the form validation with the registered user already set up.
    I have user registration completly working on my site and everything runs fine. I am trying to add the form validation but it is all completly ignored. When I leave a field blank it simply takes me to another blank page that reads "Column 'first_name' cannot be null"
    here is index.php code...
    <?php require_once('Connections/CSSU_Write.php'); ?>
    <?php require_once('Connections/CSSU_Read.php'); ?>
    <?php require_once('script/user_registration.php');
    ?>
    <?php
    if (isset($_POST['password'])) {
              $_POST['password'] = sha1($_POST['password']);
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO sign_up (first_name, family_name, user_email, password, gender, bday_month, bday_day, bday_year) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['first_name'], "text"),
                           GetSQLValueString($_POST['last_name'], "text"),
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['password'], "text"),
                           GetSQLValueString($_POST['gender'], "text"),
                           GetSQLValueString($_POST['bday_month'], "text"),
                           GetSQLValueString($_POST['bday_day'], "text"),
                           GetSQLValueString($_POST['bday_year'], "text"));
      mysql_select_db($database_CSSU_Write, $CSSU_Write);
      $Result1 = mysql_query($insertSQL, $CSSU_Write) or die(mysql_error());
      $insertGoTo = "login.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['email'])) {
      $loginUsername=$_POST['email'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "logoOutRedirect.php";
      $MM_redirectLoginFailed = "logoOutRedirect.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_CSSU_Write, $CSSU_Write);
      $LoginRS__query=sprintf("SELECT user_email, password FROM sign_up WHERE user_email=%s AND password=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $CSSU_Write) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
              if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;               
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>CSSU</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div class="container">
      <div class="header">
      <div class="logo">
                <a href="index.php">
                  <h1/>
            .CSSU { UNIVERSITY; }
            </h1>
            <h2>
            <code><<code>!</code>-- Learn/Apply/Master --></code>
            </h2>
        </a>
      </div> 
        <!-- end .header --></div>
        <div class="headerBar">
        <div id="nav">
                  <ul id="links">
                      <a href="#"><li>CSSU</li></a>
                      <a href="#"><li>Classes</li></a>
                      <a href="#"><li>Pricing</li></a>
                      <a href="#"><li>Degree</li></a>
                  </ul>
        </div>
        <form name="form2" method="POST" action="<?php echo $loginFormAction; ?>" class="form2">
        <p>
            <label for="email" id="email" class="loginLabel">Email:</label>
            <input type="email" name="email" class="loginField" />
            <label for="password" id="password" class="loginLabel">Password:</label>
            <input type="password" name="password" class="loginField" />
                  <input type="submit" value="Log In" name="submit" class="submit login" />
        </p>
        </form>
        </div>
      <div class="container2">
      <div class="sidebar1">
        <h1>Sign Up</h1>
        <h2>Earn an Official CSS Masters Certification!</h2>
        <table>
        <form name="form1" method="POST" action="<?php echo $editFormAction; ?>" class="form1">
        <tr >
            <td class="formLabel"><label for="firstName" id="firstNameLabel" >First Name:</label>
                      <span>
                         <?php
                                  if ($_POST && isset($errors['first_name'])) {
                                            echo $errors['first_name'];
                                  ?>
                </span>
            </td>
            <td><input type="text" name="first_name" class="inputField" id="firstName" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="lastName" id="lastName" >Last Name:</label></td>
            <td><input type="text" name="last_name" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="yourEmail" id="yourEmail" >Your Email:</label></td>
            <td><input type="user_email" name="email" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="yourEmail2" id="yourEmail2">Re-enter Email:</label></td>
            <td><input type="email" name="reEnter_email" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="password" id="password">New Password:</label></td>
            <td><input type="password" name="password" class="inputField" /></td>
        </tr>   
        <tr>
            <td class="formLabel"><label for="gender" id="gender" class="formLabel">I am:</label></td>
          <td><select name="gender" class="selectMenu selectMenu1 gender">
              <option value="select">Select Sex:</option>
              <option value="male" name="male">Male</option>
              <option value="female" name="female">Female</option>
                        </select>
          </td>
              </tr>
               <tr>
            <td class="formLabel"><label for="bday">Birthday:</label></td>
               <td>
            <select name="bday_month" class="selectMenu selectMenu1 bday">
              <option value="male">Month:</option>
              <option value="January">January</option>
            </select>
    <select name="bday_day" class="selectMenu bday">
              <option value="Day">Day:</option>
              <option value="1">1</option>
                        </select>
    <select name="bday_year" class="selectMenu bday">
              <option value="Year">Year:</option>
            </select>
         </td>
        </tr>
        <tr>
                  <td class="submitTd" colspan="2"><input type="submit" value="Sign Up" name="submit" class="submit signup" /><td>
        </tr>
        <input type="hidden" name="MM_insert" value="form1" />
        </form>
        </table>
        <!-- end .sidebar1 --></div>
      <div class="content">
        <h1>CSSU</h1>
        <!-- end .content --></div>
      <div class="footer">
        <!-- end .footer --></div>
        </div> <!-- end container2 -->
      <!-- end .container --></div>
    </body>
    </html>
    And here is user_registration.php code just for the first_name field...
    <?php
    $errors = array();
    if ($_POST) {
      // run the validation script
      require_once('library.php');
      try {
              // main script goes here
              $val = new Zend_Validate_Regex('/^[a-z]+[-\'a-z ]+$/i');
              if (!$val->isValid($_POST['first_name'])) {
                $errors['first_name'] = 'Required field, no numbers';
      } catch (Exception $e) {
              echo $e->getMessage();
    And from here, here is the library.php code....
    <?php
    $library = '.../html/zend/library';
    set_include_path(get_include_path() . PATH_SEPARATOR . $library);
    require_once('Zend/Loader/Autoloader.php');
    try {
    Zend_Loader_Autoloader::getInstance();
      $write = array('host'     => 'hostname',
                                             'username' => 'cssu',
                                             'password' => 'password',
                                             'dbname'   => 'cssu');
      $read  = array('host'     => 'hostname',
                                             'username' => 'cssu',
                                             'password' => 'password',
                                             'dbname'   => 'cssu');
      // Comment out the next two lines if using mysqli
      // and remove the comments from the last two lines
      $dbWrite = new Zend_Db_Adapter_Pdo_Mysql($write);
      $dbRead = new Zend_Db_Adapter_Pdo_Mysql($read);
      //$dbWrite = new Zend_Db_Adapter_Mysqli($write);
      //$dbRead = new Zend_Db_Adapter_Mysqli($read);
    } catch (Exception $e) {
              echo $e->getMessage();
    I replaced some code here to protect myself, but the library.php file is completely functional and has been tested... I am sure the problem ins't in here.
    Please let me know if you need any further code to help you out. I am brand new to PHP and so far everything has ran smoothly up til now. I have my Zend Framework uploaded to my server and tested that my site is connecting to it properly. Any help on this would be so so awesome! This is for a school project and I can't move on until this is resolved! Thank you so much for trying!
    You can also view the issue at my website... all the files have been uploaded to the server. www.CSSU.com

  • Reusable form validation

    Hi all,
    Whenever I work with form validation, I prefer to use manual
    ColdFusion validation rather than the automated cfform or
    Javascript validation.
    I have included a sample of one of my form validation scripts
    below, and was wondering if there was a way of scripting this whole
    thing, perhaps to loop through the form collection to perform the
    same sort of validation on the fields included in the collection.
    Is there some sort of attribute I can add to the fields that
    require validation to flag them to the loop?
    Thinking about it I would need something to flag minimum and
    maximum length, regular expressions, and replace() of fields on
    some occasions. Am I overcomplicating something for the sake of
    saving some coding time?
    Thanks in advance,
    Paul
    Attached code:

    What you could do is look for things you do frequently and
    write a custom tag/udf/cfc to make the code re-useable. For
    example, many of my forms just have two text boxes looking for
    dates. I have a custom tag that makes sure both values actually are
    dates, that they are in the correct order, that they are not too
    far apart, and that they are within a specified period.

  • Web Form Validation Message Language Setting at Runtime when work in multi lingual environment

    Business Catalyst use the default culture language to display web form validation message.
    When we are in multi lingual environment and not using subdoamin to handle multilingual sites, we found that the validation message did appear in the default culture setting. To make this work, we need to add the below script in our template.
    <script type="text/javascript">
    $(document).ready(function(){               
    var head= document.getElementsByTagName('head')[0];
    var script= document.createElement('script');
    script.src= '/BcJsLang/ValidationFunctions.aspx?lang=FR';
    script.charset = 'utf-8';
    script.type= 'text/javascript';
    head.appendChild(script);
    </script>
    Assuming the template is in french. You can change the lang parameter in the script according to your language.

    After user 1 submits the page, it might not even be committed, so there is no way to have the pending data from user1 seen by user2.
    However, we do have a new feature in ADF 11g TP4 that I plan to blog more about called Auto-Refresh view objects. This feature allows a view object instance in a shared application module to refresh its data when it receives the Oracle 11g database change notification that a row that would affect the results of the query has been changed.
    The minimum requirements in 11g TP4 to experiment with this feature which I just tested are the following:
    1. Must use Database 11g
    2. Database must have its COMPATIBLE parameter set to '11.0.0.0.0' at least
    3. Set the "AutoRefresh" property of the VO to true (on the Tuning panel)
    4. Add an instance of that VO to an application module (e.g. LOVModule)
    5. Configure that LOVModule as an application-level shared AM in the project properties
    6. Define an LOV based on a view accessor that references the shared AM's VO instance
    7. DBA must have performed a 'GRANT CHANGE NOTIFICATION TO YOURUSER'
    8. Build an ADF Form for the VO that defined the LOV above and run the web page
    9. In SQLPlus, go modify a row of the table on which the shared AM VO is based and commit
    When the Database delivers the change notification, the shared AM VO instance will requery itself.
    However that notification does not arrive all the way out to the web page, so you won't see the change until the next time you repaint the list.
    Perhaps there is some way to take it even farther with the active data feature PaKo mentions, but I'm not familiar enough with that myself to say whether it would work for you hear.

Maybe you are looking for

  • Belle on Nokia N8

    Okay, ever since I updated from Symbian Anne to Belle, my phone has been unable to recognize my headphones (no, they are not defective, they work on other devices and, my audio plug port is not broken either), so, What should i do? Im guessing there

  • HT4946 restoring data to iphone from itunes backup

    I lost all contacts etc with new iphone.  I found (Windows 7) the backup folder in Mobile Sync but the entries are just clusters of numbers/letters  which make no sense and I can't open them with itunes.  How can I get at  the data? thank you for any

  • IPhone 5 VID/PID

    What is the Vendor ID and Product ID for the iPhone 5? Or does anyone have a list of VID/PID's for all Apple devices? Thanks

  • Inheritance - instance variable initialization

    Hi all. I have a question regarding inherited instance variables. class Animal {    int weight;    int age = 10; class Dog extends Animal {    String name; class Test {    public static void main(String[] args) {       new Dog(); }This is just an arb

  • Set current record after dataset filter or sort

    How do you set the current record as the first record after a filter or sort? I have multiple dataset filters and sorts on the page and the current record always remains the first record after using them. Is there a way to force the current(viewed pr