With the help of javascript code to validate content in the text field only if the field is visible...

I have a "Lock of all areas" set up button and it took to run only if some fields are filled. The code works fine... except TextField13 does not validate correctly. TextField13 is encapsulated in a subform, titled busjus. The busjus subform is hidden at the disposal of the default form (it becomes visible only when a user selects some text in a drop-down list). I want the code to check if TextField13 is null only if the busjus subform is visible.

The problematic part of the code that does not work as expected is listed below:

partiv.nonflow.busjus.presence == visible) && partiv.nonflow.busjus.TextField13 == null ||  

Complete code is listed below:

if(partiandii.parti.TextField2.rawValue == null || 
partiandii.parti.TextField1.rawValue == null || 
partiandii.parti.DropDownList5.rawValue == null ||
//Part II: Current Job Details
partiv.nonflow.busjus.presence == visible) && partiv.nonflow.busjus.TextField13 == null ||  
partiandii.partii.NumericField2.rawValue == null ||)
{
    app.alert('Please complete all fields marked with a red asterisk and try clicking the button again.');   
}
else {
    myScriptObject.LockAllFields(form1);
}

Hello

At a glance, I believe that this piece must include the rawValue call

partiv.nonflow.busjus.TextField13

This should be

partiv.nonflow.busjus.TextField13.rawValue

so that you compare the text in the field instead of the actual field object.

Hope this helps

Malcolm

Tags: Adobe LiveCycle

Similar Questions

  • Try to retrieve the contents of a text field and use it in a conditional statement

    Hello world

    I have a form with a text field and a button. The text field is called "orderNo" and the button is called "genOrder".

    Initially, the text field is empty, and clicking on the button fills the text with an appropriate order number field.

    I have need to check the text field for the data (content) before you write the order number, in this way, if an order number is already present in the text field, it will be over written.

    My intention is to use an if / else structure to perform the tests, but I do not know how to retrieve the content of the text field (if the content is present!).

    If anyone can suggest how I can go about extracting the contents of a text field and then use it in an if / else statement it will be greatly appreciated.

    Kind regards

    DAVO

    currentOrderNo = this.getField("orderNo").value;

    If ("currentOrderNo == null | currentOrderNo ==" ") {}

    the field is empty, fill it with a new value

    } else {}

    the field is not empty, something else

    }

  • Need help adjusting Javascript code in Adobe Edge (Countdown)

    Hello

    Im a beginner when it comes to working with Javascript and Adobe Edge and need a bit of help with setting of javascript code to work with Adobe Edge. A friend of mine helped me to make this javascript code: Edit fiddle - JSFiddle
    Its a countdown simple countdown to a certain time at a certain date. What I want to do is add this code as a trigger on a text called "countdown" element (inside a symbol called "count").

    I tried to do what the code is, but it does not work. Someone at - it suggestions?

    Thank you!

    MVH,

    Paul Hermans

    You have a private message with a countdown on my own model.

    I gave your link (Edit fiddle - JSFiddle): code ==> free free numbers.

  • How can I change the contents of a text field in a PDF form with a defined variable?

    Hi all!

    First time poster and getting quite frustrated trying to understand this issue. Here's the scenario: I use Acrobat Pro 10 to create what is essentially a form of giant order. I have designed the document in InDesign, defined the various buttons and other whatnot and then it exported to Acrobat to continue the construction of the form.

    I have a radio button group called 'conference_opportunities' that contains different options at different prices, so they are all the same, but have different values (so that they belong to the same group and only one can be selected at a time).

    What I've done is created a 'MouseDown' event on the button that sets a variable called 'ConferenceOpportunity', which is equivalent to the title of the option they pick. Then, I want to take this variable and display in a text box called "Conference_Option". I use a variable because my radio buttons values are actual prices of the option they pick, so I can't set the value as the title of the option.

    If its an array of boxes and option at the bottom of the page, there is the Option that they selected, the quantity (which can change) and value (in dollars)

    I also then want to display this variable at the end of the document as a kind of summary of what they have chosen to buy as well, but I guess it's the same code.

    I'm not an expert at all Javascript, so code snippets would help greatly. I looked on the Document from Adobe on the SDK and API and have not been able to find a solution. I also turned to the Almighty google and still no luck.

    Any help would be greatly appreciated!

    Thank you all

    Right now, you have to do is use this variable to the value property of your text field... Then add this at the end of your code:

    this.getField("Conference_Option").value = ConferenceOpportunity;

    Also, I would use not MouseDown, MouseUp.

  • Code JavaScript for buttons, drop-down lists, and text fields

    Hello, I currently have a form with a drop-down list field that fills a text field with something according to what is selected in the drop-down list via a custom script typo.

    I want to add a button that something will enter the field of text according to what is selected in the menu dropdown. Copy and paste the script of hitting into the button do not work and returns an undefined value.

    I would also like to add that I am new to coding and it would be more useful if someone can provide a script for it or let me know if this is not possible. Thank you.

    OK, the script of mouse upwards for the button might look like this:

    (function () {}

    var aQuotes = [];

    aQuotes [0] = this.getField("Batch").value = util.printd ("Rmmddyy-96", f);

    aQuotes [1] = this.getField("Batch").value = util.printd ("Rmmddyy-95", f);

    aQuotes [2] = this.getField("Batch").value = util.printd ("Rmmddyy-94", f);

    aQuotes [3] = this.getField("Batch").value = util.printd ("Rmmddyy-93", f);

    aQuotes [4] = this.getField("Batch").value = util.printd ("Rmmddyy-92", f);

    aQuotes [5] = this.getField("Batch").value = util.printd ("Rmmddyy-91", f);

    aQuotes [6] = this.getField("Batch").value = util.printd ("Rmmddyy-90", f);

    Get the value (export) of the element selected in the drop-down list

    var point = getField("dropdown1").value;

    Set the value of a text field

    getField("Batch").value is aQuotes [point];.

    })();

    Replace "ListeDéroulante1" in the code above with the actual name of the relevant drop-down list field.

  • Why have I not the properties stocks, Format, validate and calculate for text fields in Acrobat DC?

    I'm looking into buying acrobat dc but note that when you make a form, text fields is more options above when property a right click. This removed the DC?

    No, he's still here.

    Try this: click Tools - prepare the form and then click on "More" to the right of the window, click "return to Acrobat Form.

  • Assign the XML content to dynamic text fields

    Hey there,

    After the search in the forums, I found that I can load files XML and content to animate CC using the XMLHttpRequest, but how do I load content in a specific dynamic text field?

    I found a few answers that confirm that we should use XMLHttpRequest and some users who made it work, but not how. Any help would be much appreciated.

    Below is how I added the request and how the dynamic field has been implemented.

    This.frame_0 = function() {}

    var xhttp = new XMLHttpRequest();

    xhttp.onreadystatechange = function() {}

    If (xhttp.readyState == 4 & & xhttp.status == 200) {}

    myFunction (xhttp);

    }

    };

    xhttp. Open ("GET","profil.xml", true);

    xhttp. Send();

    Function myFunction (xml) {}

    var xmlDoc = xml.responseXML;

    document.getElementsByTagName("nameTextField").innerHTML = / * this part is not correct, but so far I have found no better solution * /.

    xmlDoc.getElementsByTagName ("title") [0] Sublst.ChildNodes(1).ChildNodes(0) [0] .nodeValue;

    }

    }

    And for the text field (created by animate CC):

    this.nameTextField is new syc. Text ("", "53px 'Arial'");
    this.nameTextField.name = "nameTextField";
    this.nameTextField.textAlign = 'center ';
    this.nameTextField.lineHeight = 61;
    this.nameTextField.lineWidth = 388;
    this.nameTextField.setTransform (265,124.4);

    this.timeline.addTween (syc. Tween.get (this.nameTextField). Wait (2));

    I really hope someone can help, I spent hours looking and trying solutions.

    See you soon,.

    Luke

    As already said:

    this.mydynamictextfield.text = "hello I am text in a dynamic text field";
    

    If you need really, really specific, it would be in this case:

    this.mydynamictextfield.text = animals[0];
    
  • How to drive the content of a text field or table from a drop-down list selection cell?

    Users will choose an option in a menu drop-down. I want their selection to control the contents of the cells in a table or text elsewhere on the form fields.

    For example, 'The coldest season of the year' by selecting 'winter' in the menu drop-down displays in a table cell.

    Thanks in advance for the help.

    Nick

    Hi Nick,

    Here are some examples:

    https://Acrobat.com/#d=pxtis4z3OxCqWxajZwDS2Q

    https://Acrobat.com/#d=20lQl9JfL19aBtbPC1WYbw

    https://Acrobat.com/#d=Hi0ZwVgVB1PWbxc6OJ0z4A

    If you open these in LC Designer, you can view the script by selecting the menu drop down and looking at the script at the top of the window Editor. If the script editor is a single line, you can drag the lower edge to make it bigger.

    Good luck

    Niall

  • I'm looking to have an input field with the search button, search button click the search button below the search results to display. How can I do?

    I'm looking to have an input field with the search button, search button click the search button below the search results to display. How can I do?

    Hello

    998765 wrote:

    You are right

    Please pass by the database 2 day + Application Express Developer's Guide

    Check this code example

    1 create a text field element I say P1_INPUT_FIELD

    2. create a button

    Name of the button: search

    Action: Send the page

    3. change your report query and where clause to your query below

    It will search on ename and empno, in this way, you can add more columns

    SELECT EMPNO
               , ENAME
               , SAL
               , MGR
               , COMM
      FROM EMP
    WHERE TRIM(UPPER(ENAME)) like '%' || TRIM(UPPER(:P1_INPUT_FIELD)) || '%'
           OR TRIM(UPPER(EMPNO)) like '%' || TRIM(UPPER(:P1_INPUT_FIELD)) || '%'
    

    4. we find the source of the region-> page article to submit-> P1_INPUT_FIELD

    Hope this helps you,

    Kind regards

    Jitendra

  • error 1119 trying to put in place of text field with dummy text that wipes on selection

    Hi guys,.

    Brand new to Flash so bear with me...

    I try to add two text fields that contain dummy text. This text is then wiped when a user selects the this text field, although it is not wipe any text input by the user if they choose this new text box.

    Error is:

    Scene 1, layer 'Text Login', frame 2, line 91119: access of property may be undefined onSetFocus through a reference with static type flash.text:TextField.
    Scene 1, layer 'Text Login', frame 2, line 201119: access of property may be undefined onSetFocus through a reference with static type flash.text:TextField.

    Code is below.

    {

    import flash.text.TextField;

    }

    {

    var initialemailText:String = "E-mail";

    emailText.text = initialemailText;

    emailText.onSetFocus = function() {}

    If (emailText.text == initialemailText) {}

    emailText.text = "";

    }

    }

    }

    {

    var initialpasswordText:String = "Word of past";

    passwordText.text = initialpasswordText;

    passwordText.onSetFocus = function() {}

    If (passwordText.text == initialpasswordText) {}

    passwordText.text = "";

    }

    }

    }

    Any ideas?

    Thank you

    change the named functions and fix their arguments:

    function emailFocusF(e:FocusEvent):void {}

    etc.

    }

    function passwordFocusF(e:FocusEvent):void {}

    etc.

    }

  • Hidden fields are visible in the new instance of the subform.

    Hi all.

    I have the following problem:

    I have a subform with a check box and a text field.  When the box is checked, the text field is visible.  When it is disabled, it is hidden.

    I also have a button which adds another instance of the subform.  When I click and add another subform, the masked text field is visible in the new instance instead of stay hidden until the box is checked.  Also, when I add the new subform instance and select the check box, the hidden field becomes visible at first to the subform.

    Here is what I use to hide and show fields:

    If (this.) RawValue == 1)

    (form1.subform1.textfield1.presence = "visible");

    on the other

    (form1.subform1.textfield.presence = "hidden");

    The foregoing is in the initialize event and change.

    I would really appreciate help to learn how to keep each instance does not affect another, as well as the way to keep the field hidden in newly added instances of the subform.

    Thanks in advance.

    J

    Hello

    You can add the action to the checkbox for the workflow. To do this, you can right click on the checkbox under the hierarchy Panel and then click on 'Add Action '. Also if you want the field to be hiddedn in the new instance and then at design time, you must set the property of as hidden control.

    Steps to get the workflow.

    1. make a right click on the checkbox control--> click Actions--> add an Action

    2. select in the drop-down list. When the check box is cleared.

    3 set the visibility of the textfield to hidden.

    4 click Add new action as indicated below.

    5. select in the drop-down list. When the box is checked.

    6 set the visibility of the textfield visible.

    7. click OK to create the action and close the window of action.

    To set the TextField to select hidden textfield and open its property of the object. Set the value of the presence as hidden.

    ************

    Please download the https://acrobat.com/#d=hM8oyP3be4O3HRBt14CkYg sample file

  • Board for the dynamic text field problem

    I'm generating three text fields using an array of text data. The only text that appears is the content of the last element of the array. I have attached my code. Any ideas why three text fields are not created with the text inside elem table?

    Thank you!
    -Aaron

    These depths are not going to change, so each textfield replaces its predecessor. and then they all overlap because you do not change the ownership of the FLF to your textfields. (and your textformat object is not something useful, yet).

  • Location of roller on the text field.

    I created an interactive pdf in InDesign with a video integrated. Reversal of the image I have a text field are popping up with the name of the image. I need to change this name/text, where should I go in InDesign? The text field is visible in the pdf file when I roll over the image. I have looked through the windows of buttons, Animation and multimedia in InDesign, but cannot locate the domain in question. I created it 2 years therefore the empty mind!

    Thank you

    Meervaldo!

    The answer is that there is nothing InDesign (or you) have done. Looking to the reader by default of an Adobe Reader or Acrobat when it encounters a video.

    If it's an image, you can add a tip of the tool, by choosing from the menu of the Media Panel > Options PDF > Description.

    However, for some reason, you can apparently not substitute this particular kind of message that I can understand. You can view the video properties in Acrobat by clicking right on the video and choosing Properties. But I don't see a property to change the message.

  • I work in forms in Adobe Acrobat Pro - My Add a text field and add the jump buttons checkbox in the page and do not place I wish it. How should I do?

    I'm working on a scanned page that I insert form fields. I used this exact page before with no problems, but now when I go to add a text field in the box, it jumps all over the page and not have a place where I want to. How can I solve this problem. I tried to open a blank version of the page and they all do the same thing.

    Go to view show/hide - leaders & Guides and uncheck the snap to grid

    option.

    Wednesday, June 11, 2014, at 8:42, surfer hawaii [email protected]>

  • buttons radio and the presence of the text field

    New on LC and JavaScript and tries to show/hide a text field on radio button (outside the Group), select by using the presence property. Two buttons in the exclusion group (I'll call them 1 and 2), by default the text field presence should be hidden (not displayed and not take place on the layout).  I have set the default value for the '2' radio button group and want the text field to display (and have the focus, but I got this little) when the value changes to '1' to the click, then disable and hide again if you click on '2 '.  Any advice would be greatly appreciated.

    Thanks in advance.

    You can use this script to the click event of the exclusion group:

    Form1. #subform [0]. RBL::click - (JavaScript, client)

    If (this.rawValue is '1')
    {
    TextField1.presence = "visible";
    }
    on the other
    {
    TextField1.presence = 'hidden ';
    }

    Who should do it, because rb1 has value 1, and rb2 has a value of 2. RBL is exclusion group.

Maybe you are looking for

  • Youtube video of yoga stuck 8 after 27 seconds

    I have yoga 8 4.4.2 android running and the youtube app update. All tube videos you stuck exactly after 27 seconds to play. Audio to work well. Everyone face similar problem? I am doing this side only if playback of video in youtube app. If the video

  • HO to move files selected to another directory

    Hello How can I move files to another directory. For example, I want to leave *.txt c:\1 for d:\2. I so want to set the type of the vi and move to the other directory. And: It is possible to settle instead of *.txt, something like * .t so that all *.

  • sending UDP messages to different specific IP addresses

    I am trying to connect to three specific IP addresses and send messages to each using UDP for a Panel. I have three set curls in place in my program, each loop shall communicate to each IP address, but it seems that some loops take precedence over ot

  • Help - I've changed the DHCP settings and cut me my router!

    In my lame attempt to improve the security on my router (WRT54GS), I changed the authorized number of users from 50 to 4 DHCP.  As soon as I clicked 'Save Settings' systematically, I have disabled access to all computers in the home router, and now I

  • No Internet connection after system restore

    I had problems to open Windows Live Messenger last night, and I tried to do a system restore, as I noticed there were a couple of updates that have been installed throughout the day where I suspected may have caused the problem. I went back to a rest