Expand my Community achievements bar.

Form - saving some data

Avatar

Former Community Member

Hi! I have one question - is it possible? I have the form with dozens of active fields (textfields) to fill. Each time entering data in a certain field causes the next time you open the file field is filled. Is it possible (for example using JavaScript)?

Thank You in advance

6 Replies

Avatar

Level 9

Hi,

There are may ways of doing it.

1. After entering the values in the fields when you close the form it prompts yo to save the form. If you save it then it will show the previous value of the fields when you re-open the form.

2. By placing button and doing a bit of scripting so that the user after filling the form will click the button to save the form.

3. By doing a bit of scripting in the docReady event of the form.

Thanks,

Bibhu.

Avatar

Former Community Member

Worth adding that in order for your end users to be able to save the form it will need to be Reader Extended.  How is the form going to be distributed?

Avatar

Former Community Member

Thank You for the answer. I was rather thinking of such a scenario:

form consists of about 100 fields. Only the first few fields each time a user fills (by entering the same data), and then these fields must be saved. Data entered into other fields can not be saved (because they are always different). Summary: The user enters data in the first few fields only once. The next time you open the file the initial fields should already be filled in (solid data)... Is it possible?

Thank You,

Matthew

Avatar

Former Community Member

Hi! Thank You for the answer. Yes, of course, I extend features... otherwise it can not be saved with only the adobe reader

Avatar

Level 9

Hi,

Yes, it's possible. You need not to worry about saving data of certain fields. As it's will be saved when the user clicks the save button before saving it.

Now, the challenge is, you need to clear the data of those fields which you don't want to save.

In the docReady event of the form i.e when the form is ready, you need to check whether those fields(whose data need not to be saved) contain data or not. If it contains some data then you need to clear that data when the form loads.

For ex : If you have a field called TextField1 whose data should be cleared and not saved when re-opening the form.

In the docReady event you can write the following script.

If (TextField1.rawVale != null)

     {

          TextField1.rawValue = null;

     }

Thanks,

Bibhu.

Avatar

Former Community Member

Thank You!!! You solved my problem! Heh, seemingly difficult problem proved to be simple... Thank You!