Page 1 of 1

Add ability to customize options in FormBuilder

Posted: Wed Nov 06, 2019 1:42 am
by InvaderNat
I have a contact form that also configures various layered images depending on the options selected i.e. you pick "red" from a pulldown field and it selects a red image.

The problem is that I also need to change the background color of the "Red" option in the pulldown field, to red (obviously). Alternatively just adding a small red block next to the "Red" option would also work.

Problem is FormBuilder doesn't seem to allow you to customize each pulldown option. Is there a way to do this?


For reference, I'm using an array to switch the images:

Code: Select all

<__script__>
var imageList = Array();
for (var i = 1; i <= 24; i++) {
    imageList[i] = new Image(70, 70);
    imageList[i].src = "img/rescue-paramedic/R6C/R6C-3-Shell-" + i + ".png"; 
}

function switchImage(elem) {
    var selectedImage = elem.value;
    document.shellImage.src = imageList[selectedImage].src;
}</__script>

<img src="img/rescue-paramedic/R6C/R6C-3-Shell-1.png" border="0" width="120%" height="inherit" orgWidth="561" orgHeight="470" name="shellImage" style="max-width: 500px; position: absolute; left: 0; top: 1rem; z-index: 25;"/>