0 Replies Latest reply: Feb 6, 2014 11:46 AM by BSisson RSS

    Radio button 'Names' and grouping

    BSisson Community Member

      Ok, I am still working on my Monster form...

       

      Probably pushing the envelope for what Forms can do...but hey...

       

      My "buttons" are all named "Button.section.number"  (ex. Button.1.13) so that my validate scripts can quickly go through and build other tables and things....

       

      In each section, there are 3-4 buttons where I want at-least-one to be selected.

       

      Obviously, a "Radio Button" will give me ONLY one selected, but I am having NAME problems in that when I try to name them so the scripts will work the button  come out of the group. (and crash Acrobat)

       

      so...in a section, what I want to have is:

       

      Button.2.0     (.hidden,  .value = "Grounds")

      Button.2.1 \

      Button.2.2  want these 4 in an exclusive group, where an entry is ".required" for at least one of them

      Button.2.3 /

      Button.2.4              A validate script runs later that looks for "blank" .required fields and reports out using "userName" in an "appAlert"

      Button.2.5

      .

      .

      Button.2.16  (.hidden, .value= "MAX")

       

       

      New Bitmap Image.jpg

      My Validate scripts go through all the sections and all the buttons finding boxes that are checked that represent problems, and copy's the fields "Export Data" to a summary page -AND- looks for empty .required fields  (and other things)

       

       

      I would LIKE the user to be forced to select  one of : Serviceable, Deficient, Hazard or N/A  for each section.  (Button.1.1, Button.1.2, Button.1.3, Button.1.4 in this example)

       

       

      Do I need a "button_up" script (the same in all 4 buttons) that makes sure there is at least one selected. and clearing/setting the .required's on the fields ?  That seems messy.  I could start the form with the last choice (N/A) checked, but that seems error prone. 

       

       

      The current validate script checks for empty .required fields, so if I make all 4 fields as required I will get 4 error messages, not ideal....

       

      Ideas Please??

       

      Idea as I was writing this.... Since Button.section.0 is hidden, I can toggle the .required flag on that?  But I still need a script that will set/clear the .required when the user select -any- of the checkboxes/buttons

       

       

      In case people are interested, all my sections are different sizes, but Button.section.0 contains the "Section Name" ('Grounds' for example) and when (Button.Section.number).value  = "MAX" you have reached the end of -that- section. It works very nicely and is FAST becasue the build is only done when requested, not continously..

       

       

      PS...this works with PC Reader ONLY.  Android reader does not support this but qPDF for Android does.