Dependent Dropdown List in PDF Form | Adobe Acrobat

Поділитися
Вставка
  • Опубліковано 18 січ 2025

КОМЕНТАРІ • 32

  • @dominicamymantuano1934
    @dominicamymantuano1934 Місяць тому

    HUGE help thank you!!!

    • @sarservices
      @sarservices  Місяць тому

      Glad it helped, Subscribe to our channel: www.youtube.com/@sarservices

  • @djmoler7575
    @djmoler7575 4 місяці тому +1

    Very well done, please provide more

  • @NoorAsif-ub8hv
    @NoorAsif-ub8hv 4 місяці тому +1

    Very informative 👍

  • @tacnola
    @tacnola 2 місяці тому

    Thank you this has helped a lot. I do have a question - I have a Dropdown with a dependent text box that will fill based on the selection. If I have a Dropbox name that will not have a dependent answer in the text, how do I make is show blank? Right now it will just show what was previously selected.

    • @sarservices
      @sarservices  2 місяці тому +1

      1:47 If you want to make empty text box, then simply add a blank space like this ("") or skip that case item in your script.

  • @jamesranum2934
    @jamesranum2934 2 місяці тому

    Do you need an option for every source option in order for it to work? My Target Dropdown remains blank and when I click on it I hear that error chime.

    • @jamesranum2934
      @jamesranum2934 2 місяці тому

      This is what I have so far:
      var f = this.getField("Industry");
      switch (event.value){
      case "Agriculture":
      f.setItems(["Animals & Livestock", "Crops", "Forestry"]);
      break;
      default:
      f.setItems(["-None-"]);
      }

    • @sarservices
      @sarservices  2 місяці тому +1

      Your Adobe JavaScript code looks correct. Make sure the field and case names are spelled correctly in the code, as JavaScript is case-sensitive.

  • @billgregory1782
    @billgregory1782 Місяць тому

    cant get it to work

  • @tomfoolery2964
    @tomfoolery2964 2 місяці тому

    What if i want to populate one "target dropdown" with two different "source dropdown" so I get combined data. For example I choose source 1 to populate: trim and I use source 2 to populate: bushes. Then my target dropdown reads trim / bushes.

    • @sarservices
      @sarservices  2 місяці тому

      Hello there, i understand, but this task won't be easy. You will need to create a change event function to update the target dropdown. If you're looking to hire someone to develop a custom script, feel free to contact me at sarservices7987(at)gmail(.)com

  • @12000r4n
    @12000r4n 3 місяці тому

    Do you have any tutorial on cascading three dropdown box in pdf? I can't make it work. I have tried if else if and else, I tried the switch and nothing works. I have three dropdown which is Facility, Floor, and Area. Please help!!!

    • @sarservices
      @sarservices  3 місяці тому

      You can use this exact same script in the second dropdown. Just change the data.

    • @12000r4n
      @12000r4n 3 місяці тому

      @@sarservices Hi there, I tried and it didn't work. Would you happen to have any other suggestions? I want to have the facilities' names, and some of the facilities have a different floor and correspond to that floor, I want to show all the locations on that floor.

    • @sarservices
      @sarservices  3 місяці тому

      @@12000r4n I helped many clients with similar tasks, and I can assist you as well. send your pdf document at sarservices7987(at)gmail(.)com.

  • @GeneRyan-l2g
    @GeneRyan-l2g Місяць тому

    I keep getting "Syntax error: missing ; before statement" line 2
    Var f = this.getField("Repeater") ;
    switch(event.value) {
    case "NORTH UMPQUA":
    f.setItems(["Fairview", "Red Butte", "Chilcoot"]);
    break;
    case "DIAMOND LAKE":
    f.setItems(["Pig Iron", "Cinnamon", "Doehead"]);
    break;
    case "TILLER":
    f.setItems(["Pickett", "Cedar Spring", "Acker"]);
    break;
    Case "-Select-"
    f.clearItems();}

  • @jerrywil7012
    @jerrywil7012 3 місяці тому

    The Javascript condition works well in Acrobat, but as soon as I open my file as a PDF outside of Acrobat, the condition tracking doesn't work anymore... is that normal?

    • @sarservices
      @sarservices  3 місяці тому +1

      Yes, JavaScript is not supported in all PDF viewers.

    • @jerrywil7012
      @jerrywil7012 3 місяці тому

      @@sarservices Thank you for answering. Do you have a solution for that?

    • @sarservices
      @sarservices  3 місяці тому

      @@jerrywil7012 First i have to check the script that you're using and then i can able to give you alternative way/code.

  • @AniyahSpann
    @AniyahSpann 4 місяці тому

    I am getting an illegal character at line 2 and not sure how to resolve

    • @sarservices
      @sarservices  4 місяці тому

      I don't have your script in front of me, so I can't help much. However, ensure that there are no typos, as JavaScript is case sensitive.

  • @age1472
    @age1472 4 місяці тому

    I have a "SyntaxError: Missing: after case lable 6: in line 7", and the problem is with "break;". similar to your video ua-cam.com/video/CP2lUhyf2rc/v-deo.html, at minute 6:13 How do I solve it? my software is adobe acrobat pro

    • @age1472
      @age1472 4 місяці тому

      var f = this.getField("Entidad de Registro");
      switch(event.value){
      case "México"
      f.setItems(["Aguascalientes", "Baja California", "Baja California Sur", "Campeche", "Chiapas", "Chihuahua", "Ciudad de México", "Coahuila", "Colima", "Durango", "Estado de México", "Guanajuato", "Guerrero", "Hidalgo", "Jalisco", "Michoacán", "Morelos", "Nayarit", "Nuevo León", "Oaxaca", "Puebla", "Querétaro", "Quintana Roo", "San Luis Potosí", "Sinaloa", "Sonora", "Tabasco", "Tamaulipas", "Tlaxcala", "Veracruz", "Yucatán", "Zacatecas",]);
      break;
      case "-Selecciona una Opción-"
      f.clearItems();}

    • @sarservices
      @sarservices  4 місяці тому +1

      Read Error. Add colon ":" in item case

    • @age1472
      @age1472 4 місяці тому

      @@sarservices Thank you

  • @billgregory1782
    @billgregory1782 Місяць тому

    mine isnt working
    please see my script.
    var f = this.getField("BCA1");
    switch (event.value){
    case "Lighting":
    f.setItems(["BCA2002 PartJ7 AS3000-2018.AS1680.0-2009"]);
    break;
    case "Electrical Services":
    f.setItems(["BCA2022 ClauseF6D5.PartJ7 AS3000-2018.AS1680.0-2009"]);
    break;
    case "Emergency Lighting & Exit Signage":
    f.setItems(["BCA2002 Clauses E4D2 E4D4 E4D4 E4D6 E4D8 AS/NZ2293.1-2018"]);
    break;
    default:
    f.setitems([""]);
    }

    • @sarservices
      @sarservices  Місяць тому

      Hello there, Your script is mostly correct but one issue, Changed f.setitems([""]); to f.setItems([""]); (in Default block)

    • @billgregory1782
      @billgregory1782 Місяць тому

      @sarservices thank you ,

    • @billgregory1782
      @billgregory1782 Місяць тому

      Thanks for your reply,
      Working with "Electrical Services", wont change when i select the other 2 services "Lighting " & Emergency Lighting"
      Thanks Again

    • @sarservices
      @sarservices  Місяць тому

      @@billgregory1782 Check spelling, Javascript is case sensitive.