Creating a graphical button?

  • n3mo
    Asked on December 2, 2015 at 9: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.

  • Charlie
    Replied on December 3, 2015 at 3: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".

    Creating a graphical button? Image 1 Screenshot 40

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

    Creating a graphical button? Image 2 Screenshot 51

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

    Creating a graphical button? Image 3 Screenshot 62

    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.

  • n3mo
    Replied on December 3, 2015 at 7: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.

  • Charlie
    Replied on December 3, 2015 at 8: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.