How can I create a push button (NOT Radio) that will allow me to apply conditional logic (such as being able to hide / show certain fields)?

  • Clintluna
    Asked on July 13, 2018 at 6:24 PM

    How can I create a push button (NOT Radio) that will allow me to apply conditional logic (such as being able to hide / show certain fields)?

    Is there some CSS code out there that someone has already created that I can use?

    I want to be able to apply the conditional logic of hide/show fields when this button is pressed. I can do this with radio buttons but that doesn't look as professional and I want to allow my users to just click a button to show / hide fields.

  • jonathan
    Replied on July 13, 2018 at 7:43 PM

    Please check on Button Radios widget (link: https://widgets.jotform.com/widget/button_radios)

    I made a demo form you can test here https://www.jotform.com/81937116123958

    1531525425zzz 2018 07 14 07 Screenshot 10

    It is possible to use the Show/Hide Conditions using the Button Radios widget.

    Let us know if this will not work for you.


  • Clintluna
    Replied on July 13, 2018 at 8:38 PM

    Hi Johnathan, 

    Given that I can apply the same logic, these look like they will be perfect for what I need! 

    How can I adjust the button text / background to specific color I want (eg A "hex #" color)

    Is there a way to adjust the height / width of these buttons as well?


    Great news, thanks!!

  • Clintluna
    Replied on July 15, 2018 at 4:53 PM

    Hi Johnathan,

    So I tried adding logical conditions to these Sqare Radio buttons, but how do I make it recognize what value is filled? For example, IF the user hits the “add driver” or “remove driver” square button, I want to be able to hide / show certain fields. I tried doing somethings like if button is filled, then.....or typing in “add driver” to the if value equals, but it is not recognizing this logic or executing these commands.


    Here is the form: https://form.jotform.com/81906589374168


    Thanks

  • jonathan
    Replied on July 15, 2018 at 5:24 PM

    When using Conditions on widget, there is a bit of a limitation. All the STATE rule will not work in specific or exact manner. So you have to make a bit of adjustment with the condition rules.

    In your form's case, you can use Contains STATE instead of Equal To or similar. 

    Example:

    1531689719zzz 2018 07 16 05 Screenshot 10

    You can test my cloned form also https://www.jotform.com/81956347166972

    You can also clone my form to better review how I created the conditions on your own Form Builder.

    User guide : How to Clone an Existing Form from a URL

    Let us know if you need further assistance.