Hello,
A very basic question whose answer I couldn't find. How do I refer to a form field after I have added "Model Id" to it. I was earlier using a form without using a model id and wrote the following code:
This was working fine. I had to add Model ID because of the corresponding CC connection usage. Now the field name in form is: ab[ip_bit_approved], which was earlier ip_bit_approved. I tried many options including
The script has stopped working and I can't get it to work. How do I refer to this field in Javascript.
Thanks
Amal
A very basic question whose answer I couldn't find. How do I refer to a form field after I have added "Model Id" to it. I was earlier using a form without using a model id and wrote the following code:
document.cf_myform.ip_bit_approved.readOnly = true;
in Load JS to make a field Read Only.
This was working fine. I had to add Model ID because of the corresponding CC connection usage. Now the field name in form is: ab[ip_bit_approved], which was earlier ip_bit_approved. I tried many options including
document.cf_myform.ab.ip_bit_approved.readOnly = true;
but it didn't work.
The script has stopped working and I can't get it to work. How do I refer to this field in Javascript.
Thanks
Amal
Hi Amal,
If the id in the Form HTML is ab[ip_bit_approved] then I'd suggest that you try document.ab[ip_bit_approved] or, using the MooTools syntax $('ab[ip_bit_approved]')
Bob
If the id in the Form HTML is ab[ip_bit_approved] then I'd suggest that you try document.ab[ip_bit_approved] or, using the MooTools syntax $('ab[ip_bit_approved]')
Bob
Maybe you can simply add an "id" attribute to the field and use
Regards,
Max
$("field_id")
?
Regards,
Max
This topic is locked and no more replies can be posted.