• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help, please! :) I need a movable slider.

New Here ,
Aug 24, 2022 Aug 24, 2022

Copy link to clipboard

Copied

So, below, with the accidental highlighted area. I want them to be able to move a circle (Well...to be honest it would be considered an image, I suppose.) left or right when my audience is filling out this form. If I can't do it like this, can you think of any other ideas on how they could mark on the document to indicate where they're at on the scale? I appreciate any help! I'm trying to do something a little different than the 1-10 scale. If I don't get any responses, I'll probably just suck it up and do that. 😞 

 

 slider.png

TOPICS
General troubleshooting , How to , JavaScript , PDF forms

Views

118

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
community guidelines
Community Expert ,
Aug 24, 2022 Aug 24, 2022

Copy link to clipboard

Copied

There isn't a slider in set of native PDF form fields, but you can use a script and a button to create the illussion of a slider. This will only work when the PDF is opened in desktop Acrobat Pro or Reader. It won't work on a mobile device or in pretty much every other PDF viewer. 

 

Here's the basic outline of how to do it.

1) Place a fully transparent button over the total area of the slider location. 

2) Add a text field for displaying the slider position. 

2) Add a script to the Button Down event that starts an interval timer.

3)The interval timer runs a script that captures the mouse position and moves marker with the mouse. The script will need to detect the initial position to ensure the click is actually on the marker and set movement limits. The marker can be either an annotation or another form field. 

4) Add script to both the Mouse Up and Mouse Exit events to terminate the timer and set the slider value.

 

 

 

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
community guidelines
New Here ,
Aug 24, 2022 Aug 24, 2022

Copy link to clipboard

Copied

LATEST

Thank you so much! I ended up just doing the number scale. I wouldn't want it to cause problems for mobile! 

I think it turned out alright. 🙂

 

 

slider.png

 

Votes

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
community guidelines