PDF Form JavaScripts Dependent Dropdown Menus

Join our Facebook Q&A Group on PDF Form JavaScript:
/ pdfformjavascript
If this video helped you , please don't forget to SUBSCRIBE.
To get the PDF File with Script become a patron and support us :
/ 56719700
Thanks for Watching

Пікірлер: 72

  • @cscscs3618
    @cscscs36182 ай бұрын

    FINALLY!!! Something that works!!! Thank you!!

  • @jasonpagan4722
    @jasonpagan47223 жыл бұрын

    This definitely helped. Thank you!

  • @anavargas883
    @anavargas8833 жыл бұрын

    Amazing video!!! Super helpful!

  • @trianisholihah9126
    @trianisholihah9126Ай бұрын

    Hi, I've followed the steps and the logic is correct, but the second dropdown menu won't appear. Why is that?

  • @sangeriz
    @sangeriz3 жыл бұрын

    Thanks great tutorial

  • @ibrahimalsoufi7289
    @ibrahimalsoufi72892 жыл бұрын

    Could you please advise about dependent text fields? The value of one field depends on what is written on the other one?

  • @primeiragestao2648
    @primeiragestao2648 Жыл бұрын

    I appreciate your support, I´m trying to do this scrip to appear "N/A" in the dropdown list DBRR if i choose "YES" in the first dropdown, but it not working var Itemlist = this.getField("DBRR"); if(event.willCommit) { switch(event.value) { case "YES": Itemlist.setItems(["N/A", "Test"]); default: Itemlist.setItems([""]); } }

  • @pdfform

    @pdfform

    Жыл бұрын

    plz check our intermediate tier patreon page

  • @hosseinshirmohamadi9126
    @hosseinshirmohamadi9126 Жыл бұрын

    I appreciate your time. It was litteraly helpful. How we can hide and show a field dependent on dropdown fields? I have a JS code wich works but I don't know how add more drop field to it. if (this.getField("Dropdown").value == "Field#1"){ event.target.display = display.visible; } else{ event.target.display = display.hidden; } How can I add more dropdown field to this code, like Field#2

  • @agelikima4069
    @agelikima40692 жыл бұрын

    hello thank you for sharing . I have this question how do i clear field so they do not keep last selected? it is like they do not reset or start over. thank you

  • @pdfform

    @pdfform

    2 жыл бұрын

    just make a reset button

  • @farb2009
    @farb20092 жыл бұрын

    Thank you very much this one was helpful, do you have a similar script but to get a text and a number in some fields from a name selected in a created drop-down list, I believe they called dependable fields from a drop-down list, I wish I can attach a sample here, please let me know if something we can get in acrobat DC pro, Thank you

  • @pdfform

    @pdfform

    2 жыл бұрын

    join our fb group and post ur issue in detail

  • @hazelcalica
    @hazelcalica Жыл бұрын

    How do I add another dependent dropdown menus with the same set of choices? The first dependent dropdown menu works but the 2nd, the options are not appearing.

  • @pdfform

    @pdfform

    Жыл бұрын

    message on our patreon page intermediate tier

  • @ganeshduttmehta7229
    @ganeshduttmehta72292 жыл бұрын

    Hey, kindly share JavaScript, that if I select an item from the dropdown , a related field gets automatically filled as well as related image display in PhotoBox. Pls Help

  • @pdfform

    @pdfform

    2 жыл бұрын

    @ganesh dutt mehta You can use the script provided in the video titled "Upload Image in PDF | Adobe PDF Script to insert image in PDF form"

  • @KhalilCh
    @KhalilCh3 жыл бұрын

    Thank you, But I need to change only text not another dropdown list, can I do that?

  • @pdfform

    @pdfform

    3 жыл бұрын

    Yes

  • @suberhajo1135
    @suberhajo11353 жыл бұрын

    Is it possible to make an interactive pdf automatically save a read-only copy of the document via a button in the script? Thank you for the video!

  • @pdfform

    @pdfform

    3 жыл бұрын

    @Suber Hajo Yes, it is possible

  • @suberhajo1135

    @suberhajo1135

    3 жыл бұрын

    @@pdfform Thank you for the answer! Wow cool! Can you send me a link or something how its done?

  • @rob19841
    @rob198412 жыл бұрын

    If i want a dropdown list to have a list of "names" and then a text box automatically write something (just one word not a list) in accordance to what i select in the dropdown list how would i go about that?

  • @pdfform

    @pdfform

    2 жыл бұрын

    yes, it can be done

  • @jutilosws

    @jutilosws

    2 жыл бұрын

    @@pdfform Hi, please can you help me, the code is not runing. var itemlist = this.getfield("Items"); var price = this.getfield("Price_Field"); if(event.willcommit) { switch(event.value){ case "Fruits": itemlist.setitems(["-Select Fruits","Apple"]); price.value = ""; break; default: itemlist.setitems([""]); price.value = ""; break; } }

  • @pdfform

    @pdfform

    2 жыл бұрын

    @@jutilosws the script is case sensitive.. this.getfield. should be this.getField

  • @jutilosws

    @jutilosws

    2 жыл бұрын

    @@pdfform Muchas gracias, el problema fue resuelto. Muchas gracias un fuerte abrazo desde Colombia. Dejo el codigo por si alguien mas lo requiere, es importante el tema de las mayusculas, ese era el error mio var Itemlist = this.getField("Items"); var price = this.getField("Price_Field"); if(event.willCommit) { switch(event.value){ case "Fruits": Itemlist.setItems(["-Select Fruits","Apple"]); Price.value = ""; break; default: Itemlist.setItems([""]); Price.value = ""; break; } }

  • @jutilosws

    @jutilosws

    2 жыл бұрын

    ​@@pdfform hello friend, please look at this code, I am adapting it for what I really need it and it does not work correctly, not all the variables put the value that I assign, what can it be? correctly assigns the first four variables and thereafter does not assign them, does not display the value. Please I appreciate that you can help me var Equipo = this.getField("Equipo"); var V1 = this.getField("V1"); var V2 = this.getField("V2"); var V3 = this.getField("V3"); var V4 = this.getField("V4"); var V5 = this.getField("V5"); var V6 = this.getField("V6"); var V7 = this.getField("V7"); var Pozo = this.getField("Pozo") if (Pozo.value == "CP1701-GE") { V1.value = "BOP-0101" V2.value = "RTU-0101" V3.value = "TCO-0101" V4.value = "CONT-0101" V5.value = "CONT-0102" V6.value = "M-0101" V7.value = "xx" } else { V1.value="jj" V2.value="kk" }

  • @ThuyTran-fy1uc
    @ThuyTran-fy1uc2 жыл бұрын

    Thanks! I could make it from your video. But it do not work when I open the form in SharePoint (OneDrive). Please advise any way to fix it?

  • @pdfform

    @pdfform

    2 жыл бұрын

    @Thuy Tran. it wont work with any online platform..... its one of the demerits of pdf form that it only works with adobe acrobat reader or pro after download

  • @ThuyTran-fy1uc

    @ThuyTran-fy1uc

    2 жыл бұрын

    @@pdfform Is there anyway to do it for online platform?

  • @nelsoncalabria3008
    @nelsoncalabria30082 жыл бұрын

    I made a mistake when copying &pasting, in the line just after the default line. That error is not in the actual code, the one that is not working.

  • @nelsoncalabria3008

    @nelsoncalabria3008

    2 жыл бұрын

    @@pdfform Apologies, to disturb you. This my first time ever code in javascrip. It is not working. Now I know JS is case sensitive. My code> var Itemlist = this.getField("Tipo"); var Cod = this.getField("Codigo"); if (event.willCommit) { switch(event.value){ case "Compra Circunstancial": ItemList.setItems(["-Seleccione","Anticipo","Saldo","Total"]); Cod.value = ""; break; case "Compra Ordinaria": ItemList.setItems(["-Seleccione","Anticipo","Saldo","Total"]); Cod.value = ""; break; default: ItemList.setItems([""]); Cod.value = "no aplica"; break; } } Thanks you so much.

  • @pdfform

    @pdfform

    2 жыл бұрын

    @Nelson Calabria your issue that while creating variable Itemlist you have used smaller case of "l" but in the latter you have used capital "L". so the following script should go to the keystroke of the first dropdown: var Itemlist = this.getField("Codigo"); // Codigo is the name of the 2nd dropdown field . if (event.willCommit) {switch(event.value){ case "Compra Circunstancial": Itemlist.setItems(["-Seleccione","Anticipo","Saldo","Total"]); break; case "Compra Ordinaria": Itemlist.setItems(["-Seleccione","Anticipo","Saldo","Total"]); break; default: Itemlist.setItems([""]); break; } }

  • @shahabuddin7346
    @shahabuddin73462 жыл бұрын

    Hey, Is it possible to change color of same dropdown list for different option. For example - If I select green the box will turn into green, if I select red the box will turn into red. How do I do that please.

  • @pdfform

    @pdfform

    2 жыл бұрын

    @Shahab Uddin. yes it is possible

  • @shahabuddin7346

    @shahabuddin7346

    2 жыл бұрын

    @@pdfform Can you please share the script

  • @pdfform

    @pdfform

    2 жыл бұрын

    already made a video on this topic

  • @JoeGoreta
    @JoeGoreta2 жыл бұрын

    What is js code for this calculation: field1 + field2 + (field3 *2) + field4 Regards

  • @pdfform

    @pdfform

    2 жыл бұрын

    @ Joe Goreta. event.value = this.getField("field1").value + this.getField ("field2").value + this.getField("field3").value *2 + this.getField("field4").value;

  • @joannp8184
    @joannp81842 жыл бұрын

    Is there a way to set the name=value pair so that I have the export value?

  • @pdfform

    @pdfform

    2 жыл бұрын

    yes there is

  • @joannp8184

    @joannp8184

    2 жыл бұрын

    @@pdfform Is it a different tutorial?

  • @pdfform

    @pdfform

    2 жыл бұрын

    join our patreon page

  • @BadBadUser
    @BadBadUser2 жыл бұрын

    i tried this in acobat pro dc and did nothing in the second combo box when i selected the value in the first combo box

  • @pdfform

    @pdfform

    2 жыл бұрын

    @dark side SUBSCRIBE to our channel and join our facebook Q&A group and post your script there.

  • @Kevin457_starsky

    @Kevin457_starsky

    2 жыл бұрын

    Hi there, were you able to figure it out? I have made several attempts and just not working. I'm using Acrobat Pro DC as well. Thanks!

  • @BadBadUser

    @BadBadUser

    2 жыл бұрын

    @@Kevin457_starsky yes. did it again and it worked. 😉

  • @Kevin457_starsky

    @Kevin457_starsky

    2 жыл бұрын

    @@BadBadUser mine just did finally!!!. Thanks @PDF Form JavaScript!

  • @cptcosmo
    @cptcosmo2 жыл бұрын

    This script doesn't work in Bluebeam Revu Extreme either...

  • @pdfform

    @pdfform

    2 жыл бұрын

    It will only work with Adobe reader

  • @nicolewillcocks6050
    @nicolewillcocks6050 Жыл бұрын

    I have done everything you said even did a trial with your formulas and it doesn't work, I'm not sure what I am doing wrong but I have posted my formula in the reply section for you to check out.

  • @nicolewillcocks6050

    @nicolewillcocks6050

    Жыл бұрын

    var Itemlist = this.getField("TYPE"); if(event.willCommit) { switch(event.value){ case "Genie-Telescopic Boom": Itemlist.setTYPE(["-Select Genie-Telescopic Boom", "S-45", "S-65", "S-85", "SX-125", "SX-135"]); break; case "Genie-Articulating Boom": Itemlist.setTYPE(["-Select Genie-Articulating Boom", "Z-45", "Z-60", "Z-80"]); break; case "Genie-Scissor": Itemlist.setTYPE(["-Select Genie-Scissor", "GS-2632"]); break; case "JLG-Telescopic Boom": Itemlist.setTYPE(["-Select JLG-Telescopic Boom", "400 Series", "600 Series", "800 Series", "Ultra Series 120-185"]); break; case "JLG-Articulating Boom": Itemlist.setTYPE(["-Select JLG-Articulating Boom", "400 Series", "450 Series", "600 Series", "800 Series", "Ultra Series 120-185"]); break; case "JLG-Scissor": Itemlist.setTYPE(["-Select JLG-Scissor", "ES Series"]); break; case "Skyjack-Telescopic Boom": Itemlist.setTYPE(["-Select Skyjack-Telescopic Boom", "SJ45", "SJ66", "SJ86"]); break; case "Skyjack-Articulating Boom": Itemlist.setTYPE(["-Select Skyjack-Articulating Boom", "SJ45", "SJ66", "SJ85"]); break; case "Skyjack-Scissor": Itemlist.setTYPE(["-Select Skyjack-Scissor", "SJ4726-32"]); break; default: Itemlist.setTYPE([""]); break; } }

  • @pdfform

    @pdfform

    Жыл бұрын

    @@nicolewillcocks6050 .setTYPE should be .setItems

  • @arequina
    @arequina2 жыл бұрын

    How do you do this in AEM Forms Designer?

  • @pdfform

    @pdfform

    2 жыл бұрын

    @arequina everything remains the same except for few syntaxes in the script.... ex- in acrobat we use event.value but in AEM we use this.rawValue .. etc..

  • @chauhanranjeet6865
    @chauhanranjeet68652 жыл бұрын

    I am trying this code in "PDF Xchanger" But, it did not work...Can you please help?

  • @pdfform

    @pdfform

    2 жыл бұрын

    only works with adobe acrobat pro or reader

  • @chauhanranjeet6865

    @chauhanranjeet6865

    2 жыл бұрын

    Can you please help me with the code which can work in PDF Xchanger.?? This will be great help. I am trying this from week but not able to write. Correct code.

  • @nurislam-bn7el
    @nurislam-bn7el3 жыл бұрын

    can you sent me the code?

  • @jube1907
    @jube19072 жыл бұрын

    Does this work in Adobe Acrobat IOS after you created it on PC?

  • @pdfform

    @pdfform

    2 жыл бұрын

    not all script work only selected ones

  • @jube1907

    @jube1907

    2 жыл бұрын

    @@pdfform thanks so simple ones like calculations with date fields would work?

  • @pdfform

    @pdfform

    2 жыл бұрын

    date calculation is not simple

  • @pdfform

    @pdfform

    2 жыл бұрын

    @@jube1907 you need to check if it works or not. but i highly doubt date calculation will work on mobile

  • @jube1907

    @jube1907

    2 жыл бұрын

    @@pdfform ok thanks

  • @umar32bright
    @umar32bright3 жыл бұрын

    Hi, I need some of your help

  • @umar32bright

    @umar32bright

    3 жыл бұрын

    @@pdfform can you help me here please?

  • @sandipkhanapure455
    @sandipkhanapure4552 жыл бұрын

    हॅलो सर, आपका यह व्हिडीओ अच्छा लगा, लेकीन मुझे पीडीएफ मे डेट ऑफ बर्थ से उमर निकालनी है तो क्या करे

  • @pdfform

    @pdfform

    2 жыл бұрын

    @sandip khanapure. Become our patron to get the code for calculating age in pdf form

  • @nelsoncalabria3008
    @nelsoncalabria30082 жыл бұрын

    I just copied your code: var Itemlist = this.getfield("Tipo"); var Fec = this.getfield("Codigo"); if (event.willCommit) { switch(event.value){ case "Compra Circunstancial": Itemlist.setItems(["-Seleccione", "Anticipo", "Saldo", "Total"]); Fec.value = ""; break; case "Compra Ordinaria": Itemlist.setItems(["-Seleccione", "Anticipo", "Saldo", "Total"]); Fec.value = ""; break; default: Itemlist.setTtems([""]); Fec.value = ""; break; } } One of the two, your code or me, is not doing the job. Any help will be appreciated. Thank you

  • @nelsoncalabria3008

    @nelsoncalabria3008

    2 жыл бұрын

    It is doing the job. It was me. Thank you so much