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

On a locked PDF, can any scrollable text field function exist?

New Here ,
Sep 30, 2020 Sep 30, 2020

I want to include a field on a document where the data needs to be scrolled up/down to see the entire contents, but I also do not want readers to remove/edit the contents of said field.  (maybe text box is not the right tool)

 

I have created a text box, gotten it to scroll, but as soon as I lock (and tried with all options I believe to allow/not editing), the box tuns into a static field with the + black box in the bottom right corner, but no way to access to the entire text of the box, or scroll which is the main goal.

 

So.....is this even possible?  Is there a different/better tool than the Text Box itself to accomplish this?

TOPICS
Create PDFs , How to , PDF forms
3.4K
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Oct 01, 2020 Oct 01, 2020

Yes, it's possible, using a small hack I came up with a while ago... The way to do it is to set the value you want the field to have as its default value first (under Properties - Options), and then add the following code as the field's custom Keystroke script (under Properties - Format - Custom):

 

event.rc = false;

 

This will mean the user could interact with the field by clicking into it, scrolling up and down, etc., but not edit its contents.

View solution in original post

Translate
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 ,
Sep 30, 2020 Sep 30, 2020

You can use a text field and two buttons to scroll the text in the field.

Translate
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 ,
Sep 30, 2020 Sep 30, 2020

Hello - I am not sure that I understand what you mean.  What two buttons are you meaning?  Would said text field be locked (no ability to remove the text in it), but allow it to be moved up/down to view the entire list?

Translate
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 ,
Oct 01, 2020 Oct 01, 2020

Yes, it's possible, using a small hack I came up with a while ago... The way to do it is to set the value you want the field to have as its default value first (under Properties - Options), and then add the following code as the field's custom Keystroke script (under Properties - Format - Custom):

 

event.rc = false;

 

This will mean the user could interact with the field by clicking into it, scrolling up and down, etc., but not edit its contents.

Translate
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 ,
Oct 03, 2020 Oct 03, 2020

Well that is amazing.....Thank you very much!!!  Now for a curveball......I have two of these boxes, one of which is plain text and hte other has rich text with colors and bolding etc.  Is there any way that, using the above approach, I can end up with rich text in the text box?

Translate
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 ,
Oct 03, 2020 Oct 03, 2020

That's more tricky... One thing you can try to do is edit the field so that it has the desired value, and only then apply the Keystroke code. However, if the form is reset it will lost the formatting you applied because the defaultValue is only a string. I just thought of another way to achieve it, though... You can create a hidden text field and as its Calculation event use a code to populate the field with the RTF with its "default" value! That should keep it in tact, even when the form is cleared. And actually if you do it like that then you won't need the Keystroke script at all, as that will overwrite any value the user enters into it anyway.

Translate
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 ,
Oct 03, 2020 Oct 03, 2020

I did not do the hidden text field , as following your recommendationg of pasting in the rich text, then applying the Keystroke script did what I was needing.  I think it was a sequencing issue - when to apply the keystroke script and when to paste in the Rich Text.  Now the contents of the box cannot be edited , and one shows the plain text and the other rich text.  I very much appreciate your help with this.  I had talked to a few Adobe support persons who indicated that this was not possible.......

Translate
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 ,
Oct 04, 2020 Oct 04, 2020
LATEST

Glad to hear you were able to solve it, and it's not very surprising the Adobe support people were not able to help you... They don't usually have much scripting knowledge or experience.

Translate
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