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

JavaScript to move text from one box to another

New Here ,
Mar 06, 2023 Mar 06, 2023

Copy link to clipboard

Copied

Hi. I have limited knowledge with JavaScript but I am trying to find something or a way to do the following:

 

I want to have a text box that is read only that users can add more and more text to without deleting or overwriting what is already there. The way they add text into the box is via a second box where they can type into and press a button to send it to the read only box. Once the text sends to the read only box, the input box is then empty again, ready to type in more text again. 

In summary box 1 can be written in and by pressing a button it sends to box 2. Box 1 is then clear ready to be written in again. Box 2 keeps all the text that is being input into it as a record of all the entries. 

can anyone help with how to do this in a PDF?

thanks in advance

TOPICS
How to , JavaScript , PDF forms

Views

421

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 ,
Mar 07, 2023 Mar 07, 2023

Copy link to clipboard

Copied

LATEST

You can try this as 'On Blur' action of 'Box 1' field:

this.getField("Box 2").value += event.target.value + "\n";
event.target.value = "";

 

It will trigger on mouse click outside of field or on tab, or did you mean to send text with click on actual button field?

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