Adobe form validation with Print button

Hi All,
I have an adobe form with field validation (javascript) already set up but I'm trying to add one more feature to the validation.
Let me explain my initial validation first:  I have 18 required fields with their tooltip name having an '*' at the end.  Any fields not filled in with this tooltip marker will show up on an alert message when the print button is selected.
There are two fields called IException and Amount that are required but an End User might have additional IExceptions and corresponding Amounts.  Therefore I have created 5 textboxes for each but only the first IException and Amount are absolutely required (and I use a '*' within their tooltip).  Now if an End User has an additional IExceptions ("IException2") and fills out this field, I need to make it mandatory that "Amount2" would also have to be filled in.
Here is my code: [code]
function validateFields()
var flg = 0
var n = this.numFields
var fArr = new Array();
for(var i = 0;i<n;i++)
var fn = this.getNthFieldName(i);
var f = this.getField(fn);
var tt = f.userName
if(tt.indexOf('*')!=-1 && f.value == f.defaultValue)
flg++;
fArr[fArr.length] = tt;
if(flg>0)
app.alert('There are '+flg+' fields that require a value\n\n'+ fArr,3)
var IException2 = document.getElementById('IException2').value;
var Amount2 = document.getElementById('Amount2').value;
if ((IException2.length >0) && (Amount2.length == 0))
app.alert('Amount is missing')
else
document.ExceptionForm1.print();
validateFields();
[/code]
Currently when one of the require fields is NOT filled in, i receive my first alert message.  If all required fields are filled in my print button doesn't work.  Also if all required fields are filled in and IException2 is also filled in but Amount2 is not, I don't receive my second Alert message.  So my code works up to the "Var IException2 = document....." and I don't know what the issue is.
Thank you for your help in advance. 

One more question,  since I have 4 of these...I'm having trouble getting the button to do exactly what its suppose to based on what's filled in because i think i have my '{ }' messed up and or IF/ELSE statement is wrong...can you please take a look..
function validateFields()
var flg = 0
var n = this.numFields
var fArr = new Array();
for(var i = 0;i<n;i++)
var fn = this.getNthFieldName(i);
var f = this.getField(fn);
var tt = f.userName
if(tt.indexOf('*')!=-1 && f.value == f.defaultValue)
flg++;
fArr[fArr.length] = tt;
if(flg>0)
app.alert('There are '+flg+' fields that require a value\n\n'+ fArr,3)
var a = this.getField('IException2').value;
var b= this.getField('Amount2').value;
if ((a.length >0) && (b.length == 0))
app.alert('Since IException 2 is filled in, Amount 2 is also required')
var c = this.getField('IException3').value;
var d= this.getField('Amount3').value;
if ((c.length >0) && (d.length == 0))
app.alert('Since IException 3 is filled in, Amount 3 is also required')
var e = this.getField('IException4').value;
var f= this.getField('Amount4').value;
if ((e.length >0) && (f.length == 0))
app.alert('Since IException 4 is filled in, Amount 4 is also required')
var g = this.getField('IException5').value;
var h= this.getField('Amount5').value;
if ((g.length >0) && (h.length == 0))
app.alert('Since IException 5 is filled in, Amount 5 is also required')
else
this.print();
validateFields();

Similar Messages

  • Problem in submit button on adobe form integrated with web dynpro

    Hello,
    I'm facing prob in triggering web dynpro event onSubmit for Interactive form.
    I've created a submit button from web dynpro activex pallete on adobe form (integrated with web dynpro) to send the form as email.
    Then in the web dynpro view where this form is embedded i have created an action against onSubmit event and called a method within this.
    However, on clicking Submit button this event is not getting triggered.
    Please let me know what is lacking in this process?
    Thanks.

    Hi,
    I am also facing the same problem. i have developed a simple scenario under which user have to input his/her details and on submit button it will be updated to database.
    I have tried the above solution but after adopting this solution all the editable fields become non-editable.
    so the above solution is not working for me could you help me out.
    I think ... try this....
    When you create the Adobe Form from WebDynpro, you need to follow one step in SFP Transaction or inSE80 transaction. Open the Adobe Form in any one the transaction and now in SAP menu bar "Utilities" in that you will find the "INSERT THE WEBDYNPRO SCRIPT" just click on that one. Then you will see a new Script Object is being created with the name "ContainerFoundation_JS" under the "Variables" in the Heirarchy of the Object Pallete of the Adobe Form.
    This step is mandatory to use the SUBMIT Button of the "WebDynpro Native", to trigger the OnSubmit event of the WebDynpro.
    Thanks
    Edited by: shailendra2sap on Mar 6, 2009 12:24 PM

  • 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

  • Adobe form: Issue with BACK, CANCEL and EXIT buttons

    I am new to Adobe forms. I created a simple demo Adobe form and was able to print it successfully except a strange problem.
    Whenever I opt for print preview it shows me a blank page. On pressing enter it shows me the form, But now none of the BACK, EXIT, CANCEL buttons work. On pressing any of them I keep getting the print form.
    So the only way I can come out of it is /n.
    Can anyone please help with the reason for such an issue and how to get rid of it.
    Regards,
    Ashutosh

    Maybe you can tell us something more about the code you use to print your form. I think thatis the problem. Otto

  • Adobe forms - problem with the character "9"

    I have the problem with printing Adobe forms that were introduced with Russian country version.
    Funny enough I have no problems with russian characters. They all print all right.
    We have however the problem with character "9". On the preview of the pdf it looks ok. When I print it from PDF preview it prints ok. But when I process it for sap to the HP output device (device type HPLJ4) "9" gets replaced with "<".
    Has anyone experienced this problem?

    ok, you're right. But, my problem is a little bit different :
    I would like to replace the "\n" character (new line) by the 2 characters "\n".
    I test this source code :
    String tmp = "First line\nSecond line";
    tmp.replaceAll("\n", "\u005C\u005Cn");
    System.out.println(tmp);
    tmp.replaceAll("\n", "\\n");
    System.out.println(tmp);
    tmp.replaceAll("\n", "\\\\n");
    System.out.println(tmp);
    The 3 results are the same :
    First line
    Second line
    I never have "First line\nSecond line".
    Best regards.
    K96
    PS : The objective is to write the string in a SQL request.

  • UPS Maxicode in Adobe Forms - non-zebra printer

    Hey guys,
    I have a problem regarding printing an UPS Maxicode on a regular printer (HP Laserjet P3015) in Adobe Forms: It just won't print.
    I'm using the "UPS Maxicode" object in the "barcode" library (LCD ES3, Version 10.4). After some research, I found this guide:
    UPS maxicode on SAP Adobe forms - Contributor Corner - SCN Wiki
    The scripting described there works great for printing the UPS Maxicode on a zebra printer - but the non-zebra printer scripting doesn't work for me.
    There isn't much to find about this on google, so I hope you guys can help me. I experimented with printers, device types (i.e. PDF1) and such, but the result remains the same. What else can I try? Am I missing something?
    Thanks for your time / help,
    Chris

    You can find some information about it in this document:
    [http://www.tec-it.com/download/PDF/TBarCode6_SAPwin_Manual_EN.pdf]
    See chapter 12, see also chapters: 6, 7, 8 and 11.
    good luck

  • ISR Adobe Form Validation

    hi,
    In ISR Adobe Forms I have 2 textfields where the user can enter the telephone no and email id .I want to do validation.So I have given the validation pattern as '('999')' 999-9999 and A'@'A'.'AAA.But it is showing "Field Validate Failed"..
    What is the reason?
    Can anyone tell me the steps how to validate the fields in adobe form..
    Regards,
    Rheema Rahael.

    Hi Rheema,
    Either you can do the validation messages through the BAPI return messages fromt the BADI or through scripting by using the message box method (refer adobe life designer help). I would ssugggest to do more validations at script level or do a thorough check of the form, while pressing the review button (user command -'CHECK'.).
    Regarding the validation patterns, kindly check the help doc of designer.
    Hope these helps,
    - anto.

  • Adobe forms -Can we print multiple forms?

    i,
    Right now my form has an ability to display a single Order with single Header & line items.
    Hi,
    I want to enhance the functionality to multiple forms prints.I mean I will be having multiple headers and l ine items.
    I can fill my internal tables with multiple records data but what are the other form changes should i take care( hierarchy, data, etc...)
    In smartforms I was able to do this because there we can define loops.How do we handle it here in adobe forms?
    FYI.. I am filling internal table through WD application.Should I do Some context level changes?
    Also,
    In Dev environment I can see my Bold objects but when i move it to QA they are disappearing & font is also changing.What could be the reason?
    rgds
    Vara

    Hi Vara,
    Re: Adobe Forms
    Regards,
    Sravanthi

  • Adobe Form - Problem with Cyrillic texts on zebra printers (ZPL)

    Hello,
    we have problems with an adobe form. We try to print this adobe form on a zebra printer with the device type "AZPL203". In this adobe form we have to print the material description in german and russian language.
    When we print out the adobe form on a normal printer (e.g. HP) everything is fine. But when we print the form on a zebra printer, the russian textwill not be printed on the label. In the print preview of the form, we will see the correct russian text.
    So can anybody help me?
    Did anybody print cyrillic text on a zebra printer?
    Thanks in advance.
    Marc.

    Good afternoon,
    First.. I apologize because I know this is the wrong thread.  But the folks in this thread apparently have the missing piece of info that I/we desperately need..  Could you please help me to understand what I'm missing, or at least point me to a forum with the answer? 
    We have a few tags that print to a Zebra Z105SL printer via Smartforms.  But due to recent design changes in the tags, and a desire to stay up with current technology, we/I would like to design the new tags in Adobe PDF-forms.  The design is not a problem, but we cannot get SAP and the Zebra printer to make nice and print anything.  For now, I've created a simple tag with a text field and a couple of bar codes on it, just to test and prove that the Zebra will print a PDF.  We are using PDF-forms for several of our business forms, so everything works, but the Zebra just won't print a PDF.  I don't know what I'm missing..  I know it's possible, but I can't figure out the "how" part.  Could you please let me know how you did it?
    Many thanks!
    Bill

  • Convert numeric in words in adobe forms (start with the currency)

    Hi to all,
    Below script i found here for converting numeric into words and its work perfectly. Just I edit in UAE currency.
    It is possible to move the dirhams (currency) in front like. 1,900,000.55 = Dirhams One Million Nine Hundred Thousand and Fifty Five fils Only. (with period)
    or 1,900,085.55 = Dirhams One Million Nine Hundred Thousand Eight Five and Fifty Five fils.
    Previous code was One Million Nine Hundred Thousand Eighty-Five Dirhams and Fifty-Five Fils
    Thanks in advance
    Much Appreciate your advance help
    aTens = [ "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"];
    aOnes = [ "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine",
      "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen",
      "Nineteen" ];
    function ConvertToHundreds(num)
       var cNum, nNum;
       var cWords = "";
       num %= 1000;
       if (num > 99) {
          /* Hundreds. */
          cNum = String(num);
          nNum = Number(cNum.charAt(0));
          cWords += aOnes[nNum] + " Hundred";
          num %= 100;
          if (num > 0)
             cWords += " and "
       if (num > 19) {
          /* Tens. */
          cNum = String(num);
          nNum = Number(cNum.charAt(0));
          cWords += aTens[nNum - 2];
          num %= 10;
          if (num > 0)
             cWords += "-";
       if (num > 0) {
          /* Ones and teens. */
          nNum = Math.floor(num);
          cWords += aOnes[nNum];
       return cWords;
    function ConvertToWords(num)
       var aUnits = [ "Thousand", "Million", "Billion", "Trillion", "Quadrillion" ];
       var cWords = (num >= 1 && num < 2) ;
       var nRight = Math.floor(num);
       for (var i = 0; nLeft > 0; i++) {
           if (nLeft % 1000 > 0) {
              if (i != 0)
                 cWords = ConvertToHundreds(nLeft) + " " + aUnits[i - 1] + " " + cWords;
              else
                 cWords = ConvertToHundreds(nLeft) + " " + cWords;
           nLeft = Math.floor(nLeft / 1000);
       num = Math.round(num * 100) % 100;
       if (num > 0)
          cWords += ConvertToHundreds(num) + " Fils";
       else
          cWords += "Zero Fils";
       return cWords;

    Hi RK,
    We had a similar requirement and we used Web Dynpro for Java which contained the Interactive Form that would display the personnel area, personnel sub area, etc.
    We developed a custom application in WD Java which would accept entries from the user on each screen after clicking on the Change Personnel area link in the portal. The user would put in the values and when the user would click on the Submit button, an adobe form would be displyed which would show the existing values as well as the values the user newly entered.
    Hope this helps. Do let me know if you need any further inputs.

  • Issue printing labels in Adobe form via Datamax printer

    Hi,
    We have developed an Adobe form which contains a barcode for the label.
    This label gets printed fine when we print it on the printers in the office headquarters.
    However, at the plant location where it is supposed to be printed, the labels are not getting printed.
    The printer at the plant location is Datamax H-4212.
    Any idea what's wrong? Will the Adobe form need to be changed for this?
    Please help.
    Regards,
    Anusha

    Hi,
    Which device type do you use to create the spool and print? Only the device types described in the following note are possible with Adobe forms:
    685571 - Printing PDF-based forms
    I suggest you try with device type PDF1 and SAPPDFPRNT as per SAP note 1444342.
    Regards,
    Aidan

  • Dropdown of Printer destination with Print button

    Hi,
    I am trying to create a dropdown list on a form that contains about a dozen different printer destinations. I need to users to select a printer from the dropdown, the click a button that will send the completed form to the printer. I am a newbie so any help is appreciated.
    Kevin

    Hi Kevin,
    Acrobat forms (AcroForms) can access a printParams object which has several parameters, including printerName.
    Here is an example: https://acrobat.com/#d=fzE2tPnpvftws68XwdjTtA
    It is not much of a time saver as the user is still presented with the print dialogue. Please note that you cannot get it to print silently for security reasons (afaik).
    I hope that helps,
    Niall

  • Adobe form MICR not printing transit, amount chars

    Hi,
    I am using MICR Std font in the adobe form and the form is also loaded on printer which has device type TROY MICR.
    I can see the numbers in MICR font but I am not able to print special chars. I tried to do that using 'A' 'B' 'C' 'D' as we do in sap-script. Then I tried it with '[or]' '#' '$' and '-' but it just print those chars not special chars.
    I hope someone can help me on this.
    Thanks

    Just to document the solution, we had the same problem where we wanted to print the Transit synmbol or Branch Bank Id number,
    1. Goto MS word
    2. Type the numerals 2446 which is the unicode number for transit symbol, press Alt X on the keyboard it will transform the numbers into the symbol
    3. Now create a text field in your Adobe designer and set the font to MICR Std, you would see a [] in the field but on print preview it would come out correctly.
    Regards,
    Aditya

  • What's the business case for using adobe forms for handling print forms

    Hi
    We are just starting our SAP project and are looking at the possibility to use Adobe forms for generating and printing our forms, like purchase orders, invoices etc.
    My Question is:
    1. Is this possible / adviseable ?
    2. if so - what's the business case in using Adobe forms  - <i> We have been looking on the SAP Pricing for adobe interactive form, and in our point of view it's grotesque high</i>
    3. What other options do we have - do we need to settle with SAP Script / Smartforms ?
    Regards
    Morten Nielsen

    Hi Morten,
    1. Is this possible / adviseable ?
        As far I know SAP is going to stop support for SAPScript in coming years (I don't know exact dates). It is pretty much advisable to use Adobe Print Forms.
    2. if so - what's the business case in using Adobe forms - We have been looking on the
    SAP Pricing for adobe interactive form, and in our point of view it's grotesque high
      We can use Adobe Print Forms where ever we can able to use SApscripts/PDF print Forms.
    3. What other options do we have - do we need to settle with SAP Script / Smartforms ?
      It is better to settle with Adobe forms rather than using SAPscript/Smart forms. One of the main reason for this is maintainance is much easier than SAPscript/Smart forms.
    But remember that Java Stack need to be installed in order to use Adobe Forms.
    Please visit the below SDN area on Adobe forms for more details.
    https://www.sdn.sap.com/irj/sdn/interactiveforms
    Thanks
    Ramakrishna
    Message was edited by:
            Ramakrishna Ramisetti

  • 10g Forms closing when print button on smartbar used.

    I have an application run on Application Server 10g (9.0.4). The client machine is Windows 98 runing IE 5.5. Everytime the print button in the smartbar is click and the printer dialog is display, then the ok button is click the oracle form application is closed.

    Sorry for hijacking this thread, but I'm facing a similar problem.The time you used for writing this sentence would have been just the time you'd need to open a new thread ;-)
    How do I specify that whenever a window in the form is closedIn the trigger at form-level you can check the content of :SYSTEM.EVENT_WINDOW, this contains the name of the window.

Maybe you are looking for

  • Wi-fi sync doesn't work all the time

    This has been an issue for me ever since wi-fi sync was introduced. My setup is all-Apple: iOS devices, Mac, Airport Extreme router. I have successuflly set up for wi-fi sync, and it works. The problem is that quite often the device and iTunes don't

  • The server at Mac OS X Server Web Services requires a username and password

    I am running SL Server 10.6.2, wiki works but when a person clicks an attached file in a wiki and then selects "open" they get a login popup with the notification The server at Mac OS X Server Web Services requires a username and password. It doesn't

  • Manycam in IE11 don't work

    I use ManyCAM  and in IE11   do not work... in flash player i select the ManyCam virtual camera but  image black if i use other browser (Chrome/firefox) no problem

  • Help!  how do I get this to stop?  I just found this in my Console logs

    11/21/08 9:26:24 PM com.apple.launchd[1] (com.app4mac.CheckUpAgent[5104]) Exited with exit code: 1 11/21/08 9:26:24 PM com.apple.launchd[1] (com.app4mac.CheckUpAgent) Throttling respawn: Will start in 10 seconds 11/21/08 9:26:34 PM com.apple.launchd[

  • Executing servlet in command prompt

    Can we run the servlet in the cmd prompt . I am using tomcat5 server in windows Environment .