Page 1 of 1

Form builder option

Posted: Tue Apr 12, 2011 8:13 pm
by ARVANDERKAMP
I got a question concerning the Form builder module.. I want to insert a sort of ShowDiv function to my form. I want the possibility to click on a radio button and this resulting in a new set of fields which pop up.

I used the showDiv function before in a previous form (without a CMS), using the following code:

Code: Select all

<__script__ type = "text/javascript">
function showDiv(which) {
if (which == 1) {
document.getElementById("div1").style.display="block";
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="none";
}
if (which == 2) {
document.getElementById("div1").style.display="none";
document.getElementById("div2").style.display="block";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="none";
}
if (which == 3) {
document.getElementById("div1").style.display="none";
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="block";
document.getElementById("div4").style.display="none";
}
if (which == 4) {
document.getElementById("div1").style.display="none";
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="block";
}
}
</__script>
You can watch the result over here (click on one of the radio buttons): http://websitedelivery.nl/contact/offer ... vragen.php

So now I want this to work with Form builder. Can someone help me out?

Thanks a lot!

Alexander