Hello. I am wondering how to make some options in my contact form expadable. For example, If they check the box, it expands to show the additional options. Is there a script out there that will do this? Thanks in advance, Drew
It seems you need to apply javascript here. I think there is no ready script. even through there is that you need to tune it anyway.
Javascript will do what you want but if you have a multi-page form then it wont "remember" the status between round trips. Using .Net or PHP or such (in conjunction with Ajax is best) will allow the cross post memory. If you are validating the inputs on the hidden/ shown fields (eg required or correct format etc) then you almost certainly will need to use serverside as it would be very messy javascript to enable/ disable validation as well as show/ hide nested divs
<script type="text/javascript"> function byId(id) { return document.getElementById ? document.getElementById(id) : document.all[id]; } </script> <p><a href="nojs.html" onclick="byId('contact_form').style.display=''; return false;">Expand contact form</a></p> <div id="contact_form" style="display: none;"> <form> ... </form> </div> Code (markup):