How to update DOB widget from Radio button?

  • tsfermanagh
    Asked on September 10, 2014 at 10:48 AM

    Hi I was just wondering I have radio buttons with a set number of years, is it possible to select one and that value be put into the value for year in the DOB widget?

     

    Thanks

    Jotform Thread 426646 Screenshot
  • jedcadorna
    Replied on September 10, 2014 at 12:04 PM

    This is possible, but you have to download the form source and add some custom script. We can create a sample for if you want, just let us know.

  • tsfermanagh
    Replied on September 11, 2014 at 3:59 AM

    Please that would be great jedcadorna. Would it be using JS?

  • jedcadorna
    Replied on September 11, 2014 at 4:48 AM

    I have cloned your form and made a sample. Can you please check it on this link.

    Sample image:

     

    How to update DOB widget from Radio button? Image 1 Screenshot 20

  • tsfermanagh
    Replied on September 11, 2014 at 6:26 AM

    Thanks so much, How would I implement the script into my own form and use it.

     

    Thanks

     

    Rueben

  • jedcadorna
    Replied on September 11, 2014 at 7:50 AM

    Hi Rueben,

    The example I've made needs a form source so in order for you to get this to work you have to download your form source.

    Once you have your form source you'll need to paste this code before the </body> tag ends.

    How to update DOB widget from Radio button? Image 1 Screenshot 30

    Then add this line onDISABLEDclick="myFunction()" in your radio buttons input tag.

    How to update DOB widget from Radio button? Image 2 Screenshot 41

    That's it. That should capture your radio button value whenever it's checked.