Expand my Community achievements bar.

Multi-Select (drop down list) data not saving upon save/email

Avatar

Level 2

I have created a drop down list and modified it to allow multiple selection, i.e.

form1.BusinessAreaTable[1].Row1[4].ERP::ready:form - (JavaScript, client)

this.ui.choiceList.open

= "multiSelect";

this.rawValue

= "-1"

However, when I go to save the form and/or email the list fields erase and the data / items I selected are gone.

Please help, thanks.

20 Replies

Avatar

Level 10

Hi,

I suspect that it is one small issue. If you go to File > Form Properties > Default tab, see which option is selected for 'preserve script changes'.

2010-11-11_22-25-01.png

If manual is selected, change this to automatic.

Hope that helps,

Niall

Avatar

Level 2

Nope. Automatic is already select.

It's when a user works with the form (i.e. in Reader and they click the data in the list) and go to Submit Form (via email) or save locally, the data is "dropped."

What was previously highlighted blue is now blank...

Avatar

Level 10

Okay,

Looking at the script, it is in the formReady event, which will fire as the form opens.

The script in the listbox is setting it for multiple select (which is okay). But it is also setting its value to '-1', eg deselected. This I think is where the problem is. The form is saving, but when it is reopened, it is clearing the previous choices.

Comment out the script in the formReady event.

Niall

Avatar

Level 2

Nope. I can gladly email you the form to take a look.

Avatar

Level 10

Can you upload it to a file sharing site, like Acrobat.com and then post the published link here?

Niall

Avatar

Level 10

Hi,

The link doesn't seem to be published:

At the bottom of the Acrobat.com screen, can you click 'Share' and then once you have clicked publish (twice), click copy link:

Safari2.png

Niall

Avatar

Level 10

Okay, I have the form now.

You are using script in the form Ready event to make a dropdown list mimic a listbox. This is totally unnecessary. I have changed the ERP to a multi-select listbox in the Object > Field palette and commented out the script.

Here is the form: https://acrobat.com/#d=K*P4xKIA4kkqEHGTpgyvvw

The form has not been Reader Enabled, so user with Reader will not be able to save the data inputted or submit by email in PDF format:

options.png

Summary here:

http://assurehsc.ie/blog/index.php/2010/05/using-livecycle-forms-in-acrobat-and-reader/

Niall

Avatar

Level 2

i've reviewed the new form you modifed; however, the data is still not saving when editing in reader.... i understand the form is not reader enabled. However, when a user inputs data and submits the form via email the text fields are captured but all other fields including the one i just mentioned are still lost......

Avatar

Level 2

Even if the form is change to a list box or drop down list - why are the values NOT saving upon submit. Why is this so difficult to do? This should be simple functionality. Create a box with multiple values, allow users to select multiple values, allow them to respond and the form ACTUALLY saves!

Avatar

Level 10

Hi, the summary above tells you what users with Reader can and cannot do with your form, depending on whether you Reader Enabled it before sending out.

This aside the script you originally had was resetting the selection on open.

Niall

Avatar

Level 2

Thanks Niall -

I still cannot figure out what you mean by having reader enabled. I know you've been helping me out a ton but can you try the form with the adjustments you've made and try and save the changes in the list box by enabling reader? If it works?

Avatar

Level 10

I will, but it will be much later, as I am out at the moment.

Adobe Reader has all of the functionality of Acrobat built in, but it is locked. When you Reader Enable a form in Acrobat or LC Reader Extensions ES2, you are unlocking some or all of this functionality in Reader, for that form only. If you open the PDF in the link above you will see screenshots of the enabling process when you hover over the question marks.

Niall

Avatar

Level 10

Hi,

I have just tested the form in Reader (v8) and it behaved entirely as expected.

When the form is NOT Reader Enabled, the user can fill in text and select multiple items in the listbox. When they close and reopen, all of the data is cleared. This is because the form is not Reader Enabled, so the user cannot save the data that they have inputted.

When the form is Reader Enabled, then data that is inputted using Reader, can be saved and is available when reopened in Reader (and Acrobat).

The form is fine with the listbox and no script. If your users have Reader then you will need to set up the submit button to submit XML data instead of the PDF OR Reader Enable the form.

Good luck,

Niall

Avatar

Level 2

Niall -

thank you again for your help. you were right. i changed the form to reader enable and it works.

Now the only issue I am having is that once the form is reader enabled tables 'randomly' expand, add rows, write over other fields, etc. What is this?!?!

Avatar

Level 2

So here is exactly what I am talking about...

https://acrobat.com/#d=CL-mm*jJ1TEQIh4s03sqkQ

The form works fine (as designed in Lifecycle ES). I then save and extend features to reader via Acrobat Pro 9. However, when a user opens the form with reader (now with features extended) the first table grows by however many tables follow it.

In other words...

1. Take this form (see how each table only has one row) - looks great!

2. Extend to Reader functionality in Acro Pro

3. Open with reader

4. See how the first table now has 11+ (or however many rows) instead of the original design.

I have no idea why this is happening....

Avatar

Level 10

Hi,

The problem is two fold:

  • The only repeating element in all of the tables is Row1, yet you have ticked the Table AND the Header row as repeatable as well. This will cause problems.
  • All of the tables have the same name. This will potentially cause problems.

Try this form: https://acrobat.com/#d=2aYMWe*L*pz2iIVyJ8nSVw

I have deselected the repeat rows for the Tables and the Header rows in the Object > Binding. I can't test here in Reader, but I am hopeful that this will solve the problem.

Good luck,

Niall

Avatar

Level 2

Nope. No luck. I just took the form you uploaded and extended features in Pro > Opened in reader and the

tables are still auto expanding for some ungodly reason....

Avatar

Level 10

Hi,

Eleven tables with the same name, each with a repeating row of the same name, each with a min count of 1. That is why the first table is ending up with eleven rows.

Go to bullet point 2: change the names of the tables: Table1, Table2,...

That will cure all,

Niall