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

Help: Form with Sum of Rows (Conditional statments)

$
0
0

I am hoping for some help from someone more advanced than I am.

 

I have a form with a table that asks for imput for travel expenses.  Rows include for receipt number (auto-fills with an interger number), Date, Vendor Name, Expense Type (drop down prefilled with a variable), Payment Type (drop down prefilled with a variable), Expense Cost (user imput- data type interger), Currency (drop down prefilled with a variable), Conversion Rate, Expense Cost in USD (calculated total from Expense Cost * Currency).

 

The table has one row of data called "Item" and there is a button to add a row to the table.

 

The table auto SUMs the Expense Cost in USD field so there is a total on the table.

 

On a previous page (summary page), there is another table.  This table summarizes the expense information based on Expense Type and Payment Type.

 

Currently I have the following formula to conditionally sum the expenses from the table below based on the response for Expense Type and Payment Type.  This example is supposed to sum all expenses that are "51807 - Membership Dues/Fees" and whose payment type does NOT equal "BMC Credit Card".

 

form1.#subform[1].Table1.Row1.Expense_51087::calculate - (JavaScript, client)
var sum = 0;
var aLines = form1.resolveNode("#subform[3].General_Expense.Item[*]");
for(var i=0;i<aLines.length;i++)
{
   if(aLines.item[i].expense_type.rawValue == "51807 - Membership Dues/Fees"
      && aLines.item[i].payment_type.rawValue != "BMC Credit Card")
       sum += aLines.item[i].total.rawValue;
}

 

sum;

 


However, it does not sum the values.  It does not do anything.

 

Any suggestions?  I will change to formcalc is someone has the solution.  I have a functioning formcalc formula, but it didn't sum for multiple lines, only the first entry.

 

Here is the draft of the form:

http://www.brynmawr.edu/provost/documents/Travel_Form.pdf


Check box - When yes is checked no will uncheck

$
0
0

I need help figuring out how to make the check boxes to where only one option can be checked at a time, either yes or no. I am using check

boxes rather than radio buttons because i also need them to be able to be unchecked by re-clicking on them.

I am fairly new to this i would need a step by step for the most part. Thank you!

Javascript For loop not working within a function

$
0
0

Hi all,

 

I'm a beginner to LiveCycle and I cant seem to get a loop working within a function.  The function is being called successfully because when I manually create the code it works but I am trying to clean things up.

 

So here is my working example:

 

function hideContent() {

        MainFlowedSub.LevelsSub.Table1.presence = "hidden";

        MainFlowedSub.LevelsSub.Table2.presence = "hidden";

       ... and so on....


         MainFlowedSub.LevelsSub.Table8.Row1.presence = "hidden";

        MainFlowedSub.LevelsSub.Table8.Row2.presence = "hidden";

       ... and so on....

}

 

However when I try and creat a loop instead of listing every sing table/row nothing happens. this is important to my project as there will be alot of different rows depending on radio button selections earlier in the form.  Below is the current state of my code:

 

function hideContent() {

 

    var i=0;
     for (i=1;i<=5;i++)
     {
         MainFlowedSub.LevelsSub.Table[i].presence = "hidden";
     }

 

    var j=0;
     for (j=1;j<=23;j++)
     {
         MainFlowedSub.LevelsSub.Table8.Row[j].presence = "hidden";
     }

 

    var k=0;
     for (k=24;k<=88;k++)
     {
         MainFlowedSub.LevelsSub.Table8.Row[k].presence = "hidden";
     }

;

 

 

this will then continue as there will be hundreds of rows.

 

Any help will be greatly appreciated and I am sure I am making a basic error  so thanks in advance.

j

Understanding Form Flow in Adobe LiveCycle Designer

$
0
0

To understand the form flow in LC Designer in detail watch this video.

 

 

Using positioned subforms nested inside flowed pages you can create a near word processor experience in Adobe LiveCycle Forms. The video also demonstrates the importance of "rich text", text field object height, and the "Paragraph" Tab in creating a crisp look in your forms.

Form field positioning - LiveCycle Designer ES 8.2

$
0
0

How to get form fields to be side by side instead of one above the other (LiveCycle designer ES 8.2)

I'm new to LiveCycle Designer

When I created my form in LiveCycle Designer ES 8.2 (on Win7) I lined up some of my fields in the editor so that they would be side by side - horizontal. Like yes/no check boxes, one beside the other. Yet when I saved and opened the form, the check boxes were vertical one on top of the other. I don't see how I can move them so that they are side by side again.

Hidden subform issue

$
0
0

I have a form that includes a series of hidden subforms. One hidden subfrom, when called up and when one of its checkboxes is clicked, is supposed to call up different hidden subforms. These last subfroms reside on a different page. I usually use a simple script to call up hidden forms and it works just fine...until now. It won't call up the last subform. It seems that the last subform won't present because it is on a different page.  I dont know why that shold matter, but it seems to.

 

I've attached the form I am working on. The problem is in getting MathAcc to present on page 3 when LATMathEng on page 2 is checked.

 

Thanks so, so much to anyone who can help me out.

Timer Not Working

$
0
0

Hi

 

I am trying to call a function from a timer using the following code:

 

var mTimer;
function testTimer()
{
mTimer = app.setInterval( "runTimer()", 1000 );
}

 

function runTimer()
{
app.clearInterval(mTimer);
app.alert("timer run");
}

The function runTimer() simply doesn't run.

The only way I can get the timer to work is with a line like this:

 

mTimer = app.setInterval( "app.alert('test')", 1000 );

However, calling a function doesn't work.  The code is in a global module.  It doesn't work with anything I try, such as:

 

mTimer = app.setInterval( "Global.runTimer()", 1000 );

I am using a Dynamic XML form in Designer 9 (trial version).

 

Many thanks

 

Geoff Olding

how to remove fields and the space the occupy form a form before printing

$
0
0

I have a dynamic form which should only print certain portions depending on checkboxes (if checkbox is checked, print paragraph; otherwise, don't print). I am using javascript to change the paragraph form visible to hidden prior to printing. I would like to also eliminate the blank space when I make the paragraph hidden. In other words, I want to collapse the pdf document based on the user inputted check boxes. Anybody have a simple solution? I am using LiveCycle Designer 7.1.


Save As button

$
0
0

I created a form using Microsoft Word for the layout, and added form fields in Acrobat. Then I opened the form in LiveCycle because I like the calendar feature that LiveCycle has for date fields. The problem is that I had a Save As button field in the Acrobat form, but it doesn't work in LiveCycle. Does anyone know a way to enable a Save As button in LiveCycle? (The Print Button that I made in the Acrobat form works fine.)

Rendering vs. Data integration, cons and pros?

$
0
0

Hi,

 

I I'm trying to figure out what are the advantages to render pdf and not to use data integration service, the list I have so far:

 

      • render to HTML, SWF.
      • render based on fragments
      • server side form scripts ? (not sure )

 

In case that those advantages are not so important why not use a free tool like iText to import and export data to XFA forms?

Please help me with this doubts,

Thanks!

PDF binding to MySQL databse - how is it done?

$
0
0

How can I bind data entered in to a Dynamic PDF form to reside in a MySQL database. I seem not able to build a connection.

So here are the steps I follow:

 

Binding / New Connection / Name: testdata ; Description: OLEDB database / Connection String: build: SQL Native Client / Data Source: location of the SQL database (.mwb) ; Log on to server: localhost

 

But when I test the connection I get an initialization error and login time out.

 

So my question is:  How do you connect the PDF fields to a MySQL database ? and what am I doing wrong ? Is it a feasable process to bind also check boxes and other fields to a database ? How would you bind data dynamically - say if I choose a certain field from a dropdown menu, certain other fields will populate via the database ?

 

Thanks again for all help and insight.

 

Shai

 

PS I attached a sample form (not yet completely integrated to accept certain data) and a sample MySQL database (no data inside).

If radio button is selected then X field is required code

$
0
0

I am trying to figure out how to code a field to become required when a user selects a radio button or something from a drop down list.  what I am trying to do really is figure out how I can setup a variable inside the required syntax and figure out where the required syntax actually is inside say a radio button as currently I can't find it.  I could setup the function to be called when the radio button is selected and from there the function can change it to required or not required depending on selection.  I hope this makes sense and thank you in advance for the help.

 

 

Justin

Change Fill Color Based On Value

$
0
0

I have found several good examples on how to modify the color of a field based on a value but am not having luck implementing.  My form is an evaluation with 3 sections of test scores, the total of all 3 could have a max value of 100.  Sections 1 & 2 are auto calculated, and section 3 is a value the user will input based on their review of all comments, scores, etc.  The final score has a rating, Outstanding 90-100, Satisfactory 70 - 89, and Unsatisfactory <=70.   Right now I'm not so much concerned about the color numbers, but I'm not able to get the colors to change at all.  Because this field is calculated based on sections 1-3, I put the code on its change event.  Once the user enters the final manual score in section 3, the value automatically changes.  I've also tried the exit event of the section 3 manual score, and obviously do not have either the code or where to place it right.  Below is the code I'm using, and would appreciate any help.  If I can learn how to do the 90-100, hopefully I can apply same method, different color to 70-89 and under 70.  What am I doing wrong?  Thank you.

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

 

if

 

this.rawValue <=100)&& this.rawValue >=90

{

this.fillColor

= "102,179,255"'

}

Can I unzip LCA file??

$
0
0

Hi,

 

I have taken archive of a repository on my local system in the form of .LCA file.

Now I want to see the content of the .LCA file. Also i want to create the same structure while unzipping it.

 

 

Can anybody tell me how to unzip a lca file>???

 

 

 

Regards

Sunil Gupta

How do I set the value of a dynamic row text field

$
0
0

I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.

 

Top form looks like

 

InputField

 

| ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)

...

| ButtonXn | ButtonY1 | DescriptionXn

 

OutputRow looks like

 

| ButtonOutput | OutputField1 | OutputField2 | OutputField3 |

 

So I would like it to do

 

ButtonX1.click

{

OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on

 

OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue

/*

Question 1

How do I address the location in each table to set a value

 

Question 2

How do I get the value of the description field in the same table and row as the button

 

I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX

 

*/

 

OutputTable.OutputRow.OutputField2 = InputField.rawValue

/*

  Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?

*/

 

OutputTable.OutputRow.OutputField3 = this.ButtonLabel

/*

Question 3

  How can I get the value of the button's label to set in the field

  There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code

*/

 

Question 4 - unrelated to those above.

Is it possible to build the first table

| ButtonX | ButtonY | Description |

from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?


How to design a multi language form?

$
0
0

I try to find the best solution on this forum and on web with no success.

 

What is the best way to design a multi-language form with LiveCycle? I would like to refresh the complete form according to a dropdown list with language inside and change all captions of the form, and maybe little more.

 

I can do it with a ddl and script on event "change" that replace all captions inside the form.

 

is there a better way to do it? Can i separe the form itself and the language strings (i.e. XML file) ? is there any working example?

 

Thank you in advance

customizing email body on email submit button

$
0
0

Hi everyone,

 

I'm trying to modify what the body of the email will look like once the user has pressed an email submit button. In Livecycle designer, I clicked on the button and viewed the xml source. I scrolled down to the following line:

 

               <submitformat="xml" textEncoding="UTF-8" target="mailto:test&test.com?subject=My subject"/>

 

Then changed it to:

 

 

               <submitformat="xml" textEncoding="UTF-8" target="mailto:test&test.com?subject=My subject?body=new body"/>

When I tested the button, the text "?body=new body" was appended to the subject line instead of being included in the body itself.
I wondered if anyone could tell lme where I'm going wrong?
Appreciate any help.

How to automatically navigate to the next field without pressing the TAB key?

$
0
0

The form has phone number fields, they are not actual special formats for phone numbers, they did not do that to begin with.    So the phone number of form will end up being entered into two different fields one numeric 3 digit and (the next in tab order) is a text field with validation text{999-9999} .   What user is asking for now is this sort of flow:

    1. User of from tabs into the 3 digit number field
    2. Types one digit,
    3. Then another
    4. And another
    5. After they type the third digit the form should automatically move to the text field
    6. After it fills up with an acceptable 999-9999 string then that field should move the focus onto the next field in tab order. 

 

I can get the ‘full’ event to move focus to the next field but that happens only when the forth number is keyed, but that number is not passed to the text field.   Could not find a way of ‘carrying’ that number forward and placing the cursor to its right. 

 

So I was looking at the ‘Change’ event, to set up an IF like this:

if (this.length = 3 ) then xfa.host.setfocus("TX17") ;

 

from what I can tell this does not get a length until TAB or ENTER is pressed.   Can anyone help?

Numeric Fields - Exact digits

$
0
0

Hello, I was wondering if anyone knows how to require a numeric field to be 9 digits, and only 9 digits without any commas or leading zeros. I tried using num{999999999} in the display field but that gives me leading zeros. I want to make the user input only 9 digits or else they cannot submit the form, or an error message pops up, or they cannot go to the next field or something. Any help would be greatly appreciated, I'm new to these programs!

script for calculated-read only field that will change color based on condition

$
0
0

I need help creating a script that would make a calculated-read only field change color if a condition is met.  Should the script placed in the calculated event?

 

 

The fields are as follows:

  

CourseNum (auto sum calculates 11 numeric different fields)

 

A1P (numeric calculated read only field)

 

AP (numeric calculated read only field)

 

HIGHA (the sum of A1P and AP) - this is also a calculated read-only field

 

 

 

So the condition would be:

  

if CourseNum >20 and HIGHA >=50%

 

then change the background color of HIGHA to yellow

otherwise it should be white

Viewing all 61369 articles
Browse latest View live


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