Field validation using distributed form's "Submit Form" built-in function

Hello,
I am hoping someone can help me out with a small problem I'm having. I have a hidden field on a form which is the total of other numeric values on the form with code in place so that if the number doesn't equal what it should, the alert box is displayed. The problem is that it's a distributed form and even though the message is displayed, if you hit submit (Built-in Submit Form) button form on a second attempt, it submits anyway. So the question is, how do I change the built-in API submit button code to catch the error? Because it's a distributed form, am I dealing with global variables vs. form level? I've tried using the "event.rc = false" at the form level to no avail. I can't seem to locate the built-in "submit form" code so that I can change that to make this APP work. Or is there a better way to do this. My validation code is below and I would greatly appreciate anyone's help.
Thanks,
Tom
// JScript source code if (this.getField("RankGame1").value > 0 &&     this.getField("RankGame2").value > 0 &&     this.getField("RankGame3").value > 0 &&     this.getField("RankGame4").value > 0 &&     this.getField("RankGame5").value > 0 &&     this.getField("RankGame6").value > 0 &&     this.getField("RankGame7").value > 0 &&     this.getField("RankGame8").value > 0 &&     this.getField("RankGame9").value > 0 &&     this.getField("RankGame10").value > 0 &&     this.getField("RankGame11").value > 0 &&     this.getField("RankGame12").value > 0 &&     this.getField("RankGame13").value > 0 &&     this.getField("RankGame14").value > 0 &&     this.getField("RankGame15").value > 0 &&     this.getField("RankGame16").value > 0)     {       if (this.getField("RankGameTotal").value == 136) {         } else {         event.rc = false;         app.alert("Please check your confidence points. They should add up to 136, but are adding up to " + this.getFiel         ("RankGameTotal").value + ".");        }     } else { }

try67,
Thanks for your reply. When you say to "remove the Submit action, and submit the form yourself inside your code" are you refering to the
distributed forms "Submit Form" button displayed on the purple tool bar of the distributed form? And if so, could you please let me know how I can do that? I've
looked into that and haven't found an answer. Doing that would solve my problem of having my own submit code acting correctly and the
distributed forms "Submit form" code not having any idea about my forms desired field value.
Thanks again,
Tom

Similar Messages

  • The ominous Form Server Submit Form QPAC

    I've seen here at least one more discussion thread regarding the ominous
    Form Server Submit Form QPAC. I think many of the user got confused since this isn't a self-explanatory QPAC, espacially the name!
    I've also studied the appropriate documention
    "Using LiveCycle Forms QPACs". The documentation shows how to use the input and output variables of the QPAC. But it doesn't explain actually the intended use (in my opinion).
    The bad thing on this is that I think the QPAC could even help me, if I would understand it.
    Easy & short question:
    Can I use this QPAC to convert a pdf document (stored in a document variable) into a form variable?
    Any Feedback is welcome...
    Nico

    Hi Nico
    Some background. When Adobe first launched LiveCycle, the first capabilities they needed to expose was encapsulated as Forms Server, and it provided:
    1. Rendering a form. This would take a PDF or XDP file, plus some xml data, merge them together, and produce a PDF file.
    2. Handling a form submission. This would take the data from an http request coming from a Submit button on a form, process it, and extract the XML data.
    The Forms "Submit" QPAC is basically the submission API encapsulated as a QPAC. If you want to know exactly what it does, the best place to look is the LiveCycle Forms documentation.
    So, to your question:
    If a document variable contains a PDF form, you can use the Form Submit QPAC to extract the XML data.
    A form variable is really just the XML data for a form, plus a reference to the PDF or XDP file that should be used for displaying the data - so if you assign the extracted XML to the appropriate node in the form variable, it should work.
    I hope this long ramble is helpful.
    Howard
    http://www.avoka.com

  • Form Server Submit Form QPAC - Not pulling data

    Hello everyone,
    I wanted to see if anyone has encountered problems using the above QPAC.
    My situation is as follows
    1) User sends PDF back. PDF is sent back to workflow as a PDF (not XDP)
    2) Form Server Submit Form is setup to extract the data from the form and put it in a document variable
    However, that is not happening. I do know that the document is not broken when it is received from the Email Receiver QPAC (I've used the Avoka Document Extract QPAC to test the form itself) however for whatever reason, the variable is still empty after it is processed.
    Any thoughts are appreciated!
    Thanks,
    Rob

    Hi Nico
    Some background. When Adobe first launched LiveCycle, the first capabilities they needed to expose was encapsulated as Forms Server, and it provided:
    1. Rendering a form. This would take a PDF or XDP file, plus some xml data, merge them together, and produce a PDF file.
    2. Handling a form submission. This would take the data from an http request coming from a Submit button on a form, process it, and extract the XML data.
    The Forms "Submit" QPAC is basically the submission API encapsulated as a QPAC. If you want to know exactly what it does, the best place to look is the LiveCycle Forms documentation.
    So, to your question:
    If a document variable contains a PDF form, you can use the Form Submit QPAC to extract the XML data.
    A form variable is really just the XML data for a form, plus a reference to the PDF or XDP file that should be used for displaying the data - so if you assign the extracted XML to the appropriate node in the form variable, it should work.
    I hope this long ramble is helpful.
    Howard
    http://www.avoka.com

  • Render Form Guide & Submit Form Guide

    Hai all,
    Could anyone tell me where can I find the properties or explanation for the Render Form Guide & Submit Form Guide services of Samples-Forms category, in Workbench ES?
    Thanks,
    Aswani.

    Thanks a lot Scott..
    Your explanation was really helpful..
    I just want to tell you the reason, why I raised such a question.
    When I first started to work on the rendering of forms using Livecycle Workbench & Workspace ES, I got to read two different pdf.s..
    both named "fggettingstarted"..
    which explains clearly the steps, right from creating a form, till rendering the same in workspace..
    In the first link mentioned below, it is said to use "Render Form Guide" service & in the second link, "Render Form Guide ES Update 1" service..
    Thats where, I got the doubt which one to use?
    Please check out with the below links..
    Under the topic "Creating an xfaForm variable" in the Chapter "Using a Form Guide in Workspace ES".
    http://help.adobe.com/en_US/livecycle/es/fggettingstarted.pdf
    http://help.adobe.com/en_US/livecycle/8.2/fggettingstarted.pdf
    Thanks!
    Aswani.

  • Bypass Required Field Validation when needed in PDF Dynamic Form

    I faced a tricky situation, where some fields are required, but we need to allow bypass required (mandatory) validation rule when saving the form, and require to fill such fields when submitting the form. In other words, provide flexible control when to turn On / Off this feature.
    I wanted to implement a flexible solution, and I will post my findings here. Appreciate your feedback for improvements.
    Steps:
    1. Mark rquired fields as required.
    2. Specify "Empty Message" as "This field cannot be left blank", or similar.
    3. Specify "Validation Script Message" as "This field must have a proper value before submit", or similar.
    4. Create a Global Form Level Variable something like "StopTotalValidation" and default as "1" means by default, Turn Off Validation for some cases.
    5. For the fields which require this type of control, add the script (to be defined later) on the "validate" event:
    myTools.validateForRequiredField(this);
    6. Create a Script Object "myTools" and add the following script:
    function initStringFunc() {
    //call this function on Document Initialize
    String.prototype.trim = function() {
        return this.replace(/^\s+|\s+$/g,"");
    String.prototype.ltrim = function() {
        return this.replace(/^\s+/,"");
    String.prototype.rtrim = function() {
        return this.replace(/\s+$/,"");
    String.prototype.isEmpty = function() {
        return (this == null) || this.trim() == "";
    function setNodeProperty(theNode, theProperty, newValue) {
       if (theNode[theProperty] != newValue) {
            theNode[theProperty] = newValue; 
    function isNodePropertyEmpty(theNode, theProperty) {
        var result;
        if (theNode == null || theNode[theProperty] == null) {
            result = true;
        } else {
            result = theNode[theProperty].isEmpty();
        return result;
    function disableTotalValidation() {
        StopTotalValidation.value = "1";
    function enableTotalValidation() {
        StopTotalValidation.value = "0";
    function isTotalValidationOn() {
        return StopTotalValidation.value != "1";
    function isTotalValidationOff() {
        return StopTotalValidation.value == "1";
    const conRequired = "(required)";
    function validateForRequiredField(theFld) {
        // Bypass Required Field Validation when Global Validation is Off.
        var result=false;
        if (theFld) {
            if (theFld.mandatory && theFld.mandatory == "error") {
                if (myTools.isNodePropertyEmpty(theFld, "rawValue")) {
                    myTools.setNodeProperty(theFld, "rawValue", conRequired);
                if (isTotalValidationOn()) {
                    if (isNodePropertyEmpty(theFld, "rawValue") || theFld.rawValue.toLowerCase() == conRequired.toLowerCase()) {
                        result = false;
                    } else {
                        result = true;
                } else {
                    result = true;             
        } else {
            result = false;
        return result;
    7. Now, on the click of "Save" button call the function "disableTotalValidation()" and on the click of "Submit" button call the function "enableTotalValidation()".
    I have just finished implementing the above solution, and as per my initial testing, it is working fine.
    I will post this to my Google Docs workspace, and provide updates their.
    Tarek.

    Hi Tarek,
    I see what you mean in relation to clarity if you used the form variable approach. It was only a suggestion. Like so many things in LC, there is more than one way to finding a solution to a problem.
    The triple equal sign (===) is testing if the condition is equal, but to a higher standard. It is testing if the values are identical to each other. For example if you were testing if a textfield was empty, with Equality (==) you might have this:
    if (this.rawValue == null || this.rawValue == "") {
         // Some script
    If you use Identity (===) you can do the same thing with less script:
    if (this.rawValue === null) {
         // Some script
    It is also useful when testing the value of an object, but also the type (eg string, number, Boolean).
    Lastly, it can be used for non-identity (!==).
    In relation to createNode() etc, apart from John's blog, it is covered in the LC documents: http://www.adobe.com/support/documentation/en/livecycle/documentation.html. Look for the scripting guides and the guide to the XML Form Object Model.
    Good luck,
    Niall

  • Input field validation using JSP in HTMLB

    Hi All,
    How can we validate an input field in a form in BSP page.
    Like: There are two input fields in my form.I want the user to enter value in any one and only one of the fields.If the value is entered in both fields or none of the fields the user should get a popup and form  must not be submited.
    Shall i use the onClientClick attribute of Button element or doValidate attribute of Inputfield element or  validationScript attribute of From element?
    Please help.
    Thanks a lot,
    Anubhav.

    Here you go:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form id="form1" >
          < script t-ype = "text/javascript" >     "Remove "-" between t & ype in type
          function checkInput()
           var field1 = document.form1.field1.value;
           var field2 = document.form1.field2.value;
    var error = "";
    if(field1 != "" && field2 != "")
              { error = "X";
                  javascript error message here          }
    if(field1 == "" && field2 ==  "")
              { error = "X";
                                javascript error message here
    if(error == "")
              htmlbSL(this,2,'mybutton:Submit');
          < / script >
              <htmlb:textView text      = "Hello World!"
                              textColor = "RED"
                              design    = "HEADER1"
                              align     = "CENTER" />
              <htmlb:inputField id        = "field1"
                                value     = "<%= var1 %>"
                                type      = "integer"
                                alignment = "CENTER" />
              <htmlb:inputField id        = "field2"
                                value     = "<%= var2 %>"
                                type      = "integer"
                                alignment = "CENTER" />
              <htmlb:button id            = "mybutton"
                            text          = "Press Me"
                            onClientClick = "javascript:checkInput();" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Raja T
    Message was edited by:
            Raja Thangamani

  • Restrictions on PDF Form and Submit Form to email

    I have two questions:
    After creating my pdf form and sending it to the client, once they have filled this in is there a way to restrict the document from being edited again?
    How do a add a submit button to the end of my form so that it automatically gets sent in an email?
    First time user

    Read documentation on CF8 : "Although forms created in
    LiveCycle Designer allow several types of submission, including XDP
    and XML, ColdFusion 8 can extract data from HTTP post and PDF
    submissions only".

  • Edit Field Validation - Use of the native string.find() Lua Function

    Hi,
    I have an edit field in which I want to be validated immediately upon change.  I ONLY want to accept alphanumeric characters (a-z and 0-9).  I have tried this many ways, but have failed to get it exactly as I want it.  First I tried Sample Code A, but that line of code fails because combination strings that contain the alphanumeric characters and a special character like the pound sign (#), will validate (Example: "hello1#").  I tried Sample Code B, but that isn't 100% what I want because if you were to add a character that isn't available on the keyboard, such as the copyright symbol or the trademak symbol.  Can someone help me, please?  Thank you.
    Sample Code A:
    interface:edit_field {
                                value = bind { key = 'new_table', object = properties },
                                fill_horizontal = 1,
                                immediate = true,
                                validate = function (interface, value)
                                  if string.find(value, "[a-z%d]")  then
                                    return true, value, "good"
                                else
                                        return false, value, "failed"
                                    end
                                end
    Sample Code B:
    interface:edit_field {
                                value = bind { key = 'new_table', object = properties },
                                fill_horizontal = 1,
                                immediate = true,
                                validate = function (interface, value)
                                    if string.find(value, "[~!@#$%^&*()_+`-={}|\%[%]:\";'<>?,./]")  then
                                    return false, value, "failed"
                                else
                                        return true, value, "good"
                                    end
                                end

    wallanceM wrote:
    Hi,
    I have an edit field in which I want to be validated immediately upon change.  I ONLY want to accept alphanumeric characters (a-z and 0-9).
    Sample Code A:
    interface:edit_field {
                                value = bind { key = 'new_table', object = properties },
                                fill_horizontal = 1,
                                immediate = true,
                                validate = function (interface, value)
                                  if string.find(value, "[a-z%d]")  then
                                    return true, value, "good"
    Hi,
    Sample Code A seems the best approach to use.  Trying to detect unwanted characters would be error prone.
    I noticed you are mixing character classes and ranges in your string.find pattern.  Have you tried using the following patterns instead?
                                  if string.find(value, "[a-z0-9]")  then
    or
                                  if string.find(value, "[%l%d]")  then
    Matt

  • Form: button - submit form - not working "Internet Email"

    I'm trying to create a form with a "Email" button. It works if i have a desktop client, it puts the attachment directly into a email client (entourage). In testing, I tried to Select Internet Mail as an option.. it came up with a "Save PDF Data as", and i saved it.. clicked ok... it didn't activate my gmail.
    I switched my system default mail client to be Gmail notifier... why doesn't this work?

    I figured it out... i had "Don't show again" checked.. i tried it from another mac. it explained.

  • Distributed form missing "automatic" Submit Form button

    I am going crazy and running out of time.
    I created a form in Acrobat.  I distributed the form using SharePoint.  It worked great.  For me and my test user.  I sent the distributed file to my boss so she could try it and there was no Submit Form button.  The purple forms bar was there; Highlight Fields was there; there was no Submit Form button.  I tried it on another user's computer and no Submit Form was there.  I tried it on our terminal server with a test user (set up like a standard user), and there was a Submit Form button.  I tried it on a computer outside our network and no Submit Form button was there.  I also had my boss try it in the terminal server (known working computer) and no Submit Form button was there.
    I have looked around the net and found a JavaScript reference that hid a Submit Form button, but that is a different, ugly, email-only button meant for backwards-compatibility.
    This is so effing frustrating.  I can't find a single reason the Submit Form button will show up for some and not others.
    I submitted it via e-mail.  I open it within Terminal Services, logged in as me, and the Submit button wasn't there.  I open it with my Test user (a standard user, not admin or anything) and the Submit button is there.  I open it on my local machine and the Submit button is there.  WTF IS GOING ON, ADOBE???  I am so frustrated right now.

    On this machine I only have AA5. I was able to open the first form, but saw no submit button anywhere. The second form would not open. I might try it with AA7 a bit later (the only versions I have at home).
    I was able to check the various radio buttons and type in the text boxes. The text boxes seem to wrap correctly.
    I assume folks will be fine with the exceeds expectations being on the left. In many surveys, the best is on the right and not on the left. However, I am not sure there is any standard for that and you have been consistent. I was wondering how you were going to take care of the signatures. It looks like you are going to do them by hand - I guess the advantage is that all the signers would see the entire evaluation before signing. The alternative would be to introduce digital signatures in some sense, possibly using the Acrobat route.
    Again, I see no submit button. Bill

  • Submit form using web based email service

    I regularly get sent forms by my printers which I fill in to approve print jobs. There's a submit button the forms which has always nicely opened up Mail (Mac OS X) in order to send a data file that the sender can read. However, I've just recently started using a different email client (Postbox) and I get this error from Adobe Acrobat...
    The SendMail doesn't know how to talk to your default mail client.  Please select a different mail application to use.
    I can't find a way to change the settings though. I used to be given the option between sending via a desktop or web based email service but a while ago I ticked the box to 'not show this message again'.
    Anyone got any ideas how I can maybe use Gmail or similar to send these forms?
    Cheers,
    Jon

    Dear Frances,
    The "Submit by Email" button enables to submit your form data in two modes.
    1) Default Email Application (MS Outlook)
    2) Use Webmail
    You can use option 2 to submit form data through Webmail.
    Thanks,
    VJ

  • How to add multiple records in table thru form via Submit button

    Hi all
    i have small requirement as follows.
    i have a view in which i have 3 UI elements one is webdynpro form,Table UI element and third one is submit button.
    now at runtime when i will enter the details in the form and click on the submit button then those record details has been stored in Table. then next time again when i submit the form with details then the table contains all records of current and existing ...so table has to maintain mutile records thru form via submit form..
    i need sample code on the same.
    points are always rewardable
    Thanks
    Sunil

    Hi,
    Create one context attribute and map it to the Inputfiled and one submit button, create a node with a valueattribute map it to a Table and in onActionsubmit write this code
    public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionsubmit(ServerEvent)
        String str=wdContext.currentContextElement().getInputfiledattribute();
        IPrivateTableformView.ITablenodeNode node=wdContext.nodeTablenode();
       IPrivateTableformView.ITablenodeElement ele=node.createTablenodeElement();
       ele.setNodeattribute(str);
       node.addElement(ele);
        //@@end
    thanx,
    ramani.p

  • FORM within a FORM

    Trying to display listings of a search for a bookstore, and then either display a review of the book OR select the item and put it in the shopping cart. I have a large FORM which puts the selected items into the shopping cart and I would like to post a FORM for each item in the table which would query the database for reviews of the book in question. The problem is that when I hit the external FORM's click it only passes the first line in the table of HIDDENs, even if I have many lines. It also passes the value of the internal forms even though, technically, it shouldn't even look at the values in the internal FORMs. What is going on that the servlet not only grabs from the internal FORM when the External FORM is submitted, but it also stops grabbing after the first Internal FORM???
    CODE:
    "<P/>"+
    "<FORM name='bigone' method='GET' action='http://localhost:8080/servlet/ToCart'>"+
    "<TABLE border='2' cellpadding='2'>"+
    "<TR>"+
    "<TD ID='big'>Title</TD><TD ID='H'>Author</TD><TD ID='H'>ISBN</TD>""<TD ID='H'>Price</TD><TD ID='H'>In Stock</TD><TD ID='H'>Shopping Cart</TD>"+
    "<TD ID='H'>Reviews</TD>"+
    "</TR>");
    while (rs.next()) {
    count++;
    String tit=rs.getString(1);
    String aut=rs.getString(2);
    String izzy=rs.getString(3);
    out.println ("<TR>");
    out.println ("<TD>" + rs.getString(1) + "<INPUT type='hidden' name='title"+count+"' value='"+tit+"'></TD>");
    out.println ("<TD>" + rs.getString(2) + "<INPUT type='hidden' name='author"+count+"' value='"+aut+"'></TD>");
    out.println ("<TD>" + rs.getString(3) + "<INPUT type='hidden' name='isbn"+count+"' value='"+izzy+"'></TD>");
    Double rsCost =new Double(rs.getString(4));
    out.println ("<TD>$" + df.format(rsCost) + "<INPUT type='hidden' name='price"+count+"' value='"+rsCost+"'></TD>");
    if (rs.getInt (5) > 0)
         out.println ("<TD>Yes</TD>");
    else
         out.println ("<TD>No</TD>");
    out.println ("<TD><INPUT type='text' name='quan"+count+"' size='3' value=''></TD>");
    out.println ("<TD><FORM name='form"+count+"' method='GET' action='http://localhost:8080/servlet/Reviews'>"+
    "<INPUT type='hidden' name='isbn' value='"+izzy+"'>"+
    "<INPUT style='color: black; font-size=12;' type='button' value='Reviews' onclick='document.form"+count+".submit();'>"+
    "</FORM></TD></TR>");
    "<INPUT type='hidden' name='dropnot' value='add'>"+
    <INPUT type="hidden" name="looper" value="'+count+'">+
    "</TD>"+
    "<TD>"+
    "<INPUT style='color: black; font-size=12;' type='button' value='I want this.' onclick='document.bigone.submit();'>"+
    "</TD></TR>"+
    "</TABLE>"+
    "</FORM>"+

    When a form is submitted, it sends all the input parameters inside <FORM></FORM> tag. Now if you have nested forms, its going to cause problem. You need to make sure that a FORM ends with /FORM before you start second FORM.

  • When I try to use the Submit Form button on the Interactive PDF I created (IN Design CS6) I get this message. "There is no value in form field 'Program.' Please put in it before proceeding. What can I do to fix this and make the Submit button work?

    When I try to use the Submit Form button on the Interactive PDF I created (In Design CS6), I get this message:
    There is no value in form field "Program." Please put in it before proceeding.
    How can I fix this and make the Submit Form button work?

    Are you running modified software on your phone?  This error seems to be common if the firmware has been modified and you're trying to restore the phone again. 

  • Is it possible to remove the submit form button that's automatically created when you distribute a form?

    I have created a form for my boss and distributed it. She doesn't want the submit form button to appear as people don't need to submit the form to anyone, just fill it in and keep a copy. I can't figure out how to remove this button. It's not one I've created, it's the one that it automatically generates when you don't have a submit button in your form. Is it possible to remove this button or do we just have to live with it? I am using Adobe Acrobat X Pro.
    Thanks

    You can have more control on the email subject/ to and CC Email address, if you use a regular button and place the code in the click event.
    Refer to the attached sample below.
    https://acrobat.com/#d=HouRLov3lOntSbqAfsr5Hg
    Thanks
    Srini

Maybe you are looking for

  • IMac always auto detects for external monitors after waking from sleep or from display off

    I've got a Dell 24" monitor (2408WFP) plugged into my mid 2011 iMac via DVI cord and thunderbolt attachment. Things work fine. When I need to leave my computer, I usually turn the displays off using the shortcut keys: CTRL + SHIFT + EJECT This works

  • Mode not available on user portal

    If we setup the default for users to be OTP how do they change to OTP+pin and set a PIN? I turned all the users options on for the portal but the MODE option did not show up If I set myself up as an admin then I get a mode option for the user I searc

  • OIM 11g giving roles

    Hi all. I'm trying to customize the self-registration feature in such a way. In particular I need that after the self-registration, a user automatically get assigned to a specific role. By default OIM assign to all registered users "ALL USERS" role (

  • Command-tab pop-up list of apps switches monitors

    The command-tab pop-up list of apps switches monitors sometimes on my two-monitor system. Why? Why doesn't it always appear on the monitor with menubar specified in Displays preference panel? How do I switch it back when it moves to the wrong monitor

  • JDBC with 8.1.7

    Hi, I have installed a new Oracle 8.1.7 client on Sun box. And when I ran my JDBC/OCI client I found out that after the connection is closed, the password for the user who was connecting has been changed without any obviuos reasons. If you meet the s