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

Linked Drop Down - drop down menu data from OLEDB database

$
0
0

Hi Experts,

                  I have a requirement of linked & drop down down menus - one for Country and other for City. For example I have 2 items in drop down for country say India & China - when user selects India from the drop down then the city drop down should only have cities in India i.e. Mumbai, Delhi. Similary when I select China from country drop down menu I should only have Shanghai & Beijing as the two values in the city drop down menu & Mumbai and Delhi (both of which belongs to India) will not be shown and will be unavailable to user for selection.

 

Now All the data for Country and Region comes from OLEDB database. Therefore the drop down menu items doesnt need to be hardcoded in the script itself. I have used dynamic properties for drop down menus. The problem is I have all the data from the database tables for country and region but they are not filtered according to country.

 

I have tried with the following script but no joy yet.

 

I have created a hidden table having 2 columns - Country and Region - this table is populated with all the country and region data from the database and its body row is taken as BodyRow.

 

//find out the no of records of country and region in the table

 

var

 

 

records = xfa.datasets.data.Table.resolveNodes("BodyRow[*]");

var

 

 

count = records.length;

for

 

 

(var i=0; i<=count; i++) {

 

var curr_val = xfa.resolveNode("Table.BodyRow["+i+"]").country.rawValue;

 

if (i>0) {

 

var prev_val = xfa.resolveNode("Table.BodyRow["+(i-1)+"]").country.rawValue;

 

if (curr_val == prev_val) {

region_num

++;

}

 

else {

region_array[

++country_num] = region_num;

region_num

= 0;

}

}

}

This is actually not required

//find the largest integer in the region_array.

var

 

 

temp;

var

 

 

count_region = region_array.length;

for

 

 

(var i=0; i<=count_region; i++) {

 

if(region_array[i]>region_array[i+1]) {

temp

= region_array[i];

}

else {

temp

= region_array[i+1];

}

}

//Now create the secondary dimension based on temp value

// The array contains the country and the corresponding states/provinces.

Need to have a technique to create Array Object based on Number of regions for respective countries - therefore the following line is not correct.

For example if we have 10 countries and country 1 has 4 regions, country 2 has 3, country 3 has 5 regions (all the countries are having variable no of regions) then how are we going to create the 2 D array. Also the number of countries is not fixed.

 

var myCountries = new Array(new Array(2), new Array(country_num), new Array(temp)); // Create a two-dimensional array.

// This script object controls the interaction between the country and state/province Drop-down lists.

 

 

 

// For each country, add a 'new Array(number of state/province +1)'.

 

// Define the country and the corresponding states/provinces.

// The array syntax is arrayName[index][index].

// The first index number represents the country,

// the second index number is the actual data value.

myCountries[0][0]

 

= " "; // The first items in the Drop-dowm Lists should be blank.

myCountries[0][1]

 

= " ";

//Populating 2 D array.

for

 

 

(var ind=0,i=0, j=0; ind<count; i++) {

 

var curr_val = xfa.resolveNode("Table.BodyRow["+ind+"]").country.rawValue;

 

var prev_val = xfa.resolveNode("Table.BodyRow["+(ind+1)+"]").country.rawValue;

 

var region_val = xfa.resolveNode("Table.BodyRow["+ind+"]").region.rawValue;

 

var country_val = xfa.resolveNode("Table1.Row1["+(ind+1)+"]").region.rawValue;

 

if (curr_val == prev_val) {

myCountries[i][j

+1] = region_val;

}

 

else {

myCountries[i

+1][0] = country_val;

}

}

// This function will populate the country Drop-down List.

// This function is called from the initialize event of the country Drop-down List.

 

function

 

 

getCountries(dropdownField)

{

dropdownField.clearItems();

 

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

dropdownField.addItem(myCountries[i][0]);

}

// This function will populate the state/province Drop-down List for any event EXCEPT the change event.

// This function is called by the initialize event of the state/province Drop-down List.

 

function

 

 

getStates(countryField, dropdownField)

{

dropdownField.clearItems();

// Clear the items of the Drop-down List.

 

 

for (var i=0; i < myCountries.length; i++) // Look through all the countries until we find the one that matches the country selected.

 

 

if(myCountries[i][0] == countryField.rawValue) // Check to see if they match.

{

 

 

for (var j=1; j < myCountries[i].length; j++) // When they match, add the states/provinces to the Drop-down List.

{

dropdownField.addItem(myCountries[i][j]);

}

}

}

// This function will populate the state/province Drop-down List for the change event.

// This function is called by the change event of the country Drop-down List.

// The first parameter is simply a pointer to the xfa object model.

 

function

 

 

getStatesOther(myXfa, dropdownField)

{

dropdownField.clearItems();

// Clear the items of the Drop-down list.

 

 

for (var i=0; i < myCountries.length; i++) // Look through all the countries until we find the one that matches the country selected.

 

 

if(myCountries[i][0] == myXfa.event.newText) // Check to see if they match. Note: we have to use the event.newText in this case because

{

 

// the change hasn't been committed yet.

 

 

for (var j=1; j < myCountries[i].length; j++) // When they match, add the states/provinces to the Drop-down List.

{

dropdownField.addItem(myCountries[i][j]);

}

}

}

 

Please let me know how I can modify the above script for my requirement or else please suggest any easier alternative.

 

 

Thanks

Rohit


Yes or No checkbox- One or the other

$
0
0

What would be the script to allow only one or the other for a Yes or No check box?  I initiallty used an Action Builder to disable one when the other is selected, but then if the person makes a mistake and wants to select the other option, using the Action Builder didn't allow the user to change their decision.  So, if the person checks Yes, then No is disabled, you can't change it to No, when I used the Action Builder.

 

What I need:

The user to be able to select Yes or No, but only select one at time, not both Yes and No and not disable the other.

 

Thanks for any suggestions.

How do I access LiveCycle Designer from my Adobe Acrobat X Pro?

$
0
0

     I am unable to access LifeCycle ES2 from my Adobe Acrobat X pro, even though I am supposed to have it as part of the software.  I have tried Forms/Edit forms, and I have looked for it through all the menus.  Several of the helps I have found for other things has me launch LifeCycle and operate from screens that LifeCycle designer provides. 

    I am using Windows XP professional.

    I would appreciate all the help I can get on this. 

 

Thanks

 

Mogadeet43512

Email submit does not launch Outlook which is set as default client

$
0
0

I designed a form in Adobe LiveCycle and added an Email Submit Button.  When I saved the finished form as a PDF and clicked the Email Submit button to test the form (after filling it) it returned an error as follows: "Either there is no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Outlook and set it as the default mail client".  My default email client is Microsoft Outlook 2010.  Meanwhile when i click on other mail to links elsewhere, even on a webpage, Outlooks launches automatically.  Any help??

How can I set a text field to convert all text entered to upper case when populated?

$
0
0

I want to have all entered text populated into specific text fields to automatically convert to upper case. I am working in LiveCycle Designer ES2.

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?

Conditional Required Fields

$
0
0

Is it possible to have conditional required fields. As in if a certain box is selected, certain fields will become required. Take a look at this example if this needs clarification. In this example, the left 3 text boxes are required. If I check the middle checkbox, can I make it so the 3 text fields in the middle now become required as well. Furthermore, if I check off the 3rd check box (rightmost one), can I make all of the text boxes as required fields. Thanks!

 

example1.GIF

What is the difference between Acrobat Pro and LiveCycle Designer 8.1ES??

$
0
0

Hello

 

What is the difference between Acrobat Pro and LiveCycle Designer 8.1ES?

 

Thank you


If/then statement with hidden fields

$
0
0

I have a form with a drop-down field that has 3 possible values (Today, Tommorrow, Next Week). Below this drop-down field is text field (TextField10) that needs to be filled out by the user ONLY if "Next Week" is selected in the drop-down. I would like for TextField10 to be hidden unless "Next Week" is selected.

For TextField10, I have "this.presence="hidden" written into the initialize event so it is hidden when the user opens the form. This works.

 

For the drop-down field, I have:

 

if (this.rawValue == "Next Week") then TextField10.presence = "visible";

     endif

 

written into the exit event in FormCalc. I need this in FormCalc because I have many other scripts in the exit event already written in FormCalc and I don't want to have to change all of them. I have checked "Specify Item Values" in the Binding Tab of the drop-down field.

 

Would someone please tell me what I am doing wrong. TextField10 is hidden, but never appears no matter what I select in the drop-down field.

 

thank you for your help!

 

Gene-O

How do I lock PDF before e-mailing so that it cannot be altered by the recipient?

$
0
0

I've created a form in LiveCycle which will be seen and filled by users who only have Reader.

 

Once the form is completed, the user has to click three buttons: one prints the page (for a specific paper-based usage required by the filler of the form). The same button  sends the entire form to one e-mail address.

 

The second button prepares the form for submission to a second e-mail recipient. This recipient must not be able to see some of the filled fields on the form. As well as setting these fields to invisible, the second button also hides key fields behind a text message, telling the second recipient where to find the information that is most useful to them on the form. Again, this recipient will be using only Acrobat Reader.

 

Everything works fine, apart from when it comes to e-mailing the form to the second recipient. I've used various scripts I've found on this forum and elsewhere to lock fields before sending and I've extended Reader rights in Acrobat. But, whatever I do, the form received by the recipients is STILL editable, the "invisible" fields are visible again and also editable,  and the test box that obscured key fields has become invisible again.

 

I've already tried using a range of scripts that I've found both on this forum and elsewhere (including Paul Guerrett's 'Lock All Fields' and 'Lock All Fields Not Buttons' scripts. I've also tried using the scripts in different 'events' - mouse up, mouse down, click etc.

 

What am I doing wrong? I've spent days trying to figure this out and I'm getting nowhere.

 

I am  a JavaScript novice, by the way. So please keep it simple and (better still) provide working script! Thanks to anyone who can help

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.

Adobe Form Repeat a Subform Every Page

$
0
0

Hello Adobe Forum,

 

I'm an SAP user and am creating an Adobe form (my first). I posted this in an SAP forum, but have yet to receive any feedback whatsoever so I thought it may be better to go to the Adobe experts themselves. I've run into an Adobe issue and am just spinning and spinning trying different techniques to make it work. Any hints would be greatly appreciated.

 

In my content area I have three subforms. The first subform is positioned, the fields have to be placed correctly. The second subform is fundamentally a table header for the third subform, which is the rows of the data. All three subforms are wrapped in another subform that is flowed.

 

Why would I do it like this? Well, the table in the third subform has control levels so it merges like rows nicely in this way when the first column rows are the same...

 

Capture.PNG

 

So the first page of my document would look like this...which is what I want.

Capture.PNG

H is repeated for every page. So it is on the Master page. That's easy.

1 is the 'sub-header' and should only be on the first page. This works.

2 looks like a header for the table, but is really it's own table because of formatting requirements and the values are dynamic. It looks nice, but shows up only on page one.

3 is the data table. It works great too.

 

Page one looks great. Page two looks like this... I can't get part 2 from above to repeat for every new page.

Capture.PNG

I have tried numerous approaches, but nothing seems to work. I really need to stick with the control levels, and that keeps me from having one nice table with a header that repeats. Perhaps I've approached this fundamentally wrong?

 

Here is my layout in case that helps at all explain my issue. I truly appreciate any help, this is the last hurdle on my form and then it's done. I'm sure a seasoned Adobe person may quickly see the err of my ways.

 

Thanks,

Greg

Capture.PNG

Date field populates depending on when form opens

$
0
0

Hi - I have a form to be submitted that includes a list of subjects for a particular meeting that happens each Monday. Can a date field populate with the date of that Monday when the form opens in the preceeding week? And then happen each week after that?

 

Thanks.

to Turn off of or set auto complete feature in Adobe reader 8 through LC designer

$
0
0

Hi i am developing the XDP through LC designer . After renering the PDF through form server if i open the PDF in adobe reader 8 it pop up message saying auto complete . I dont want to dispaly the pop up message iwhile opening the PDF in reader 8 . So Please provide scripts or some alternative to set in the XDP side to set the auto complete eature to off

Invalid enumerated value: validationState

$
0
0

Hi there,

 

I need help, desperately.

 

I made a form using Desinger ES2, and set its target version to 9.1 or later.  When it is rendered in the browser/standalone with Reader Version 9.0, it would pop out "Invalid enumerated value: validationState", twice...

 

I do a version check in the form's formReady event, it hides the entire form if version is not >= 9.1, and also pops up a message box telling the user that they do not have the latest Reader and should update or the form would not display/function properly.  BUT our client is still not happy with the sollution and complains about seeing this popup when they load it in 9.0.

 

I need help getting rid of this popup in version 9.0 please.

 

 

Regards,

Nelson Wei


javascript is deleting wrong row in table

$
0
0

I created a table in livecycle es 8.2. I have buttons to add and delete rows. The add button works fine, but the delete button is deleting the wrong row. For instance, in the PDF preview mode, if I add three rows and try to delete the third, the second is deleted.

 

To add a row, I am using the code:

usertable._Row1.addInstance(1);

 

To delete a row, I am using the code:

usertable._Row1.removeInstance(1);

 

I've tried a lot of variations that I found online, include (this.parent.index) and (true). I don't know anything about javascript other than what I've used for this form. Can anyone help me?

 

Thanks in advance!

How to show current page number in formcalc?

$
0
0

I have a client who won't allow JavaScript in their forms for security reasons.  I'm trying to convert the JS I've used to work with FormCalc instead, but I don't have much experience with FC and I'm stuck at the first hurdle.

 

I want to display the current and total pages in the master page and I've changed the generated code to use FormCalc and changed to use the dollar reference, but the form doesn't render the current page number.

 

Here's the code

 

return.#pageSet[0].Restricted.CurrentPageNumber::ready:layout - (FormCalc, client)

//Doesn't work, even though it's copied from the reference material

this.rawValue = xfa.layout.page($)

// also tried

$ = xfa.layout.page($)


return.#pageSet[0].Restricted.NumberofPages::ready:layout - (FormCalc, client)

//Works

this.rawValue = xfa.layout.pageCount()

 

 

Any and all help would be really appreciated

Metadata in LiveCycle

$
0
0

Is there a way to set up meta data in LiveCycle that will map over to Adobe?  In the adobe properties there is a "Keyword" section.  Where can get enter the Keywords in LiveCycle to that they will map over to that keyword section in Adobe?

Thanks!

Jodi

Collapse and Expand text fields on click of button

$
0
0

Hi,

 

I have a form with several multiline text fields taking almost 2-3 pages..i do not need them always ..is there a way where i can have a kind of "OPEN" and "CLOSE" type of functionality to expand and collapse these text fields.

 

Thanks

Kapil

Saving form last modified in LiveCycle Designer as PDF version 1.4

$
0
0

I have a PDF fillable form that was last modified/saved in LiveCycle Designer. The PDF is currently version 1.7, but I need to reduce it to version 1.4 (for compatibility reasons). The way I normally do this is to open the PDF in Acrobat and use the optimizer to save it down to version 1.4, but with this form I'm getting a message that says "The PDF document contains an Adobe XML form. Such files cannot be optimized." I downloaded the trial version of Designer ES4, but I'm not having any luck taking it down to version 1.4. Does anyone know if  it's possible to save down this kind of PDF to version 1.4?

Viewing all 16286 articles
Browse latest View live


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