Can Validation Script Discern If a Field is Hidden?

Hello All
I use the validation script below to check for data in required fields on my form. I recently modified the form, changing three of the required fields from visible to hidden fields. The three fields are hidden unless the user makes a specific selection from a combo box. Then the three fields become visible, and if visible, should be required.
I am stuck on how to tell the script to work as follows:
1. If the three fields controlled by the combo box are visible, then they should be checked for the required data
2. If the three fields controlled by the combo box are hidden, then the script should ignore checking them for the required data
The three hidden/unhidden fields in the script are f5, f6, f7. Is there a way in the validation portion of the script to have it determine if the field is hidden or visible, and if visible check it for the required data?
Thanks in advance for any ideas on this.
var m = this.getField("txt_subject");
var mysubject = m.value + " - Request Form Submission";
var cType = "Reader";
var cVersion = "< 7";
var nWarning = 1;
var cMsg1 = "This form cannot be submitted with your version of Acrobat Reader.";
var cMsg2 = "You must use Acrobat Reader version 7 or higher.";
// If Reader 6 or below is being used, display message telling user that "Email" and "Save Data" buttons don't work.
if (app.viewerType == cType && app.viewerVersion == cVersion)
app.alert(cMsg1 + cMsg2, nWarning)
else {
          f1 = this.getField("txt_date");
          f2 = this.getField("txt_requested by")
          f3 = this.getField("txt_requested by phone");;
          f4 = this.getField("cbo_functional area");
  f5 = this.getField("cbo_dmm_ad_spon");
          f6 = this.getField("txt_buyer");
          f7 = this.getField("txt_buyer phone");
          f8 = this.getField("cbo_dmm_finan_spon");
  f9 = this.getField("tbx_coop_dmm");
          f10 = this.getField("tbx_load_dmm");
          f11 = this.getField("tbx_expected roi");
          f12 = this.getField("txt_event");
          f13 = this.getField("txt_start date");
          f14 = this.getField("cbo_am or pm");
          f15 = this.getField("txt_target audience");
                            if (f1.value == "")
                    {app.alert ('Please enter the date you are making this request".');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f1.setFocus();}
                    else if (f2.value == "Person making request")
                              {app.alert ('The "Requested by" line cannot be blank. Please type the name of the person requesting this ad.');
            if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f2.setFocus();}
                    else if (f3.value == "Phone #")
                              {app.alert ('Please type the phone number of the person requesting this project.');
            if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f3.setFocus();}
                          else if (f4.value == "Select a Functional Area")
                              {app.alert ('Please select a Functional Area.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f4.setFocus();}
                           else if (f5.value == "Select a DMM")
                              {app.alert ('Please select a DMM.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f5.setFocus();}
                                    else if (f6.value == "Buyer's name")
                              {app.alert ('Please enter the name of the Buyer.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f6.setFocus();}
                    else if (f7.value == "Phone #")
                              {app.alert ('Please type the Buyer\'s phone number.');
            if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f7.setFocus();}
          else if (f8.value == "Select a Financial Sponsor")
                              {app.alert ('Please enter the financial sponsor.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f8.setFocus();}
                else if (f9.value == "Enter dollars or a % amount.")
                              {app.alert ('Please enter a dollar or percent amount for coop.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f9.setFocus();}
               else if (f10.value == "Enter a dollar amount.")
                              {app.alert ('Please enter an amount for load.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f10.setFocus();}
               else if (f11.value == "Enter a dollar amount.")
                              {app.alert ('Please enter the expected ROI amount in dollars.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f11.setFocus();}
               else if (f12.value == "")
                              {app.alert ('Please enter the Event name.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f12.setFocus();}
                else if (f13.value == "")
                              {app.alert ('Please enter a start date for this email.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f13.setFocus();}
             else if (f14.value == "Select AM or PM")
                              {app.alert ('Please select AM or PM for the Deployment time.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f14.setFocus();}
                else if (f15.value == "")
                              {app.alert ('Please describe the target audience for this email.');
          if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0)
          f15.setFocus();}
             else
                              // Email PDF.
                              this.mailDoc(true, "[email protected]", "", "", mysubject);}

I went through the form, and realized I am partially where I need to be: The required fields script checks the first of the three unhidden fileds, but then skips the other two.
To recap, I have a combobox that, if the user makes a specific selection, that selection will make three hidden fields visible. When checking the fields on the form, the required fields script should then proceed as follows:
1. If the three fields controlled by the combo box are visible, then they should be checked for the required data
2. If the three fields controlled by the combo box are hidden, then the script should ignore checking them for the required data
The three hidden  fields are:
cbo_dmm_ad_spon
txt_buyer
txt_buyer phone
When the three fields are visible the script checks the first one, cbo_dmm_ad_spon, but skips checking txt_buyer and txt_buyer phone, and instead goes on to the cbo_dmm_finan_spon field.
I believe I've correclty implemented what AcroBishop recommended. Does anyone see where I may have gone wrong?
var correctVersion = (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.0);
var m = this.getField("txt_subject");
var mysubject = m.value + " - Email Request Form Submission";
var cType = "Reader";
var cVersion = "< 7";
var nWarning = 1;
var cMsg1 = "This form cannot be submitted with your version of Acrobat Reader.";
var cMsg2 = "You must use Acrobat Reader version 7 or higher.";
// If Reader 6 or below is being used, display message telling user that "Email" and "Save Data" buttons don't work.
if (app.viewerType == cType && app.viewerVersion == cVersion)
app.alert(cMsg1 + cMsg2, nWarning)
else {
          f1 = this.getField("txt_date");
          f2 = this.getField("txt_requested by")
          f3 = this.getField("txt_requested by phone");;
          f4 = this.getField("cbo_functional area");
  f5 = this.getField("cbo_dmm_ad_spon");
          f6 = this.getField("txt_buyer");
          f7 = this.getField("txt_buyer phone");
          f8 = this.getField("cbo_dmm_finan_spon");
  f9 = this.getField("tbx_coop_dmm");
          f10 = this.getField("tbx_load_dmm");
          f11 = this.getField("tbx_expected roi");
          f12 = this.getField("txt_subject");
          f13 = this.getField("txt_objective");
          f14 = this.getField("txt_start date");
          f15 = this.getField("cbo_am or pm");
          f16 = this.getField("txt_target audience");
                            if (f1.value == "")
                    {app.alert ('Please enter the date you are making this request".');
           if(correctVersion) f1.setFocus();}
                    else if (f2.value == "Person making request")
                              {app.alert ('The "Requested by" line cannot be blank. Please type the name of the person requesting this ad.');
           if(correctVersion) f2.setFocus();}
                    else if (f3.value == "Phone #")
                              {app.alert ('Please type the phone number of the person requesting this project.');
           if(correctVersion) f3.setFocus();}
                          else if (f4.value == "Select a Functional Area")
                              {app.alert ('Please select a Functional Area.');
           if(correctVersion) f4.setFocus();}
                else if(f5.display == display.visible && f5.value == "Select a DMM") {
  app.alert ('Please select a DMM.');
           if(correctVersion) f5.setFocus();}
                     else if (f6.display == display.visible && f6.value == "Buyer's name")
                              {app.alert ('Please enter the name of the Buyer.');
           if(correctVersion) f6.setFocus();}
                    else if (f7.display == display.visible && f7.value == "Phone #")
                              {app.alert ('Please type the Buyer\'s phone number.');
           if(correctVersion) f7.setFocus();}
          else if (f8.value == "Select a Financial Sponsor")
                              {app.alert ('Please enter the financial sponsor.');
           if(correctVersion) f8.setFocus();}
                else if (f9.value == "Enter dollars or a % amount.")
                              {app.alert ('Please enter a dollar or percent amount for coop.');
           if(correctVersion) f9.setFocus();}
               else if (f10.value == "Enter a dollar amount.")
                              {app.alert ('Please enter a dollar amount for load.');
           if(correctVersion) f10.setFocus();}
               else if (f11.value == "Enter a dollar amount.")
                              {app.alert ('Please enter the expected ROI amount in dollars.');
           if(correctVersion) f11.setFocus();}
               else if (f12.value == "Launch? Expanded assortment? New sizes?")
                              {app.alert ('Please enter the subject of this email.');
           if(correctVersion) f12.setFocus();}
                                 else if (f13.value == "Drive sales? Informational?")
                              {app.alert ('Please enter the objective of this email.');
           if(correctVersion) f13.setFocus();}
                else if (f14.value == "")
                              {app.alert ('Please enter a start date for this email.');
           if(correctVersion) f14.setFocus();}
             else if (f15.value == "Select AM or PM")
                              {app.alert ('Please select AM or PM for the Deployment time.');
           if(correctVersion) f15.setFocus();}
                else if (f16.value == "")
                              {app.alert ('Please describe the target audience for this email.');
           if(correctVersion) f16.setFocus();}
             else
                              // Email PDF.
                              this.mailDoc(true, "[email protected]", "", "", mysubject);}

Similar Messages

  • Error message on validation script

    Hi Guys,
        I created a validation script for MA to check the fill on the extention collection as below.
    productColln = doc.getExtensionCollection("PROD_HIER");
    productItr= productColln .iterator();
    for(member : productItr){
              if(!hasValue(member.get("fieldA"))){
                   exception.chainAtEnd(member.createApplicationException("fieldA","Please enter Max Value"));
              if(!hasValue(member.get("fieldB"))){
                   exception.chainAtEnd(member.createApplicationException("fieldB","Please enter the Unit Price"));
    if(exception.getChain() != null){
        throw exception.getChain();
        1. When the 'fieldA' and 'filedB' are blank, the error message is shown only for 'fieldA'. After i complete 'fieldA' the error message will be shown for 'fieldB'. It seem like it will show only for first one which is put in the chain. I would like the message to show all message in the chain.
        2. When the error message is shown the both fileds are covered by the red line but i would to have the red ' ! ' appear on the tab (ex. for product tab) as well. How can i implement that?
    Noppong,
    Thank you in advance

    Hi Noppong
    My understanding is once system gets an exception, it skips to throw statement and the subsequent exceptions, if any ,are skipped. Use of chain exception allows one to write one throw statement in the code rather than multiple throws at various points.
    I may be wrong so appreciate if someone can validate this.
    Regards
    Mudit Saini

  • Validation Script for Dates and General Event Questions

    I have just started using Javascript, and am now using some objects and methods etc. that I did not even know about. It's progressing rather well, now I need to know some Livecycle Designer Basics that I can't seem to answer from my searches.
    Here's what I am trying to do in English:
    I want users to choose a date that they will miss at our Farmers Market. I have the date field on the form - works well.
    I want to validate the entry for:
    The date must be today or in the future
    AND
    The date must be before the closing date
    AND
    The date must be a Saturday
    Here's some script I've written and placed in the Validation Event (I have actually written more for testing out that the results are coming out properly):
    ----- form1.#subform[0].Missdate::validate - (JavaScript, client) ----------------------------------
    var entereddate = this.rawValue;// The date vendor will not attend as entered on the form
    var dentry = new Date(entereddate.slice(0,4),[entereddate.slice(5,7)-1],entereddate.slice(8,10),0,0,0); // month starts at 0!
    var closingdate = "October 04,2008" // closing date of the market
    var today = Date();// today
    (dentry.getDay() = 6);// and attempt to validate that the day = Saturday - nothing happens!
    But now -
    How do I actually validate this - my last statement seems to be ignored. How to I force a 'false' being returned? In Formcalc I simply put a camparison statement here and if it resulted in 'False' validation failed and if it resulted in 'True' it passed - What's the JS equivalent? Or are the variables giving me troubles?
    Maybe I'm putting this in the wrong Event? If so which one should I place it in.
    I want to force the user to enter the correct data - how do I code this - and put in a custom message refering to this. I may even get fancy and ask the user if the next Saturday is what they meant if they enter the incorrect one (this will be a real challenge!)
    I think I'm lacking some basic knowledge here that other posts have assumed. Please refer me to any help pages as well - although I've done extensive searching on this and have not really found a good explanation of Validation - only specific pages that are not basic or general enough for my understanding. Thank!

    In the validation script you have to allow the field's length to be 0, or
    it will not be possible to clear it...

  • How to validate a date in a validation script

    I have a date field for which I have set a validation pattern using its Object palette i.e. Object > Value tab > Validation Pattern > Validation tab. The validation pattern I have there is simply 'date{YYYY-MMM-DD}' with an error message set in the Validation Pattern Message box.
    How do I perform this same validation using a javascript in the Validation event?
    I'd like to use a script instead so that I can better control when this validation will be performed.
    Thanks!!
    Marc

    Marc:
    If your field has a display picture clause, then you can detect if it formatted correctly by looking at field.formattedValue
    Specifically, if the value cannot be formatted, the formattedValue will be the same as the rawValue (unformatted).
    So a validation script that specifies:
    this.formattedValue !== this.rawValue;
    should detect invalid dates.
    See: http://blogs.adobe.com/formfeed/2011/06/understanding-field-values.html
    good luck
      John

  • Using SQL in a validation script

    Hi Experts!
    Can you give me an example code part of using a SQL select query in a validation script?
    My aim is to query an extension table with a parameterized select and extract a single field value,
    which can be used for further processing.
    Regards,
    Zolchee

    import com.frictionless.api.common.platform.IapiDbHandleIfc;
    dbHandle = session.getDbHandle();
    dbHandle.beginTransaction();
    sQuery = "SELECT DOC_DESCRIPTION " +
         "FROM " +
         "FCI_CUSTOM_MD2 " +
         "WHERE " +
         "EID = '" + sParameter + "'";
    dbHandle.executeQuery(sQuery);
    This is an example how the query should look like, but can you please tell me how to use the results of the query?
    Are the results stored in a ResultSet? How to extract them? The above query should return only one item - how to get that?

  • Acrobat 6.0 validation scripts

    Hi
    I am new to scripting and need a little help with validating scripts.
    I use Acrobat Ver 6.0 to create simple editable pdf's.
    Some of the fields I want to set the validation such that they conform to the following:
    Standard text field are set to capitalise
    Postcode field to convert all letters to capitals
    On a seperate point, can someone point me in the direction of having an email button?
    When i have tried submit buttons in the past and saved the pdf; when opened again in pdf reader the security settings prevent the document being edited.

    The custom validate script would look something like:
    // Custom validate script
    event.value = event.value.toUpperCase();
    If you want to captialize as the user enters the text, you can use use the Keystroke event, but the script would be different.
    Note that Acrobat 6 cannot Reader-enable a document so that it can be saved, but it should still be fillable in Reader if it's not. Acrobat 8 was the first version that allow Reader-enabling. If you set up the submit form action so that only the form data is included, as opposed to the entire PDF, it does not need to be Reader-enabled.

  • Starting a service automatically from a validation script

    Is it possible to start off a service from a javascript running on the page or as part of form validation ?
    When the user is filling out a form, based on the form field validation script I want to be able to invoke a new service. The javascript could also be a page validation script, and so I could do the same validation based on DOM. Bottom line is that I am seeking a way to launch a service and have the service form presented to the browser where this javascript is running.
    Thanks.

    The approach might depend a bit on your use case but one way is to submit a request through the Requisition API (RAPI) through a JavaScript XHR HTTP POST, I believe a similar technique is used in some of the IAC portlets to submit services such as Power Up and Power Down without launching an order form.
    The Requisition API is documented in the IntegrationGuide but you can access the WSDL under the following url: http://<ServerName>/RequestCenter/webservices/wsdl/RequisitionService.wsdl
    Alternatively, if you just want to show a new order form in a popup, you can make use of the GreyBox library that is loaded using the GB_showFullScreen function to launch a service in a popup window, to achieve this though you would need to know the service ID to enter in the URL.
    Hope this helps.

  • Validating and highlighting a form fields.

    Hi all!
    I have a form, with a lot of fields, which must be NOT blank. And they must NOT be highlighted.
    So, on the one hand: i have to make these fields required, for don't let users print the form with blank fields. But if I’ll do it with standard settings, the fields will be highlighted with a red color (default settings of the acrobat reader). Yes, these settings can be changed in Acrobat Reader, but as the form will be used by a lot of users - i can't force them all change their settings.
    On the other hand: If the form fields are set to be optional, then validation scripts don't work on empty fields.
    So, is there any ways to solve this problem?

    Well, then not only red borders disapper, but also the blue highlight of fields background, so, users can't see where to type text. And that is bad(
    So, the only way i can see - is to turn off highlight (app.runtimeHighlight = false;), and also, chance fields fillColor, like that:
    enter: this.fillColor = "255,255,255";
    initialize: this.fillColor = "204,215,255";
    exit: this.fillColor = "204,215,255";
    prePrint: this.fillColor = "255,255,255";
    But this way there will be a lot of "monkeyjob" to change color setting of every field...

  • Proper Place to Add Phone Validation Script

    I am attempting to add a javascript to validate a phone number in a form. Where is the best place to put it?
    Under Properties, would it simply be under the Validate tab or the Action tab (creating a Mouse down to trigger the script?).
    I  am no javascript guru but I found a nice script, courtesy of Steve L. Walker.  I can't seem t get it to work. Also, when does javascript normally kick in, as the user begins typing or upon exiting the field?

    A validation script needs to be in the Validate tab, under Custom. However,
    the script you found will not work as-is in a form created in Acrobat. It's
    a script for a form created in LiveCycle Designer.
    Buy why do you need a script, anyway? There are very easy to use built-in
    options for enforcing a telephone number pattern under the Format tab.

  • Script to validate a field when submit button pressed not working

    I have a script to validate certain fields and generate an error message if fields are blank or not filled out correctly. Everything works fine except for one of them. I'm trying to generate an error message if one of the fields have an invalid format in it. For example, the format should be ''XXXX.XX'' (all numbers) so if they enter ''XXXX'' the error message will generate and the form will not submit. I have a function setup under this particular field and it works but unfortunately users are ignoring the error message and submitting the form anyway and this field really needs to be right before it's submitted.
    This is what I'm using for it:
    var bCancel = false;
    var strMsg = "";
    if (getField("Tracking").value == /^\d{0,4}(\.\d{0,2})?$/) {
    bCancel = false; }
    if (getField("Tracking").value != /^\d{0,4}(\.\d{0,2})?$/) {
    strMsg = "Invalid Format. Please correct before continuing. (EX: 0000.00)";
    bCancel = true; }
    So the problem is it generates the error message now even if the format is correct. I'm sure I did something wrong but I wrote the format the same way (/^\d{0,4}(\.\d{0,2})?$/) when I ran a custom format script under this field and it worked fine so I'm not sure what I'm doing wrong. I'm also including this part of the script with the rest of the field validations in the submit button. So altogether it looks something like this (just with a lot more fields, didn't include all of them bc it gets pretty redundant)
    var bCancel = false;
    var strMsg = "";
    if (getField("Tracking").value == /^\d{0,4}(\.\d{0,2})?$/) {
    bCancel = false; }
    if (getField("Employee Name").value >= 1) {
    bCancel = false; }
    if (getField("AcctNbr1").value >= 1) {
    bCancel = false; }
    if (getField("Tracking").value != /^\d{0,4}(\.\d{0,2})?$/) {
    strMsg = "Tracking field format is invalid. Please correct before continuing. (EX: 0000.00)";
    bCancel = true; }
    if (getField("Employee Name").value == "") {
    strMsg="At least one required field was empty on export. Please fill in the required fields (highlighted) before continuing.";
    bCancel = true; }
    if (getField("AcctNbr1").value == "") {
    strMsg="At least one required field was empty on export. Please fill in the required fields (highlighted) before continuing.";
    bCancel = true; }
    if (bCancel){
    app.alert(strMsg);
    } else {
    this.mailDoc({
    bUI:       true,
    cTo:      "[email protected]",
    cSubject: "Form Returned: Maintenance Form"});
    I'm fairly new to scripting, especially in Adobe, so I probably didn't do a great job with all of it. Please let me know if there's anything I need to change to get it working better. Thanks in advance for your help!

    OK, below are two regular expressions that may do what you want:
    var re1 = /^\d{4}\.\d{2}$/;
    var re2 = /^[1-9]\d{3}\.\d{2}$/;
    The first, re1, will match any four digits, followed by a decimal point, followed by two digits. A potential problem with this is it will match a string like "0001.23", which may not be what you want. If you don't want it to match a string with leading zeroes, you can use the second one, re2. It will match any digit from 1 to 9, followed by any three digits, followed by a decimal point, followed by two digits.
    The test method of a regular expression takes a string as an argument and will return true if it matches the regular expression, or false if it doesn't. Here are some example outputs given various field values and methods of getting the field values:
    // Text1 field value is 0123.45
    // Get the field value.
    // The variable num will be a number, not a string
    // num will equal 123.45
    var num = getField("Text1").value;
    // Test regular expression against num
    bOK = re1.test(num);   // returns false
    // Now get the field value as a string
    // num will equal "0123.45"
    var num = getField("Text1").valueAsString;
    bOK = re1.test(num);   // returns true
    // Now use the other regular expression
    bOK = re2.test(num);  // returns false
    // Text1 field value is now 1234.56
    // num will equal "1234.56"
    var num = getField("Text1").valueAsString;
    bOK = re2.test(num);   // returns true
    To summarize, if you want to not allow leading zeroes, get the field value using the valueAsString field property, and use a regular expression that does not match a leading zero. You should probably change the regular expression you're using in the Keystroke script if you want to prevent the user from entering a number with any leading zeroes.

  • Customd validation script syntax

    Hi,
    I use simple acroform created by Acrobat 9 pro with text field. On the text field properties -> validate tab I had put some custom javascript but it has never executed. Can you tell me what must be exact syntax for this script is it suppose to return boolean value or something ?

    There is no return code, but you may need a custom keystroke and format scripts to support the validation script.
    The validation script for inputting the first and last name with each name must start with a capital letter followed by one or more lower case letters and separated by a blank character:
    this.getField(event.target.name).fillColor = color.transparent; //clear field background
    // create RegExp string for required format
    // First and last names begin with one capital letter followed by lower case letters
    var re = /^[A-Z[a-z]+ [A-Z][a-z]+$/;
    // use RegExp test to see if format rule followed
    if (re.test(event.value) == false) {
    app.alert("That does not appear to be a valid name. I need first and last name.", 1, 0); // error message
    // other error processing options
    this.getField(event.target.name).fillColor = color.red; // use red to highlight problem field
    // event.value = ''; // optional to force complete reentry if an error
    app.beep(1); // beep sound
    } // end validation test

  • Can I add a text form field in Photoshop that can be edited in Acrobat reader?

    I design coffee labels with Photoshop then send them off to the printers. The printers then open up a PDF and put in the best before date before printing. At the moment I have to add the text form fields using Acrobat Pro after i've saved the photoshop document as a Photoshop PDF. The problem is if I want to edit the labels at a later date, I have to re-add the text form fields with Acroabat again. 
    Can I add a text form field in Photoshop that can be edited in Acrobat reader? Is it better to use another program for this task?
    Thanks in advance
    Ian

    As A1's Calculate script, under "Simplified field notation", enter:
    A * 0.8
    The same goes for B1 and B, resp.

  • How can I have text from multiple fields on one layer, copy to one field on another layer?

    A little help please as it's been years since I've done any coding of any sort.
    So I have a 4 page document with various field types.  I have a document script that gets "TodaysDate" that works perfectly and a few other scripts as well.
    So what I'm trying to do is find a work around for the following:
    I have 3 fields - SURNAME, FIRSTNAME & dob.
    And I want what is typed into these fields to populate into 1 field.  And according to this tutorial (http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript) it's not exactly possible.  At least I think that's what it says.
    However I'm hoping that maybe I could have a Submit button at the end of that document that when clicked would copy the text from those 3 fields (that I would have on 1 layer) into 1 field on a 2nd layer.  Is that even possible??
    I'd also like to have the document Print, Save (using the text in the field on the 2nd layer as the file name), Email (using the text in the field on the 2nd layer as the subject line) and Export to a specific Excel spreadsheet. 
    I don't want much do I?
    I'm using Acrobat 9 Pro on a Windows PC but also have access to Acrobat 8 Professional.  And I'm going to want the form to run in Acrobat Reader X.
    So far I have for the 3 fields into 1 on another layer:
    function buttonClick(){
    if(buttonClick==false)
    event.value=this.getField("SURNAME"+"-"+"FIRSTNAME"+"-"+"dob").valueAsString;
    But I have no idea how to call the event.value from 1 layer to another or if any of that code above would even work at all.
    I have a script that I believe will work perfectly for the Save and Email function:
    Using the “doc.submitForm()” function
    // This is the form return e-mail. Its hardcoded
    // so that the form is always returned to the same address
    // Change address on your form
    var cToAddr = "[email protected]";
    // First, get the client CC e-mail address
    var cCCAddr = this.getField("ClientEmail").value;
    // Now get the beneficiary e-mail only if it is filled out
    var cBenAddr = this.getField("BennyEmail").value;
    if(cBenAddr != "") cCCAddr += ";" + cBenAddr;
    // Set the subject and body text for the e-mail message
    var cSubLine = "Form X-1 returned from client"; var cBody = "Thank you for submitting your form.\n" + "Save the mail attachment for your own records";
    //** Send the form data as an XML attachment on an e-mail
    // Build the e-mail URL
    var cEmailURL = "mailto:[email protected]?cc=" + cCCAddr + "&subject=" + cSubLine + "&body=" + cBody;
    this.submitForm({
                cURL: cEmailURL,
                cSubmitAs:"XML",
                cCharSet:"utf-8"
    I'll work out the Export to Excel thing later as I've seen many tutorials on that.  But can I do the 3 fields to 1 thing at all?
    Please Help!!!

    Sorry Gilad.  I hope I'm not getting on your nerves (too much) but as I said it's been a while since I did any formal code. And I'm trying to do this code for a work document but I'm doing it in amongst so many other things I do for my job that it's difficult to get the time to concentrate for longer than 5 mins.
    I didn't get a chance to try that code until just now.  I guess I asked again as I thought (from what I'd read) that it wouldn't be that simple.
    So I've added that code and I get no errors.  But it doesn't appear to be doing anything either.  I've added the code like this in the Custom calculation script of a separate field I've called FileName.  And on the Button i'm using I've added:  buttonClick()
    function buttonClick(){
    if(buttonClick==false)
              event.value=this.getField("SURNAME").valueAsString + "-" + this.getField("FIRSTNAME").valueAsString + "-" + this.getField("dob").valueAsString;
    So now I'm guessing that becasue i'm not getting an error or a result that I've screwed it up still.  Have I put the code in the correct area?  Have I assigned a the buttonClick() function correctly?

  • Script for Making a Field ReadOnly

    In Oracle CRM ON DEMAND we have the “Status” dropdown field with value as “Completed” in Activities. I have Configure it in a such a way so that the Subject field becomes read only when the status is set to Completed.How to do that.

    Subject is a Mandatory Field on the Activity Object, hence you can't make it read only inspite of using Dynamic Page Layouts. Only way you can do is, by use of Field Validations.
    You can define field validations on Subject or any other field. I prefer to choose a pick list field. Define the field validation on that pick list field following this logic.
    1. If the Status is not Completed, return the current value of the field
    2. If the Status is changed to Completed, return the current value of the field
    3. If the Status is not changed and the Subject is changed, return "Non Existing Pick list value" to the field
    By following the above logic, you can literally do anything. Hope this helps

  • Additional validation for one of the fields in down payment request

    Hi All ,
      I have a requirement for doing some additional validation for one of the fields in down payment request
    (F-47) .
    I need to validate a field u2018Assignmentu2019 in the down payment request .
    Here, assignment field is mandatory and user has to enter a valid contract number. Then we have to  validate the contract number entered against the tracking number field (BEDNR) in EKPO table corresponding to the vendor.
    If the contract number entered is incorrect, then system displays a message with the valid contract number. The user can modify the assignment field with this contract number. Once the field is modified, system once again validates whether the contract number entered is valid.
    Can you please provide me your valuable inputs how to achieve this.
    Regards,
    Tripti.

    Hi Vishal ,
      Thanks for your reply. I tried searching for  them but couldn't find any.
    Regards,
    Tripti.

Maybe you are looking for

  • 10/8/2013 - Flash Player 11.9 Release Announcement

    Today we're pleased to announce that the next version of Flash Player is available for immediate download.  This update includes the following new features and improvements: New Features: Safe Mode in Safari 6.1 and higher Safari 6.1 includes an upda

  • Itunes gift cards not working with 2 separate acounts

    Hello, We need some help with Itunes gift cards. My son received two gift cards and partially used one. Then my wife received a new ipod and we set up her account on the same computer as my son's and used the same email address. Now neither gift card

  • Resolution question - transparent PNG

    Opened a 2MB transparent background PNG, made some small edits, saved back to transparent background png and now file size is 34MB.  Didn't change the dimensions of the file or it's resolution. What is happening?  I thought I was well past the stage

  • Char to Date/Date to Char in object defination

    Hi Friends, I have a column in table in date type. When I am trying to use the column in universe level it is taking as character. I am trying to convert this into date type in UDT then I am getting bellow error. How to solve this. In IDT the object

  • Who's who Infoset : Adding a custom infotype

    Dear Experts, I am in need of your valuable input on Who's who. Can we include custom infotype (9000) fields to the infoset (by coping into a custom infoset)? What is configuration needs to be done on portal side to enable the additional fields. I kn