What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.

  • Profile Image

    Change product image per dropdown item selection

    Asked by idevise on March 19, 2014 at 10:00 PM

    Is it possible to change the product (or product color) image conditionally based on the item that has been selected in a dropdown menu or selected in a radio button?  For instance, if I choose "red car" from the dropdown, I'd like to associate the "red car image" that shows next to it.  If I then choose "blue car" from the dropdown, I'd like to associate the "blue car image" that shows next to it...so on and so forth.  Thanks for any help.

  • Profile Image
    JotForm Support

    Answered by ashwin_d on March 20, 2014 at 12:07 AM

    Hello idevise,

    I am not if I have understood your question correctly.

    Do you mean to say that you need to change the product image of "Payment Tool" based on the selection of color property?

    Unfortunately, it in not currently possible within the form editor. We can show/hide a image (not product image) field based on the product selection but to achieve your requirement, you will have to download your form's source code and add custom code to show / hide product image based on the property selection.

    I did check your form but could not find the color property added. It just have the quantity property. If the idea of form's source code route seems acceptable to you, get back to us with the form ID on which you want to achieve this and we will help you with the custom JavaScript code.

    Please be noted that if you embed your form with its source code, any changes you make in your from builder will not reflect in your web page. You will have to download your form's source code and implement the custom code again. Also, you will have to host the form code in your own server where you have your web page.

    If you just want to display the image based on the dropdown field selection (not product tool dropdown), you can take advantage of our "Conditions" feature to show / hide images. The following guide should help you:  http://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic

    Thank you!