Skip to main content
heidsterv
Participating Frequently
April 17, 2024
Answered

line break in javascript pdf

  • April 17, 2024
  • 2 replies
  • 1430 views

Hi,

I want a text to autopopulate based on the choices of two dropdown menus. The \r pagebreak isn't working. Anyone can help me?

 

if ((f.valueAsString=="choice1") && (g.valueAsString == "choiceA")) event.value = "First line of text\rSecond line of text.";

    This topic has been closed for replies.
    Correct answer Bernd Alheit

    Enable the multi line option of the text field.

    2 replies

    kglad
    Community Expert
    Community Expert
    April 17, 2024

    in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

    p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



    <"moved from using the community">
    heidsterv
    heidstervAuthor
    Participating Frequently
    April 17, 2024

    thank you @kglad  much appreciated

    kglad
    Community Expert
    Community Expert
    April 17, 2024

    you're welcome (and glad an acrobat expert was able to help).

    heidsterv
    heidstervAuthor
    Participating Frequently
    April 17, 2024

     var f = this.getField("Dropdown1"); var g = this.getField("Dropdown2"); if ((f.valueAsString=="Cucumbers") && (g.valueAsString == "Spidermite")) event.value = "First line\rSecond line."; 

    Bernd Alheit
    Community Expert
    Bernd AlheitCommunity ExpertCorrect answer
    Community Expert
    April 17, 2024

    Enable the multi line option of the text field.

    heidsterv
    heidstervAuthor
    Participating Frequently
    April 17, 2024

    AMAZING! Thank you so much @Bernd Alheit