Creating a graphical button?

  • Profile Image
    n3mo
    Asked on December 02, 2015 at 09:19 PM

    Hi.

    Is it possible to create a button from an image file?

    What I want to achieve is to use a simple image which, after clicking, would input a predefined numeric value into a normal text field, for further calculations.

    Similar option, "button image" exists for the "submit" button, but I need a simple graphical button that inputs a value into a field and does nothing more.

     

    Thank you in advance.

  • Profile Image
    Charlie
    Answered on December 03, 2015 at 03:43 AM

    I can see there's two approaches that you can do.

    Method 1: You can use our image button widgets to server us the button with graphics. You can check our available widgets here: http://widgets.jotform.com/category/select_boxes 

    In my case, I'll use the Image Checkboxes widget. See below that I named them "Option 1", "Option 2", "Option 3" and "Option 4".

    I will then use the conditional logic to assign a number on the text box "Value" based on the selected image.

    I then repeat the process on adding up the other conditions.

    Here's a sample form: https://form.jotform.com/53361186378967? 

     

    Method 2: If you are familiar with Javascript, then you can get the form's full source code. Add a button and use a custom script to assign a value on an input field.

     

    I hope that helps.

  • Profile Image
    n3mo
    Answered on December 03, 2015 at 07:08 AM

    Thank you very much, the "image checkboxes" widget seems to be exactly what I need. I don't know why I missed it.

  • Profile Image
    Charlie
    Answered on December 03, 2015 at 08:23 AM

    You are very much welcome. I'm glad it helped :)

    Should you need any assistance again, feel free to open a new thread here in the forum.

    Thank you.