I want to disable a few fields on a form and on my CF4 set up I have used a Load JS action on the On Load event and put it before the Show HTML:
This works fine. However, on CC5 I cant get it to work??
I used the Load JavaScript action on the On Load event and ensured that the IDs of the 2 fields were DefaultAddress & DefaultPhone, but the fields dont go read only as they do on CC4.
Any ideas on how to fix this please?
Ultimately I am using this way as I want to put an if statement in here to only turn them read only if a certain parameter was met, but I need to get this bit working first.
I dont know if it is related, but I also tried using the Element Event tab from within the form designer, but I couldnt get that to work either.
Kind regards
window.addEvent('domready', function() {
$("DefaultAddress").readOnly = true;
$("DefaultPhone").readOnly = true;
});
This works fine. However, on CC5 I cant get it to work??
I used the Load JavaScript action on the On Load event and ensured that the IDs of the 2 fields were DefaultAddress & DefaultPhone, but the fields dont go read only as they do on CC4.
Any ideas on how to fix this please?
Ultimately I am using this way as I want to put an if statement in here to only turn them read only if a certain parameter was met, but I need to get this bit working first.
I dont know if it is related, but I also tried using the Element Event tab from within the form designer, but I couldnt get that to work either.
Kind regards