Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Designer
Viewing all 16286 articles
Browse latest View live

Copy all subform data and paste into another subform

$
0
0

Need: I would like to have a button within a subform that allows you to copy all the data (many fields) and then paste it into an empty copy of the subform. Of course the info pasted would fill in all the fields etc.

 

Reason: We routinely need to move subform data from page 3 in the document to page 11 (example). Currently we insert a new subform and copy/paste each field from 3 to 11 and then delete 3. It would be great to press a copy button in 3 and insert a new subform and paste.into 11.

 

Is this possible?


How to convert numbers to text in a form created in LiveCycle Designer?

$
0
0

I am relatively new to Livecycle Designer and very much a newbie with JavaScript and FormCalc.  I have created a Conditional Sales Contract form and when the user enters a dollar amount (1548.95) I would like to know how to  auto fill a text field with its text equivalent ( One Thousand Five Hunderd and Fourty-eight dollars and ninety-five cents).  I have found two forums explaining how to do this in Acrobat 8 but nothing in LiveCyle Designer.   Can this be done in LiveCycle and can anyone please help me with the script?

thanks

Remove spaces from a text field

$
0
0

I need to remove spaces from a text field in case the end user uses the space bar

to erase text. I found this script on the Forum:

 

function RLTrim(Cadena){
var str = new String(Cadena);
return str.replace(/(^\s*)|(\s*$)/g,"");
}

 

I already have JavaScript in the Exit event on this field. I'm not certain where I should put this new script.

 

Thanks,

MDawn

How to get the current row index of a subform?

$
0
0

Hello Adobe experts,

 

first of all I have to apologize beforehand, if I don't provide all the necessary information of my problem. It's my first question here...

I'm using the livecycle designer in combination with SAP to create print forms, so I have to deal with most of the provided XML data. My problem is the following:

 

In our invoice form we have a subform "position" which contains another subform "data" which is repeated by the number of positions we have in our invoice. So if a customer bought three items, the subform "data" gets also repeated three times. To display certain kind of

pricing information, I really need to know the row index of the subform.

For example:

 

Row index 1 --> Item No. 9876, 14$

Row index 2 --> Item No. 9871, 10$

Row index 3 --> Item No. 9870, 12$

 

I already tried POSITION.DATA.instanceManager.count in the calculate event of a field in the subform, but it only returns 3, the absolute number of rows.

 

 

I'm sure, there is an easy solution, but I really didn't find anything so far.

 

 

Thanks in advance

André

Table Headrow repeats itself improperly

$
0
0

Hello,

THIS IS URGENT:

 

It is been quite some time now, I am trying to sort out a problem I am facing with repeating headrow of a table. I have tried almost every forum in adobe, and a lot of google links on the subject but does not seem solve my problem. Your help on this is greatly appreciated.

 

PROBLEM:

I have tables on my form that I need their headrows to be repeated on subsequent pages (not limited to second page). On the preview of the Adobe Livecycle it works fine, however once I open it with Adobe Acrobat 9 to enable "Extend Features in Adobe Reader" to be able to save information on the form, things get messy.

After enabling the Extend Features in Adobe Reader, I open Adobe Reader to type information, and my table goes for three pages long, and after I am done typing I save it and close. When I come back to reopen the form, I see that the heading row has repeated itself 3x on the first page, and the rest of the document it is fine. Why it is repeating itself 3x on the first page, i have no clue. but it is rather strange in deed, and it looks ugly.

 

Some Background info about a typical table of my form:

 

Hierarchy:

 

1. SUBFORM: Content:Flow; Allow Page Breaks within Content; Repeat Subform For each data item-min count 1

1.1 TABLE: Allow Page Breaks within Content

1.1.1 HEADER ROW: Allow Page Breaks within Content; Include Header Row in Initial Page; Include Header Row in Subsequent Page (if the latter one is removed, then the head rows does not repeat itself in a wired way on the 1st page after saving information on the form, but it repeats itself only for 2 pages not more)

1.1.1.1 SUBFORM: Flowed;

1.1.1.1.1 Text box: Allow Page Breaks within Content; Keep with next

1.1.1.1.2 Text box: Allow Page Breaks within Content;

1.1.1.1.3 Text box: Allow Page Breaks within Content;

1.1.1.1.4 Text box: Allow Page Breaks within Content;

1.1.1.1.5 Text box: Allow Page Breaks within Content;

1.1.1.2 Text box (empty)

1.1.1.3 Text box (empty)

1.1.2 ROW1: Allow Page Breaks within Content;

1.1.2.1 Button (JS scrpit for numbering the rows, and adding rows)

1.1.2.2 Text Field - normal settings -  allow multiple lines, expand to fit

1.1.2.3 Text Field - normal settings -  allow multiple lines, expand to fit

1.1.2.4 Text Field - normal settings -  allow multiple lines, expand to fit

1.1.2.5 Subform: Positioned

          1.1.2.5.1 Button (JS script button for moving up the row)

          1.1.2.5.2 Button (JS script button for moving down the row)

1.1.2.6 Button for deleting rows (JS Script)

1.1.3 Subform: Positioned

1.1.3.1 Button (JS script for adding rows below the last row of the table)

1.1.3.2 Button (JS script for activating the deletion button - 1.1.2.6)

 

I want that all the elements in red to be repeated on subsequent pages (not limited to page 2), properly without duplicating itself on the first page.

If necessary I can send you the file.

As said this is rather urgent, thus your reply at your earliest convenience is greatly appreciated.

 

Many thanks.

 


 


 

 

 



JavaScript/FormCalc Calculating Total Sum

$
0
0

Hi, I am building a fillable PDF payment form with LCD and have run into a problem with calculating the sum. I have a 10-Rows table where people can fill-in the prices and I have a another "Total Amount" box that I wish will automaticlly add up the total sum of all the prices. However, after spent nearly an entire week of trying, I can not get it to work....

 

I am a newbie at this and as of now, I have tried renaming the price boxes into "price1, price2, price3..." and used "Sum=(amount[Price1, Price2, Price3...])" in the Script Editor and I have tried with both languages(javascript/formcalc)..... but everytime when I go to preview, it either tells me that there is an error or the formula just doesn't do anything at all.... I don't understand where did I do wrong. It seems to me that I have done everything suggested on the discussions

 

Please do help if you can and THANK YOU VERY MUCH!!!!

 

PS: How do I upload the file?? it would be much easier to understand what I mean if you can see the form yourself.

Multiple repeating SubForms binding to the same data node

$
0
0

Having multiple repeating SubForms binding to the same data node : In our documents, many times we need to display information from same table in multiple locations. For example, if document displays information of Insureds on one page and information of drivers on another page, we need to create a LiveCycle document with two SubForms. Each SubForm needs to have a repeating binding to CommonInsured element in XSD.  LiveCycle Designer is not able to handle such case. We cannot have two subforms bound to the same node, ONLY in a case where repeating option is selected for data binding.

The only way I have found out is the following Javascript

//Get the data node from XML. You will find the code for this function in //JavaHelperFunctions library.

// InsuredDataRepeatingSubForm is a second subform.

//You need to manually add instances to this subform at the

//runtime and Insured data to each instance.

 

var insuArray = JavaHelperFunctions.getInsureds();

    var i=0;

    for( i=0; i<insuArray.length; i++)

    {

       if (i>0)

       {

var thesubform = this.InsuredDataRepeatingSubForm.instanceManager.addInstance(i);

              thesubform.InsuredName.rawValue = insuArray[i].fullName.value;

       }  

       else

       {

               this.InsuredDataRepeatingSubForm.InsuredName.rawValue = insuArray[i].fullName.value;

       }

    }

 

Is there any way I can achieve directly using bindings since we are trying to minimize javascript that changes the layout of the form?

 

Thanks in advance!

Blank Space leading the text field

$
0
0

Hey guys ,

 

I have 5 text fields vertically one over the other in the layout name,address, street , street2 , post code . I have binded the text fields with an internal table(SAP) that populates the data on to the text field. Among the five two fields street 2 and post code works fine without any space leading them but the other three fields are having a blank space leading them i.e. blank space and name/address/street gets printed. How to remove the blank spaces using javascript or formcalc and which event is to be used ?

 

Please help me out.


How to calculate the number of row in a dynamic table

$
0
0
Hi,
I've got a dynamic table where rows can be added by the user, in each row there's a checkbox cell. At the end of the table there's a "fixed" row where I have to count the number of the checked dynamic rows. How can I do that?

Thanks for your help.
Pascal.

PDF form - email subject line = field

$
0
0
I am creating a PDF form on our intranet to be filled out and submitted via email with a submit button. All works well, but the recipients would like the subject line of the email to be info from the first field on the form so that it is easily searchable. I am using Adobe LiveCycle Designer 8.0 (also have Acrobat 8 Professional) but haven't found anywhere to edit this info.  I have read thread referencing possible solutions by utilizing javascript, but I'm not sure where to begin where javascript is concerned (not my forte).
Right now the form is Submitted by Email via a "Button" set to Control Type: Submit. Under the Submit tab I have set the Submit to URL field to - mailto:"emailaddress".

 

Also, the recipients mentioned that they can't see the PDF in the body of their email, instead its only an attachment. We are all using Outlook and Outlook Webmail and would like to see the PDF in the body.  Is there an easy way to accomplish this as well?
Any helpful suggestions would be greatly appreciated!

Linking textboxes

$
0
0

I have two things I would like to be able to do:

 

1.  I have a form that requires text to be entered on lines, because of this, each line has it's own text box.  I'm wondering if there is a way I can link them so that once one textbox is full, the text automatically is placed in the next text box.  I think I have found a couple ways to do this online already using javascript.  However, I have no idea how to begin going about inputting the codes?

 

2.  I was wondering if there was a way to make it so that information typed in one textbox appears in a second text box as well?

Create, or populate table with an array

$
0
0

Hi,

 

I have an array of data that I want to pass from a button to a function to create a table.

 

I just started using LiveCycle two hours ago.

 

I am very good with JavaScript and Acrobat.

 

But this has me stumped.

 

I found a page with a function, but it takes JSON and so I'm trying to decode it to use an array and allong the lines it's getting stopped up and I'm getting this error

 

GeneralError: Operation failed.

XFAObject._Row:33:XFA:form1[0]:#subform[0]:Button1[0]:click

Invalid property get operation; subform doesn't have property '_Row'

 

Here's the page I found

http://blogs.adobe.com/acdc/2009/02/dynamically_creating_a_table_w.html

 

and here's the code that I have modified.

 

form1.#variables[0].createTable - (JavaScript, client)

/**

*          Create rows and columns based on the number of data items and number of attributes

*/

function createTable(product, table)

{

 

 

// Evaluate JSON string into a array of JavaScript objects

// See the StringSO script object for the prototype function

//var data = jsonString.evalJSON();

 

 

//var attributes = new Array();

//var attributeCounter = 0;

var row = table.somExpression + ".Row";

 

 

var pageWidth = 8; // inches;

var cellWidth;

var columnWidthsString = "";

 

 

// Get all attributes

/*

for(var a in data[0])

{

attributes[attributeCounter++] = a;

}

*/

 

 

// Calculate the cell width based on number of columns and page width

cellWidth = .5 //pageWidth/attributes.length;

 

 

// Create first column for all rows

for(i = 0; i < 10; i++)//consider. product.length, was data.length

{

table._Row.addInstance(0);

}

 

 

// creating columns

for(i = 0; i < attributes.length; i++)

{

for(var n = 0; n <= data.length; n++)

{

var column = row + "[" + n + "].Column[" + i + "]";

var cell = column + ".Cell";

 

 

// Set the value in the cell

if(n == 0)

{

xfa.resolveNode(cell).rawValue = attributes[i];

}

else

{

xfa.resolveNode(cell).rawValue = data[n-1][attributes[i]] + "";

}

 

 

if(i < attributes.length - 1)

{

var t = row + "[" + n + "]";

xfa.resolveNode(t)._Column.addInstance(0);

}

 

 

// Set cell width

xfa.resolveNode(cell).w = cellWidth + "in";

}

 

 

// Building column widths string

columnWidthsString += cellWidth + "in ";

}

 

 

// Set column widths

table.columnWidths = columnWidthsString;

 

 

// Make the table visible

table.presence = "visible";

}

 

I basically started commenting stuff out to figure out what does what and I was going to let the errors in the console show me the way, but I'm stuck on _Row. It's throwing an error, even though this looks like a built in property.

 

So I'm thinking maybe I set up my table and form wrong from the start.

 

If anyone has a way to do this that doesn't involve scripting I'd be open to that as well. Thanks.

How can I check for attachments?

$
0
0

I have check boxes adding attachments to a form.  On clicking a Submit button, I need a script to check for an attachment if the corresponding check box is selected.  Any suggestions?

 

Thanks!

SumIf in an expanding table

$
0
0

Hi, I'm creating an expense report that has an expanding table. You can download it using the link here.

 

https://www.dropbox.com/s/r7qnaegkkx7a57h/Expense%20Form.pdf

 

Everything I have so far works fine. You can add as many entries as you want and it provides a grand total.

 

I'm stuck with the next step. At the bottom, I need to list all the categories in the "type" drop down, and I need to do the excel equivalent of a SumIf. So if the "type" category for the "Actual Expense" Table is "Lodging", I need a field at the bottom that says Lodging with the subtotal for all entries marked as such. If there were three Lodging entries anywhere on the table for $10 each, I want a field at the bottom that would say  "Lodging: $30".

 

Since I've taught myself everything I know on all my forms till this point, I'm stuck. Any help would be appreciated!

Include a link to attached files: is it possible?

$
0
0

Hi all,

 

I have a problem I hope you can help me with.

 

When using Acrobat,Pro you can add attachments to a PDF file and include a link in the PDF file to this attachment. As a result, if you click on the link, the attachment will open in a new window.

 

Now, I have created a form in LiveCycle Designer, and on the bottom of the form I would like to include a link to an attached file. However, it seems that I cannot edit the newly created form in Acrobat Pro. Hence, I am not able to include a link to the attached file using the method described above.

 

I cannot find an option to attach files in LiveCycle Designer, nor a way to link to an attachment. Am I overlooking something, or is it just not possible to include a link to an attachment in a form created in LiveCycle Designer?

 

Many thanks in advance for your reply!


Delete the blank page with repeating subforms

$
0
0

hi all!

 

I have a form for declarations.

Every declaration has to be set on a new page.

I solved this with a repeating subform.

And in the properties of the repeating subform the variable 'After' has 'Go To Next Page'.

This works well with only one disadvantage. In the end an empty page is also be created.

 

I would like to get rid of this empty page.

But how can this be done?

 

kind regards,

 

Anton Pierhagen

Changing X coordinate appears not to work

$
0
0

I have a text field directly on a master page (there is a good reason for this) and I want to change it's X coordinate using Javascript code like this:

 

// directly call the "x" attribute

this.x = "200mm";

//  use a method call to change it

this.setAttribute ("200mm", "x");

 

I tried using events like initilalize, calculate, form:ready, form:layout, but the field won't move.

 

What is strange is that changing the field width works, using similar code:

 

// directly call the "w" attribute

this.w = "200mm";

//  use a method call to change it

this.setAttribute ("200mm", "w");

 

What am I missing? After some googling it appears these two fields ("x" for X coordinate and "w" for width) are pretty much alike.

 

I would be happy if someone could tell me if this works for him/her. At least I would now I haven't reached a dead end.

I'm using Lifecycle ES2 by the way.

Display image based on drop down selection.

$
0
0

I'm new to Live Cycle Designer and trying to create a form where you can select a name of an image from a drop down list and that image will appear on the page to be printed.  The images would vary in size if that matters.

 

I copy and pasted code using Microsoft Front Page and it works but not sure how to convert it to a .pdf.   Maybe it isn't even possible as I'm wondering where the images would reside??

 

Here's my Front Page code:

 

<html>
<head>
<script type='text/javascript'>
window.onload=function(){
function setImage() {
    var img = document.getElementById("image");
    img.src = this.value;
    return false;
}
document.getElementById("ImageList").onchange = setImage;
}

</script>


</head>
<body>
 
<select id="ImageList">
     <option value="images/transimage.gif">Select Image</option>
    <option value="images/image1.gif">
Image 1</option>
    <option value="images/image2.jpg">
Image 2</option>
</select>
   
<p><img id="image" src="images/transimage.gif" /></p>
 
</body>


</html>


Thanks for any help.

dynamically create new table with set number of rows

$
0
0

I have a form to collect data from a region on a quarterly basis. Data is collected in a dynamic table with the ability to report, by county, in expandable rows in the table. This functionality is working fine.

 

I want to dynamically create a second table (based on the first table). I have set up a button to dynamically creates an exact replica of the first quarter table for use in filling in second quarter data. I would like to ensure that when the second quarter table is created, the entries from table 1 are populated in the second table. I think I need to use some type of a counter and when creating the second table, use the counter to establish number of rows in the second quarter table. I also want to populate the county column so the user does not have to re-enter. I see code from a similar thread on how do that part, but do not know how to dynamically and correctly created the second quarter table. The table is wrapped in a subform. The add new quarter button code is simple javascript:

 

_UPT_Services.addInstance(1)

 

Screen shot:

Screenshot 2018-03-20 14.27.22(2).png

 

 

Appreciate any help members can provide.

Sum Columns using Formcalc

$
0
0

I have created a form with 12 Columns and 23 fixed rows. In Row 1 of the table is a value, the remaining 22 rows allow the user to enter a number, what I would like to do is in the footer row be able to add up the numbers in the 22 columns and then multiple that by the value in Row 1 to give a total.

 

Any help would be appreciated.

Viewing all 16286 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>