How to calculate a value depending on the selection of a radio button widget

  • kauseway
    Asked on November 28, 2014 at 12:38 PM

    I am trying to use some widget to use fancy image check boxes (morning slot) and (afternoon slot).  There is no way in that widget to assign values to the selection.

     

    But I can show or hide a number field based on the selection. Is there a work around to allow me to add a value to the morning slot selection to a calculation field?

     

    One thought was to put the value in a hidden field.  But first I dont want to show it if they select it.  And two the calculation field adds it no matter if it is hidden or not. Thanks

  • raul
    Replied on November 28, 2014 at 2:49 PM

    A workaround that I can think of is using conditional logic to set a different value on a textbox (hidden if you want to) depending on the selection of the radio button widget.

    How to calculate a value depending on the selection of a radio button widget Image 1 Screenshot 30

    How to calculate a value depending on the selection of a radio button widget Image 2 Screenshot 41

    Then you can use the value of the textbox in your calculation tool.

    Please take a look at this cloned version of your form: http://form.jotformpro.com/form/43315309793963, feel free to clone it if you want to.

    Let us know if this helps.
    Thank you.