Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Need help trying to create a form

Avatar

Level 2

Ok, first, I am sorry if this is the wrong area to ask this question but this seems to be as close to the area I can find.  I'm also pretty new at using Livecycle, so I don't know near half of what it can do.

I've been tasked with trying to create a form that is prefilled out with a standard wording (it is an Award Citation for military awards) and to have a way to fill in the information so that it will input the data into the correct blocks but can also stretch out the text box as it types.  I've seen how some can make forms where you can add lines to the end, but is there any way to make the information go into the "middle" of the text instead of at the end.

If that is not making sense, if anyone has ever used something like NAVFIT98, I'm trying to do the exact reverse of that.  NAVFIT98 has a form that you fill out and then converts the saved data into a micosoft access database file, but NAVFIT98 can still open it and correctly reassemble it again.  I am trying to figure out how to go from a prefilled form and be able to essentially enter all my data in the manner of the database and have it show up correctly in livecycle.

I've been reading and searching and haven't been able to find anything yet and am trying to see if this is even possible.

Thanks in advance.

0 Replies

Avatar

Level 10

In LiveCycle, you can insert a floating field into a text object to display different types of information at run time.

Place a Text field on the form and add some static text to it. Place the cursor inside the Text field and select insert menu -> Floating Field. This will place a Floating field inside the Text field. This way you can have the Floating fields at beginning, middle or end (OR) anywhere in the Text Field.

You can get more help in LiveCycle Designer on how to place the Floating Fields.

Hope this can help..

Thanks

Srini

Avatar

Level 2

Thanks for the reply, and sorry it has taken me so long to respond back.

The floating field is kind of along the lines of what I need, and I even managed to find a script that allows me to edit the field from within adobe reader, but when I do, the data that I typed in will dissappear as soon I leave that field.  I'm not sure where to go with it now.  For what I am trying to do, this sounds like it's the closest thing for me.  Basically what I am trying to do is think of it like a newspaper artical where 90% of the information is pre-typed and stays the same, with about 10 different fields that change in context and length every day.  I need to find some way to make this work that way, or any other way that can keep my formatting and spacing for this document.

If anyone can help me with this I'd really appreciate it.   I can also e-mail the Livecycle document and the Word document I am trying to replace if that will help in understanding what I am trying to do.

Thanks in advance.

Avatar

Level 10

Here is a nice discussion on the similar issue.. Hope this can help you..

You can find a sample PDF also.

http://groups.google.com/group/livecycle/browse_thread/thread/f8eb0970c0133e0d

Thanks

Srini

Avatar

Level 2

Thanks for the reply.  That link seemed to have exactly what I needed.  There is only one other little thing I could use help with.  How would I go about setting the text so that each line of the text body will stretch to the edges of the text box (the newspaper/magazine look).

Thanks.

Avatar

Level 2

Anyone know what setting I need to make the text auto-space to the edges (the newspaper/magazine artical look)?  I can't seem to find it.

Avatar

Level 10

Hi,

You can change the text alignment (both vertical and horizontal) in the Paragraph panel:

Parallels Desktop1.png

Note that you can change the alignment of the caption and value together or separately.

If this panel is not visible you can toggle it on and off from the Window menu or by pressing Shift+F5.

Good luck,

Niall

Avatar

Level 2

DOH!  I fell like a tard.  Looked everywhere but there lol.  Thanks for the help.  Now, I do have 1 final issue that I had working on my own, now I can't get it back again.

I have three different drop-down list boxes for data that I want to be controlled automatically from one single drop down list.  My three fields have data for "him/her", "he/she", and "his/her".  I want the user to simply be able to see just one field that will let them chose Male or Female, and automatically select the correct settings in the other hidden fields.

I did have it, but somehow I messed it up and can't get it to work right again.

Thanks.

Avatar

Level 2

Thanks.  Worked great.  Finally got form one done.  Now I have at least 2 more to do, and the downside is, the one just completed was the easiest.  I'm sure I'll have more questions soon with the new forms I am starting now.

I'll eventually learn how to use this on my own lol.  Thanks all for the help.

Avatar

Level 2

Ok, I'm back already with my never ending questions lol.

I'm trying to figure out how to be able to add and remove the hidden floating fields withing a text object based on checkboxes.  I can make the input field's invisible and visible by the check box, but not the floating field that is bound to the input data.  I've played around for about an hour and can't get it going yet.

Thanks yet again.

By the time I'm done with all this help I need I should be ready to take college classes on Adobe lol.

Avatar

Level 10

Hi,

You could try setting the floating fields to null. Script like this in the checkbox click event:

if (this.rawValue == "1")

{

     floatingField.rawValue = null;

}

else

{

     floatingField.rawValue = "You have deselected the checkbox";

}

Stick with it 😉

Niall

Avatar

Level 2

Thanks yet again.

It was the value "null" that I needed.  It will make the field hide, but only if the the Bound input field was blank.  I played with it and finally got it to work though.  Had to add the resetData line.  My check box under the click instance has this code which makes it work perfectly.

if

      (this.rawValue == "1")

   {

MIfield.rawValue

= null;

middle_in.presence

= "invisible";

xfa.host.resetData("suffix.#subform[0].middle_in");

   }

if

     (this.rawValue == "0")

  {

MIfield.rawValue

= middle_in.rawValue;

middle_in.presence

= "visible";

   }

Now, on to hopefully my last question.  Is there a way that I can also add or delete a space in an area by adding another line of code into check box Click instance?  My design view looks like this:

        {raterankfield} ({warefarefield} WARFARE) {firstnamefield} {MIfield} {lastnamefield} {suffixfield}, UNITED STATES NAVY

while the Adobe View looks like this (after filling in fields)

        MACHINIST MATE FIRST CLASS (SUBMARINE WARFARE) JOHN  DOE , UNITED STATES NAVY

The parts in caps (WARFARE & UNITED STATES NAVY) are static text as well as the "comma".  I need to be able make the spaces behind the {MIfield} and {suffixfield} appear or disappear to keep the spacing correct.

Thanks again.

Avatar

Level 10

Hi,

It can be tricky when some of the fields are blank, leading to extra spaces. Some samples here: How to generate descriptive narrative from checkboxes to new PDF document

You could possibly look at the resulting string for double spaces "  " and replace with a single space " ".

This is a variation on one of my scripts, so may need a bit of work. Basically you are putting the floating field into a variable and then rebuilding the variable, taking out the double spaces. You would then push the variable back to the floating field:

var vFloat = floatingField.rawValue;

var wordArray = vFloat.split("  "); // looks for double space in floating field

var wordIndex = wordArray.length;

var vNewFloat = "";

for (i=0; i < wordIndex; i++)

{

    vNewFloat += wordArray[i] + " "; // replaces space with a single space

}

Hope that helps,

Niall

Avatar

Level 2

Thanks for the reply.

That seemed to not be quite what I needed, but I did manage to figure out what to do.

if

(this.rawValue == "1")

{

MIfield.rawValue

= null;

middle_in.presence

= "invisible";

xfa.host.resetData("full_name.button1.middle_in");

MIspacingfield.rawValue

= null;

}

if

(this.rawValue == "0")

{

MIfield.rawValue

= middle_in.rawValue;

middle_in.presence

= "visible";

xfa.host.resetData("full_name.button1.MIspacingfield");

}

I added another floating field with my needed punctuation marks and spaces as the default data and just linked them to the check box values, using null to hide it and the reset to make it appear again.  Posting this hoping others can find this route helpful too.

Thanks for all the help.

Avatar

Level 2

Ok, I finally have the form done with.  Now, I do have one final little issue.  I have two different pages (subforms) within my document.  The first page is the data input page.  The second page is the actual page the user needs after data is put in (did this because the higher ups want to be able to "preview" the document as they fill it out).  Is there a way that when they print, it will automatically only print the second page and not the first page (the data input)?  I know I can hide the first subform from the print view, but it leaves me with a blank page.

Thanks.

Avatar

Level 10

Hi,

You can achieve this in several ways.

Here is an example where the data was inputted on page 1. There are two print buttons, the first prints the visible page, whereas the second hides the first page and makes a hidden page visible and prints that instead. https://acrobat.com/#d=rPIIanobeOh*P3JtREGwcw

This example is saved as dynamic, so that the hidden page is taken out and you are not left with a blank page. Also you need to watch you pagination for both pages. They should be set to 'Follow previous' and 'Continue filling parent'.

Also you can drag in a 'Print' button from the library and change the second and third parameters to suit (see help file).

Hope that helps,

Niall

Avatar

Level 2

Ok, got that figured out now.

Now, I have a new problem.  The dynamic form I created in LC works fine in the preview pane, and when saved as an Adobe dynamix XML, will work fine in Adobe Acrobat Pro, but when I open it in reader, one of my floating fields won't populate now.  I have checked to make sure my reader has javascript enabled and I extended the rights to adobe reader using acrobat pro.  Any thoughts on the issue here, cause it's got me c=scratching my head.

Avatar

Level 10

Hi,

I would not have expected that.

The only thing I can think is that the floating field is populating from an external source, which Reader won't allow.

A summary of options that are available in LC Designer forms in Reader is here: https://acrobat.com/#d=3lGJZAZuOmk8h86HCWyJKg

Can you explain where the data is coming from for the floating field? Are other fields working as expected?

Niall