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

Beginner Questions on Using Livecycle - Form Driven By Combo Box?

Avatar

Level 1

I am new to using LiveCycle and have some basic questions.  Hoping someone can help put me in the right direction.  I have created a form, with fillable fields and binding field names.  I still need to make the SQL database table, but that is not where I am looking for help.  Below are my bulleted questions, as I am not sure how else to list them out.

  1. I have some text boxes and some text fields.  The text boxes should not have tab control, they are really just labels for the text fields.  Is this a bad setup, or is that ok?
  2. I have a combo box at the top of the form.  I would like to have some code to control the rest of the form -
    • Hide or show text fields based on the option chosen
    • Set the value of text boxes based on the option chosen
  3. I have the first option of the combo box set as UNASSIGNED, but would rather it be blank until someone chooses an actual value.  Is that possible? 
  4. The end goal is to have people save these forms in a folder (they will be offline and have no other choice).  When they are back on our domain, I will either look to use an Access front end form or other method to choose the folder and have all the data from all the pdfs in that folder imported into the appropriate table
  5. I would like to export a list of the text field binding names, so I can just have that list to build my sql table.  Any quick way to get that?

Some random questions about LiveCycle (not as immediately important, right now)

  1. What are fragments?  I looked them up in help but I still don't understand what a fragment is, or why I would create one
  2. Any other great parts of the program I should be using, that I am probably not?

Thanks!

Update: I found how to set the drop down default value to <NONE> in the value tab of the object pallete, but it still shows the first value.  Even if I save it, go to preview, or save it and open in Adobe.  Am I missing something in setting that default option to be "empty" until someone chooses a value?

2 Replies

Avatar

Level 10
  1. I have some text boxes and some text fields.  The text boxes should not have tab control, they are really just labels for the text fields.  Is this a bad setup, or is that ok?

You should use the field captions. It will make your life easier in the long run. And is more compliant for accessibility, etc.

  1. I have a combo box at the top of the form.  I would like to have some code to control the rest of the form -
    • Hide or show text fields based on the option chosen
    • Set the value of text boxes based on the option chosen

Fairly easily done, there are lots of examples here in the forums. Combo boxes are called dropdown lists in LC parlance so search on that term.

  1. I have the first option of the combo box set as UNASSIGNED, but would rather it be blank until someone chooses an actual value.  Is that possible?

I think this example does what you're looking for:

http://www.assuredynamics.com/index.php/portfolio/scripting-a-null-display-pattern-for-a-dropdown/

Explore that site for other great coding solutions:

http://www.assuredynamics.com/index.php/code-solutions/

  1. I would like to export a list of the text field binding names, so I can just have that list to build my sql table.  Any quick way to get that?

You can use TextField1.rawValue = xfa.datasets.data.saveXML("pretty"); to load the XML into a text field which you can then print out or copy/paste into something else.

I haven't really done any data base/xml work with Designer but the fields don't have to match the fields in your database, you can use an xml schema to assign what goes where with the field binding.

  1. What are fragments?  I looked them up in help but I still don't understand what a fragment is, or why I would create one

Fragments are used for a couple of things.

  1. Re-usable boilerplate type fields, groups of fields, logos, etc. If you need to be able to change something across a bunch of forms then fragments help as you just edit the fragment and then open up the other forms to get them updated - unless you are using the server suite then I think you can have it automatically update all forms.
  2. Script Objects. Script Objects are used for consolidating re-useable code into functions. If you make your script object into a fragment you can share it among your forms and update code in one place - things you might use a bunch like validation routines, etc.

  1. Any other great parts of the program I should be using, that I am probably not?

Probably! There are lots of great sites and blogs around with samples, etc. Someone is doing video tutorials on youtube.

A great book to get started is Creating Dynamic Forms with Adobe LiveCycle Designer by J.P. Terry.

Some links to documenation:

Some tips of my own:

  1. Learn to use the layout grid, it helps a lot.
  2. Don't use underscores or dashes in field and object names. Use CamelCase.
  3. Name (almost) everything. Especially subforms and fields - things you'll be interacting with scripting.

There's more but that's off the top of my head.

Avatar

Level 1

Thank you for that fantastic reply.  I still have more questions, but I am now focusing on the application side.  My sql database is linked to an Access application, which will have the UI for importing the data people fill out in the pdf forms.  My goal is to create a form, where someone can look up a project and then click a button to pick a folder.  All the data in the PDFs in that folder will get imported into the table, assigned id tags and show the results to the user.

I definitely plan to check out all of your links as I work to see how to make this form as seemless as possible.  The one caveat to having a data connection in the PDF form ( which is why I think that may not be the way for me to go), is because these forms will be filled in offline.  A person will have the form, save it over and over as the next one they fill out, and then have a folder of them to email, ftp, or just copy back when they are on our system. 

Here's hoping I can make it happen!