Multiple FormBuilder forms on one Page (multiple CSS IDs)
Posted: Thu Mar 29, 2012 12:30 am
I note that the FormBuilder (0.7.2) help says
So, when you use the "Default value for field" box for a Text Area field and tick the "Clear default on click" box, you end up with multiple instances of this on your page:
Note the id="message" and getElementById('message'). Works fine for the first one but breaks for all the rest (in IE 9 anyway).
Would love to hear any ideas for a work-round on this?
Thanks
Multiple forms do work, sort of. Problem is the CSS IDs of the form elements are the same for each instance of the form. That means you can't address each one individually.In theory, you can have multiple forms on a page if you really want to.
So, when you use the "Default value for field" box for a Text Area field and tick the "Clear default on click" box, you end up with multiple instances of this on your page:
Code: Select all
<textarea name="cntnt01fbrp__18" cols="60" rows="5" class="cms_textarea" id="message">Message</textarea><__script__ type="text/javascript">
var f = document.getElementById('message');
if (f)
{
f.onfocus=function(){
if (this.value==this.defaultValue) {this.value='';}
}
f.onblur=function(){
if (this.value=='') {this.value=this.defaultValue;}
}
}
;</__script>
Would love to hear any ideas for a work-round on this?
Thanks
