Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all 5571 articles
Browse latest View live

Calculate Dates for a Week

$
0
0

Hi,

I'm working on a form where the user enters a date in a date field and I would like to write a javascript code to automatically fill in the dates for the rest of the week. So if a user enters 12/16/13 in StartDate field,  four other date fields automatically filll in with 12/17/13, 12/18/13, 12/19/13, 12/20/13 so the user doesnt have to do each one.

I would greatly appreciate any help.

 

Thanks,

vlad


Radio button validation

$
0
0

Hi

 

I am looking to put validation on a radio button that makes the user complete a checkbox, numeric field etc if the user says yes.

Issue with Checkboxes

$
0
0

Hello,

I am working with LiveCycle ES4 on PC.

I created a form that include checkboxes, I have it set at default (previously set to cross) on Check Style.

The file works fine on PC.

When opened in PDF Expert on my IPhone, I check the the boxes, save it, and then when opening the file on PC, the checkboxes disappear.

When looking at the Properties, PDF Expert added the font Zapf Dingbats as the symbol "X" for the checkbox, is not embedded so it does not appear on PC since it is a Mac font.

 

Now, I know it is a PDF Express problem.

But my question however, is if there's a way to force a font onto the checkbox that PDF Expert can use.

Or maybe if there's an alternative to checkboxes?

 

Any help is appreciated.

Check box if numeric field equals set value

$
0
0

Newbie needs help!!

 

I am trying to write a script to check a box, but only after a numeric field adds up to "4"

 

If you look at my attached file, "Student 1" has four check boxes (Pre-Course Skills, course roster, etc.).  Each time those boxes are checked/unchecked, the numeric field + or - 1 from the rawValue.  The script that I'm having problems with is on the check box next to Student 1 ...

 

Here's the "calculate" script attached to that check box:

 

if (stu1_results.rawValue == 4) {

     CheckBox_stu1.rawValue == true; // Check the box

else {

     CheckBox_stu1.rawValue == false; // Un-check the box

}

 

Any advice would be awesome!!

 

Mike Schaefer

(blinkyguy)

Check box value assigned by Numeric Field rawValue

$
0
0

This was asked and answered back in 2009 (http://forums.adobe.com/message/5944725#5944725), but I have a twist to the question:

 

I'm able to get the action to work, but not right away. I had to click around on the form to make the check box tic. I assigned the following code to the JhammerPassed-named check box:

if (JhammerSatTotal.rawValue <=80){
  JhammerPassed.rawValue =1;

} else {

  JhammerPassed.rawValue =0;

}

 

Essentially I have two boxes: one if they passed and one if they failed. So, if the value of the points awarded is greater than or equal to 80, then the 'passed' box tics. I added the less than version to the 'failed' box. They only seem to tic if I click on the JhammerSatTotal cell, then away, then back again. Is this just a quirk of the program or is there a way for it to be more responsive?

 

 

Thanks!

~Laura

Look-up name value from XML file based on user entered number value

$
0
0

My form has an "Employee Number" numeric field and an "Employee Name" textfield. I want the user to enter their employee number and have JavaScript that will "look-up" that employee number in the XML data file and return the corresponding Employee Name into the employee name textfield. I need an example XML data file and form with the appropriate script.

 

Can anyone help me with this?

How to identify if a data node exist?

$
0
0

Hi,

If a form is binded to a schema, and when the xml is supplied to the form how to identify an optional node in the xml is available or not.

 

for example if I have a XML input like below

 

<root>

     <childTable>         

          <childRow>

               <child1>

               <child2>

          </childRow>

          <childRow>

               <child1>

               <child2>

          </childRow>

     </childTable>

</root>

 

is it possible to identify if the childTable node is present in the xml input.

 

The code xfa.datasets.data.root.childTable if used fails when the childTable is not present in the input xml?

 

Please let me know if there is a way to identify if the input xml has  a specified node. Assuming that we know the path of the node in the xml structure.

 

 

Regards -

Ashok Deivaisgamani

Sending as an Email

$
0
0

When I try to submit my pdf in Lifecycle ES 8.2 as an email (live-on the web), the document saves as an attachment to my files. Any ideas?


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.htm l

 

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 to save PDF file with predefined name?

$
0
0

Hi,

 

I am new in LiveCycle Designer. I have a requirement to save a PDF file with predefined file name. When user clicks a "Save as PDF" button, the fillable form is saved with the name from the form fields (e.g. FormID_UserID_Timesstamp...)

 

I added a button (btnSavePDF) to the form (Control Type=Regular). Then I added an action with the Condition:"When button is clicked" and the Result: "Save the form". I got the JavaScripts it genreated:

 

CoverPageForm.FormPage.btnSavePDF::click - (JavaScript, client)

app.execMenuItem("SaveAs");

 

When I tested it in Adobe Acorbat XI, I have option to save it as .pdf or other file formats. My questions is how can I save it with the predefined file name as a .pdf file, instead user has option to change the file name or change the file format? Can app.execMemuItem() method take other parameters?

 

Thanks

Sam

JavaScript disallowed on certified form?

$
0
0

I have a dynamic form that is submitted using an HTTP Submit Button (pdf). The server responds with an FDF payload of JavaScript that gets executed immediately. This works fine when the form is not certified. However, once the form is certified (non visible), instead of running the JavaScript on submit, a popup says "operation is not permitted". Is there a way to return JavaScript to execute within a certified document? Using Designer ES4 and Adobe Acrobat Pro XI.

 

JavaScript FDF.png

JavaScript FDF General Error.png

 

Sample FDF:

 

 %FDF-1.2
1 0 obj <<  
/FDF <<  
/JavaScript << /After ( JavaScript Goes Here ) >>>> >>  
endobj 
trailer <<  
/Root 1 0 R >>  
%%EOF

Adobe form layout issue

$
0
0

Hi,

 

I recently designed an adobe form for invoices. When we print the forms sometimes we observed that the layout is completely disturbed on output like entire layout is tilted on the output page. I dont have any clue why it is printing like that. Please check attached image below is the sample output. After we take the print the layout on the form was tilted.Can anybody tell me how to fix this issue.

 

invoice.png

Button email for xml and pdf

$
0
0

Good afternoon,

 

I recently inherited an Adobe LiveCycle form and have been searching the forum for about a week with no luck on a particular problem.

 

I am attempting to set up my ‘Submit Button’ to generate an email that includes both the xml and pdf as an attachment.  After reading the XFA manual, I can only do one or the other, not both.

 

I need both file types in case the import xml fails on my local database; the emailed receiver could still view the data via pdf.

 

Keep in mind most of my end-users do not have adobe pro.

 

I know I could set up a control to take the xml data and fill the pdf, but for the non-savvy computer users, I am attempting to make it a one stop shop by having both the xml and pdf in the same email.

 

This is my first post; please correct me if I am presenting the information wrong.

 

Thanks in advance!

 

 

 

 

To add on to the question:

 

event.target.submitForm({cURL:"mailto:" +  "email@email.com" +"?subject="+"Request for action " + "&body=Please find attached..." ,cSubmitAs:"XML",cCharset:"utf-8"});

event.target.submitForm({cURL:"mailto:" +  "email@email.com" +"?subject="+"Request for action " + "&body=Please find attached..." ,cSubmitAs:"PDF",cCharset:"utf-8"});

 

This results in 2 seperate emails, when all I need is a single email with two attachments. Is there a way to do this?

Concat a date and numeric field

$
0
0

Hello all and Happy Holidays.

 

I am trying to ( I think) concat two fields.

The requirement is that the Invoice field will = the UserID followed by the date.

So if User ID = 1234 and the date is 12/23/13, the Invoice Number should be 1234122313.

 

I've tried various things and I'm not having luck.  I'm not a programmer, so have been trying to use the built in functions of FormCalc.

 

Any guidance would be valuable and appreciated.

 

I am on Version 10.0.2.20120224 blah blah blah

Also the Date field is being done by

 

$.rawValue = num2date(date(), DateFmt(1))

 

 

Gretchen Sheridan

 

link.jpg

Unable to get three dropdowns to autopopulate

$
0
0

I have three dropdowns that I need to autopopulate and it won't work.  When using the JavaScript Debugger I can see that it says "TypeError:... is not a function" but not sure how to fix.

 

The Three dropdowns are called:

 

     ddlIncidentLoc

     ddlIncidentArea

     ddlIncidentSubArea

 

Here is the code:

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

var g_ArrayOfficeInfo =new Array(

    new Array("Market Tower",new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: ")),

    new Array("GCCRC",new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: ")),

    new Array("SLNRC",new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: ")),

    new Array("LUSO",new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: ")),

    new Array("NE",new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: "))

);                             

var g_ArrayFieldInfo =new Array(

    new Array("Home visit",new Array("Name:")),

    new Array("Shelter",new Array("Name:")),

    new Array("Hospital",new Array("Name:")),

new Array("Court House",new Array("Name:")),

new Array("Provincial Offences Office",new Array("Name:")),

new Array("Purchase of Service Agency",new Array("Name:")),

new Array("Other:",new Array("Name:"))

);

var g_ArrayPublicInfo =new Array(Specify:”);

var g_ArrayLocInfo =new Array(g_ArrayOfficeInfo, g_ArrayFieldInfo, g_ArrayPublicInfo);

function updateAreas(objDropDown, nLocIndex)

{

    var arrayLocInfo = g_ArrayLocInfo[nLocIndex];

    for (var i=0; i<arrayLocInfo.length; i++)

    {

        objDropDown.addItem(arrayLocInfo[i][0], String(i));

    }

}

function updateSubAreas(objDropDown, nLocIndex, nAreaIndex)

{

    var arrayLocInfo = g_ArrayLocInfo[nLocIndex];

    var arrayAreasSubAreas = arrayLocInfo[nAreaIndex][1];

    for (var i=0; i<arrayAreasSubAreas.length; i++)

    {

        objDropDown.addItem(arrayAreasSubAreas[i], String(i));

    }

}

 

form1.#subform[0].ddlIncidentLoc::change - (JavaScript, client)

if (this.rawValue != xfa.event.newText)

{

    ddlIncidentArea.rawValue = "";

    ddlIncidentArea.clearItems();

    ddlIncidentSubArea.rawValue = "";

    ddlIncidentSubArea.clearItems();

    asaScript.updateAreas(ddlIncidentArea, this.boundItem(xfa.event.newText));

}

 

form1.#subform[0].ddlIncidentArea::change - (JavaScript, client)

if (this.rawValue != xfa.event.newText)

{

    ddlIncidentSubArea.rawValue = "";

    ddlIncidentSubArea.clearItems();

    asaScript.updateSubAreas(ddlIncidentSubArea, ddlIncidentLoc.rawValue, this.boundItem(xfa.event.newText));

}


Print at 2 different printers with one button click

$
0
0

I posted this in forms but thought I would post here as well to see if I can get some help.

 

I created a form using Livecycle 8.2.1. Right now when the guys use it in the field, on their laptops in their cars, they print 2 copies. One for the customer and one to bring back to the office. I would like to add a print button to the form so when they click it it will print the form on the printer in their cars and on a shared network printer at the office. Is this possible to print to 2 different printers with just one click of the print button?

 

I see when I add the print button to the form it shows this in the script editor.

 

xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);+

 

So, could I just add to the above

 

var pp=this.getPrintParams();

pp.printerName = "\\\\DPDSVR\Xerox WorkCentre 7435 PCL6";

this.print(pp);

 

Thanks for any help one could provide.

Best Method to Create Bookmarks

$
0
0

I am converting a 70+ page contract template to LiveCycle Designer 9.0.0.2 and would like to accomplish creating permanent bookmarks when the users open the form in Adobe.  Using info from this link, http://forums.adobe.com/message/4013698, I'm able to set the initial view to open showing bookmarks panel.  Right now, am still finishing the master form, so when I re-open it in LiveCycle, this setting goes away.  Once am finished with form, will re-set the initial view.  Same with bookmarks. I can create a bookmark table of contents for the contract, but if I open in LiveCycle to modify contents, I have to re-create the extensive bookmarks list in Adobe again.

 

Is there an efficient way to do this that the bookmarks will remain?  Have been reading and downloaded examples of how to create them using XML, but not quite there in understanding how to implement.

 

Also, is there any way to retain the bookmarks if printed to PDF?  In some cases the final version of the document will be printed to PDF so they can further use comment/mark-up functionality in Adobe.  Even though I've enabled form for Reader Extensions (we use professional version - reader is for some remote users), am not able to use mark-up/commenting functionality in Adobe or add/remove pages until it's been printed to PDF and no longer a LiveCycle form.  If there is something I'm missing on this side, would appreciate any advice, as printing to PDF is not the best option to gain this functionality, as it loses other important features. 

 

The form is being moved from Word to LiveCycle because it contains many sections with re-started page numbers, etc.  Am using multiple master pages in LiveCycle to handle this, and it works well.  In Word, it is too easy for someone to accidentally remove a section break and mess up the numbering, headers/footers, etc.  So am hoping to overcome the issues with LiveCycle.  Thank you for any help.

Accessor Unknown Error

$
0
0

Hello all,

 

I'm getting an "accessor unknown" error in LiveCycle, and I can't figure out why.  The error I'm getting is, "Error: accessor 'end_disposition_string' is unknown."  As far as I can tell, this is generally caused by referencing a variable that hasn't been created, but I am creating "end_disposition_string" before I reference it. The error is in the object I'm showing the code for below, and I checked to make sure I have the language set to FormCalc.

 

Any idea what I could be doing wrong? 

 

Thanks in advance for your help!



Snap1.jpg

How to generate PDF reports using a form template with data binding to columns in MS Access?

$
0
0

I need to generate PDF reports for a list of individuals using records in a database table ( MS Access ).

The content(text and images) in the PDF report will be based on the values in the database columns but will be read only for the end user in the PDF report.

 

I have designed a PDF form in LifeCycle designer ES4. The form fields have been mapped to the table columns with records in MS Access.

Please guide on how I can generate the reports offline in bulk for all the records in the database.

Do I need any other Adobe product to do this or can I generate the reports from within LifeCycle Designer ES4 by pulling the data in the database, with minimal or no coding?

 

Any inputs will be appreciated.

Thanks in advance.

Question in converting a filled LC Designer Dynamic form to XML

$
0
0

Dear all,

 

I have developed a dynamic pdf form using Livecycle Designer ES2 (which allow extended features in Adobe Reader),

 

After filling in the pdf with data and then save the doc, I try to save it as XML, but all inputted data are not shown on the XML file.

 

It's better if I save it as HTML webpage or Word document, some of the data could be shown while some got missing characters or distorted or simply disappeared.

 

What I want is to get the inputted data from the filled-in pdf so that I can process the input data simply from it, is there any method for that?

 

Thanks & Rgds.

Viewing all 5571 articles
Browse latest View live


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