Highlighted

Partial drop down search giving unexpected results

New Here ,
Jan 31, 2018

Copy link to clipboard

Copied

I have a drop down that is being populated dynamically: https://i.imgur.com/QKohGq5.png

Users have the ability to do a partial search of the drop down, to filter down to what they're looking to find: https://i.imgur.com/S0P3T17.png

However, when selecting one of the options from within the remaining options available, the results are not always as intended. In this case, I will search "Adult B" to choose Adult Brass Dragon. When selecting Adult Brass Dragon, the following script is enacted:

applyMonster(event.value, 0);

This should be choosing the option I chose, and passing it through my scripts to fill the rest of the form with information. Nothing else manipulates this drop down, aside from choosing the manual that needs to be chosen beforehand.

This is what has happened when I selected Adult Black Dragon: https://i.imgur.com/3q7IJ6T.png

I have searched and searched, but have not found anything regarding this issue, and it's starting to drive me a little crazy. It seems to be choosing another random option beginning with A, regardless of what I choose.

Topics

PDF forms, Windows

Views

151

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Partial drop down search giving unexpected results

New Here ,
Jan 31, 2018

Copy link to clipboard

Copied

I have a drop down that is being populated dynamically: https://i.imgur.com/QKohGq5.png

Users have the ability to do a partial search of the drop down, to filter down to what they're looking to find: https://i.imgur.com/S0P3T17.png

However, when selecting one of the options from within the remaining options available, the results are not always as intended. In this case, I will search "Adult B" to choose Adult Brass Dragon. When selecting Adult Brass Dragon, the following script is enacted:

applyMonster(event.value, 0);

This should be choosing the option I chose, and passing it through my scripts to fill the rest of the form with information. Nothing else manipulates this drop down, aside from choosing the manual that needs to be chosen beforehand.

This is what has happened when I selected Adult Black Dragon: https://i.imgur.com/3q7IJ6T.png

I have searched and searched, but have not found anything regarding this issue, and it's starting to drive me a little crazy. It seems to be choosing another random option beginning with A, regardless of what I choose.

Topics

PDF forms, Windows

Views

152

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Feb 01, 2018

Copy link to clipboard

Copied

Before the line

applyMonster(event.value, 0);

add following line

console.println("value " + event.value);

Then you can see in the console what was selected.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Feb 01, 2018

Copy link to clipboard

Copied

Here's a quick clip at what is happening: 2018-02-01 11-35-43 on Vimeo

This very much feels like a bug with partial searches, as selecting something from the drop down has no issue.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Feb 01, 2018

Copy link to clipboard

Copied

Unless you can share the file, or at least the code, it's very difficult to help you solve this issue.

Likes

1 Like

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Feb 01, 2018

Copy link to clipboard

Copied

More than happy to share the file, just didn't seem like it's the code causing the problem.

5e Encounter Sheet - Dev.pdf - Google Drive

Edit - Strange...I seemed to have had an Adobe account already registered with my email, but also made one under Google sign-in.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Feb 01, 2018

Copy link to clipboard

Copied

Step #1 when developing code is to enable the option (under Edit - Preferences - JavaScript) to show the JS Console on errors and warnings. As soon as I click into "Monster1.Name", an error message appears, which tells me there are all kinds of issues with it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Feb 01, 2018

Copy link to clipboard

Copied

Monster1.Name is referencing a function that does not exist anymore, I have been trying to fix the issue while solely using Monster0.Name, and was intending to edit the validation on Monster1.Name afterwards. Please use Monster0.Name

I do have that enabled.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Feb 01, 2018

Copy link to clipboard

Copied

Is the filtering something you implemented? If so, where's the code for it?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Feb 01, 2018

Copy link to clipboard

Copied

Definitely not, this seems to be a standard ability within Acrobat, and is also case sensitive. This is why I'm confused on why this is happening, as I am simply allowing custom text to be typed, allow a selection, and then once that selection is chosen, running the script in the validation section of the drop down properties. A majority of issues I've ran into I've been able to trouble shoot myself, both with some googling and checking out Thom Parker's stuff, but this one has stumped me as I've found absolutely nothing posted about it.

I've noticed this in another PDF form I utilize with Dungeons and Dragons, and the creator of that is far superior to me in his coding ability. I've been also attempting to just change to a dialog window with the options available, which I'm sure you've seen in the code, but since I haven't been able to get that 100% working dynamically, I've tabled it for the time being (Grey button at the top of the page), and thought that just filtering in the current drop down would be a good alternative until I can learn dialog boxes a bit better.

I have also changed Monster1.Name just to ensure there's no issue there, which is again available at the link above.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Feb 01, 2018

Copy link to clipboard

Copied

It could be a bug in your version of Acrobat, then.

I tried duplicating what you did in the video and it worked fine for me, using Acrobat Pro XI.

Likes

1 Like

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Feb 01, 2018

Copy link to clipboard

Copied

Hmm, I have DC. I really don't enjoy DC because the interface is annoying, but it's what I've been provided to use so I have to deal with it haha. I will look to submit this to the DC team as a bug then and see what they say! Thank you for your time.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
One Stop Solution for Acrobat
Edit a PDF
Add a group