since ‎06-01-2006
‎10-07-2020
radzmar
MVP
Betreff: Need a date field to be locked upon first signature radzmar - Adobe LiveCycle
You don't need a script. Just select the signature field and define a new collection under the Signature tab of the Object pallette. The collection defines those fields to be locked by the signaure.
4
Views
0
Likes
0
Answers
Betreff: Get the total count of current master page radzmar - Adobe LiveCycle
One way to count specific master pages is to use the resolveNodes menthod- // Count all instances of master page "MP2" xfa.form.resolveNodes("#subform.#pageSet.MP2[*]").length;
11
Views
0
Likes
0
Answers
Betreff: Digital Signature erases form field data radzmar - Adobe LiveCycle
I don't see any reason why a signature field would cause a deletion of data. Have you checked, that the field in question has a data binding? If not the entered values won't get saved into the form.
11
Views
0
Likes
0
Answers
Betreff: Hidden and Visible on Add Instance Object radzmar - Adobe LiveCycle
You're addressing the fields the wrong way. I' guessing that the subform "wrap" is the one, that contains the textfield and is going to be repeated, right?The loop than should look this way: var cSel = this.rawValue, oFields = xfa.resolveNodes("form1.P1.wrap[*].textfield2"), // wrap[*] means every instance of the subfom wrap. i; for (i = 0; i < oFields.length; i += 1) { oFields.item(i).presence = cSel == "1" ? "visible" : "hidden"; }
265
Views
1
Like
1
Answers
Betreff: absolut som expressions not working radzmar - Adobe LiveCycle
If you're using individual name for each subform and field within the forms hierachry, there is no need to use the resolveNode() method, because you can address the nodes directly. The script editor pays attention of this and automatically decides, if it is need or not.
646
Views
0
Likes
1
Answers
Betreff: absolut som expressions not working radzmar - Adobe LiveCycle
Do you face any problem with the SOM expression you get? Since the resolveNode() method is quite slow under circumstances it's the best to use the possibly shortest relative SOM expression. xfa.resolveNode() is quite the oppsite, since it start's at the very first note within the XFA tree to find the desired node. I suggest to avoid the usage of resolveNode() or resolveNodes() it possible. https://blogs.adobe.com/formfeed/2008/12/object_expressions_in_xfa.html
632
Views
0
Likes
1
Answers
Betreff: Live Cycle Designer edit caption radzmar - Adobe LiveCycle
From my experience this possibly happend when the spell checking was active. Try to turn it off under [Tools] > [Options] > [Spelling].https://help.adobe.com/en_US/livecycle/11.0/DesignerHelp/WS107c29ade9134a2c562f8a7112a2a888e22-8000.2.html
520
Views
0
Likes
0
Answers
Betreff: For loop with multiple variables and math calcul... radzmar - Adobe LiveCycle
I think you should change the formula the following way, to get the right results. var Fields = xfa.resolveNodes("CommRtng[*]"), Answered = 0, Values = 0, Rating = 0, i; for (i = 0; i < Fields.length; i += 1){ if (parseInt(Fields.item(i).rawValue, 10) > 0) { Answered += 1; Values += parseInt(Fields.item(i).rawValue, 10); } } Rating = 100 / (Answered * 5) * Values this.rawValue = Rating; To fire this calculation just once, put the script into a click event of a button so it's executed only when t...
1011
Views
1
Like
0
Answers
Betreff: Get the number of logical pages a subform spans radzmar - Adobe LiveCycle
I think the problem is you're referencing th first instance of the subform and so getting always the number of pages it spans.Given your subform is named "customer" than the code xfa.layout.pageSpan(customer) really means xfa.layout.pageSpan(customer[0]) which is the first instance. For repeated objects you'll need to address the desired instance. This can be done either direct or relative. For the direct way you'll have to know the SOM expression of the addressed object in question. This means ...
1358
Views
0
Likes
0
Answers
Betreff: Get current master page number in formcalc/Javas... radzmar - Adobe LiveCycle
Hi, so I guess you're trying to get the n-th instance of a master page used as background of a specific form page? In that case you'll need a combination of several scripting methods to find out. Given you have a field somewhere in the form, to display the current index the script looks this way: this.rawValue = xfa.layout.pageContent( xfa.layout.absPage(this).toString(), "pageArea", true).item(0).index + 1; How it works:Determine the 0-based-page number of the field with xfa.layout.absPage(this...
2686
Views
2
Likes
1
Answers
Betreff: Table inside table must grow together radzmar - Adobe LiveCycle
Hi, you can use a script to "synchronize" the heights of the inner and outer table. Aussumed you have the following hierarchy. Put this script into the layout:ready event of the row "NestedRow" of the nested table.var cUnit = "mm", nRefH = xfa.layout.h(Table.Row, cUnit), nThisH = xfa.layout.h(this, cUnit); NestedCell1.minH = nRefH > nThisH === true ? nRefH.toString().concat(cUnit) : "5mm"; // replace 5mm with a minimum height of your choice. xfa.layout.relayout(); The script will compare the hei...
2674
Views
0
Likes
1
Answers
Betreff: Can i add Input Text Field into a Checkbox Caption radzmar - Adobe LiveCycle
Captions aren't editable that way. But, there's a solution by John Brickman that works for static texts you can use.https://blogs.adobe.com/formfeed/2010/09/editable-floating-fields-v3.html Just put your checkbox into a subform that flows left to right, set it to be without a one caption and place a text next to it using the solution above.
2082
Views
0
Likes
0
Answers
Betreff: For loop with multiple variables and math calcul... radzmar - Adobe LiveCycle
Hi, your current script has some issues, so it could not work. Let me explain: var Fields = xfa.resolveNodes("Page2.Comm_Sub.CommRtng[*]"); var Answered = 0; var Values = 0; var Rating = (Values / (Answered*5)) * 100 // When executed here, it's just 0 and doesn't get updated later. // var i is not declared // i cannot be equal to Fields length because the nodelist created with resolveNodes() uses 0-based indexes, so i <= Fields.length creates an out-of-bounds-error. for (i=0; i<= Fields.length; ...
2771
Views
1
Like
2
Answers
Betreff: Field Forms blink/flash in LiveCycle radzmar - Adobe LiveCycle
This is propably an effect of one or more scripts executing over and over again. It's often because of using loops in the layout ready event or forcing to relayout the form for no reason. You should check it the existings scripts and think of a way they don not execute unneccessary often.
1943
Views
0
Likes
0
Answers
Betreff: TextField half border - Adobe LiveCycle radzmar - Adobe LiveCycle
It's not possible with just one text field but with two overlayed, you can create a similar thing. Account Number Paste this XML code into the XML source of your form right below a -element. It adds two fields, that will look this way.
3071
Views
0
Likes
0
Answers
Betreff: Conditional Page Break after Subform radzmar - Adobe LiveCycle
Change the scriping language to JavaScript.
3084
Views
0
Likes
0
Answers
Betreff: Unable to hide subform in table cell dynamically radzmar - Adobe LiveCycle
Well, you can simply use this JavaScript in the calculate event of SpouseSF. this.presence = Textfield1.rawValue == "X" ? "visible" : "hidden";
4382
Views
0
Likes
1
Answers
Betreff: Unable to hide subform in table cell dynamically radzmar - Adobe LiveCycle
So, you want to hide subform "SpouseSF" if the field "Textfield1" is empty? I have a couple of questions about that: 1. Where does the data come from for "Textfield1"? 2. What's the loop for?
5717
Views
0
Likes
2
Answers
Betreff: Unable to hide subform in table cell dynamically radzmar - Adobe LiveCycle
Well, I can't say what's wrong, without knowing the hierachy of you form. But I can already see some problems in your script. 1. DON'T name variables or form objects (subforms, fields …) after scripting properties or default form elements! That's a no go and can cause very strange effects! So you better use other names than "data" or "length".2. This script will either return 0 or 1. It depends on, if the an element DATA below GT_TABLE below the fourth subform below the third subform below the f...
4432
Views
0
Likes
1
Answers
Betreff: date field auto fill text boxes radzmar - Adobe LiveCycle
Hi, with FormCalc you can easily calculate dates.In the exit event of you date field, add a script like this if ($.isNull eq 0) then var nDate = Date2Num($.formattedValue, "MM/DD/YYYY") Mon = Num2Date(nDate - 6, "EEE D") Tue = Num2Date(nDate - 5, "EEE D") Wed = Num2Date(nDate - 4, "EEE D") ; and so on ... endif
3392
Views
1
Like
0
Answers
Betreff: Script help radzmar - Adobe LiveCycle
It's not posible.
3236
Views
0
Likes
0
Answers
Betreff: Need a Date Time Field to be locked upon 1st tim... radzmar - Adobe LiveCycle
Don't use the Action Build if possible. It creates very complex scripts, that are hard to read. Just add the following JavaScript with the script editor. if (this.isNull) { this.rawValue = util.printd("yyyymmddHHMMss", new Date()); }
4343
Views
0
Likes
1
Answers
Betreff: Problem with Data Flow within a form radzmar - Adobe LiveCycle
If you change values of a field via scriptings it will not execute specific events like enter, click, exit or change. If a script resides in one of those events, you'll need to trigger it programically too. // Code to execute the exit event of Textfield1. Textfield1.execEvent("exit");
3189
Views
0
Likes
0
Answers
Betreff: Need a Date Time Field to be locked upon 1st tim... radzmar - Adobe LiveCycle
To execute a script just once use an if expression. Here's an example.// Only if the field is blank, execute the following script! if (this.isNull) { // Put the script to be executed here! } The e-mail can be populated with values from form fields. I made a small macro, that helps you to create such script easily.Here you go: https://thelivecycle.blogspot.com/2012/05/mailto-maker-marco-v1.html
4479
Views
0
Likes
1
Answers
Betreff: ***HELP*** Need Script that populates descriptiv... radzmar - Adobe LiveCycle
Hi, you can realize this with an array of nested arrays and two javascript functions. One is to populate the selectable values in the dropdown list the other to populated the description ond price depending on the selection. First, you need to add a script object to your form. Name it "formFunctions" or whatever you like. In this script object you enter the array and the two functions. // Array with data var aItems = [ // Nested arrays with item number, description and price ["123", "Chair", "99...
3173
Views
0
Likes
0
Answers
Betreff: Auto calculate end date radzmar - Adobe LiveCycle
Hi, the end date calculation isn't that trivial, since some months have more days than others, so simply adding a fixed amount of days won't work in some circumstances.Here's a FormCalc script that will do take care of this. if (HasValue(StartDate) eq 1) then var cPattern = "DD/MM/YYYY" var nDate = Date2Num(StartDate.formattedValue, cPattern) var nStartDate = nDate var nEndDate var nCountMonths = 18 var nUltimo var nPrevMonth var nNextMonth ; Get target month while (nCountMonths gt 0) do nPrevMo...
3101
Views
0
Likes
0
Answers
Betreff: scripting - cannot access textfield if its value... radzmar - Adobe LiveCycle
You can add a check for null values, to make this work.var oField = xfa.resolveNode('page.table.row.TxtElement'); if (oField.isNull) { xfa.host.messageBox("The field is empty"); } else { xfa.host.messageBox(oField.rawValue); }
3312
Views
1
Like
0
Answers
Re: Conditional Page Break after Subform radzmar - Adobe LiveCycle
Ok, given you subforms are childs of a body page or subform named "Page", you can add this JavaScript into the contidional break dialog of subform2. // If this subform is not the first visible under "Page", create a page break. Page.resolveNodes('#subform.[$.presence eq "visible"]').item(0).name !== this.name Hope this helps!
5089
Views
2
Likes
2
Answers
Betreff: How to hide dynamic table row based on cell2 data radzmar - Adobe LiveCycle
Make sure you've selected JavaScript not FormCalc as language.
6981
Views
0
Likes
0
Comments
Betreff: Dynamic Table - How do I add a row above current... radzmar - Adobe LiveCycle
Hi, that's quite simple: var i = this.parent.parent.index, j; PartB._Row1.addInstance(true); // add new row j = PartB._Row1.count - 1; // get index of last row. It's the one that was just added. PartB._Row1.moveInstance(j, i); // move it above the current row
3355
Views
2
Likes
0
Answers