Skip to main content
Participating Frequently
September 9, 2024
Answered

SyntaxError: missing ] after element list

  • September 9, 2024
  • 2 replies
  • 769 views

I am needing help with what is wrong with this code... It keeps saying I am missing a ] at line 3. 

 

if(event.value == "Tamper Evident Round")
this.getField("number1").setItems(["22314","22514","23514","25014","25015","26215","26214",27514","21114","21560","22060","LID20114","LID20170","LID20160"]);
else if(event.value == "SealPack Round Tall")
this.getField("number1").setItems(["22520","23120","23520","24020","25020","27520","21120","LID20120"]);
else this.getField("number1").clearItems();

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

    Replace

     ,27514"

    with

     ,"27514"

    2 replies

    Bernd Alheit
    Community Expert
    Bernd AlheitCommunity ExpertCorrect answer
    Community Expert
    September 9, 2024

    Replace

     ,27514"

    with

     ,"27514"

    Peru Bob
    Community Expert
    Community Expert
    September 9, 2024

    This is the Using the Community forum (which is the forum for issues using the forums).
    Please tell us what Adobe application you are using so that this can be moved to the proper forum for help.

    Scroll down here to see a list of the forums:
    https://community.adobe.com/

    Participating Frequently
    September 9, 2024

    I am using Adobe Acrobat Pro

    kglad
    Community Expert
    Community Expert
    September 9, 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">