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
BedrockMission!

Learn More

View all

Sign in to view all badges

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

20-08-2008

No I did not ...can you resend?

Avatar

21-08-2008

Paul,



I am getting pretty sure it is an event problem.



What javaScript Event fires when the form is opened the first time but not fired after the form has been filled in?



Can I set a variable after the form has been filled in once and carry it with the form so it doesnt call the hide code?



Thanks, Leo

Avatar

21-08-2008

Paul,



I got it.



Thanks for all your help.



It was an event issue. I just checked to see if a field had data filled in and that solved my problem.



Thanks Again, Leo

Avatar

Avatar
Level 1
muffy_cw
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
muffy_cw
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
muffy_cw
Level 1

06-10-2017

HI

Can you plese explain what exactly you did to resolve the problem. Even I am facing the same problem, I am using javascript in document as well as in the combo box run custom script option.

Everything works fine but when I send the email the all the drop down boxes becomes blank everything else typed manually remains on the form.

Please help.

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

09-10-2017

Hi,

Leo might not be around after eight years, so I might chip in.  The first things I would look at is the binding of your drop down fields, make sure they are correct, and check any script that might run during initialization.

Do you have the same problem is you save the form and then re-open it?

If you are still having trouble can you add a link to your form in this thread and we can have a closer look.

Regards

Bruce

Avatar

Avatar
Level 1
muffy_cw
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
muffy_cw
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
muffy_cw
Level 1

11-10-2017

Hi Bruce,

Thanks for coming to my rescue. I will tell you what I am trying to do. I am trying make a fillable personal information form in adobe acrobat which has name, address, contact number text field which is manually entered by typing and I have combox box dropdown list for country and state.

To add the Countries in the country combox box I added following script in "document javascript"

this.getField("country").setItems([" ","India","USA","Mexico"]);

I have added 1 blank dropdown because when I click on Reset button the country combo box doesnt get clear and resets to default value so if I keep one blank value as default and click on Reset button the combo box picks blank value which is blank and looks as if the combox box got cleared on pressing reset button.

And in the same country combobox in validate tab in "Run custom validation script" I have added following script to populate states details in state combox box drop down list.

if(event.value == " ")

this.getField("State").clearItems();

else

    switch (event.value) { 

        case "India": 

            this.getField("State").setItems(["Maharashtra","Gujarat","Rajasthan"]); 

            break; 

        case "USA":  

            this.getField("State").setItems(["Texas","Washington","Calfiornia"]); 

            break;    

        case "Mexico": 

            this.getField("State").setItems(["Sonara","Sinalao","Durango"]); 

            break;    

    } 

So now what happens in the above if have given a validation that if the country is blank clear state combox box.

So after my reaserch and googling I have realized is when I open the form my document script runs and adds the countries and my validation script based on the countries populates states in state combox box.

After filling up the form when I click on "Email" button not the reset button to email it to someone the document script doesnt run so the country combox becomes blank and based on it my validation script clears items in state combo box also.

So conclusion is my both the drop down list goes blank when I email it to someone.

I have found a work around for it.

What I have done is when I opened the form and after countries were added in country combo box I removed the script from document script since countries doesnt need updation every time I open the document it is a one time process and saved the document. This way my countries were added and I dont need to run the script each time I open the document.

After filling up the document when I click on "Email Button" the selected value remains and doesnt become blank and based on the selected value in country the value in state combox box remains as it is.

Can you help me in finding out a way where in I dont have to add a blank value in countries and when I click on reset button all the combox boxes get clear and when I click on email button all the values selected in combo boxes remain intact and doesnt go blank.

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

12-10-2017

Hi,

I think you will be better off moving your code to the preOpen event of the drop down control.  This way nothing will happen until the click the down arrow of the control.  You just need to reverse your logic a little for the state drop down.

Regards

Bruce