supergiant76 February 2016

Changing Image Instances on Dynamic Web Form

I'm looking to put together a dynamic Web form where, when the customer selects options from a series of radio buttons, additional items will be added to the main image.

Think of it as if you had a Photoshop layer and all the other layers above could be hidden or revealed dependent on the customer's input on the form.

So, two questions...

  1. I assume I should be using JavaScript for this form. Being a beginner with JavaScript, is there a way for me to tell it to change the image based on multiple inputs selected by the customer? The base image would be the same but I would be looking to hide/reveal multiple "overlays" on top of the base image.

  2. Is this something that React can handle or should I be looking at something like Angular?

Thanks for your assistance with this question!

Answers


zvona February 2016

I can answer for number one by providing a live example: http://codepen.io/zvona/pen/mVQWvX

It consists of three components, FormControls, Blocks and App. Names are quite self-explanatory and so should be code itself. There may be some minor mistakes in code since it's quite quickly written on the fly, but it should give you insight on how this can be achieved with React.

Post Status

Asked in February 2016
Viewed 1,699 times
Voted 11
Answered 1 times

Search




Leave an answer