Answered by:
Disable iframe

Question
-
Is there any way to disable the iframe in an entity form by JavaScript.I mean to make it readonly and stop adding and removing related records in the iframe.Besides, is there a simple way to make all the fields in the form disabled(just like inactive) other than disable all the fields one by one?Thanks in advance.Thursday, January 21, 2010 4:05 PM
Answers
-
This is the answer:
http://jianwang.blogspot.com/2007/11/how-to-disable-readonly-crm-fields.html
Jimmy Larrauri http://jimmylarrauri.blogspot.com- Proposed as answer by Jimmy LarrauriModerator Thursday, January 21, 2010 5:16 PM
- Marked as answer by DavidJennawayMVP, Moderator Friday, February 26, 2010 5:25 AM
Thursday, January 21, 2010 5:16 PMModerator -
if (crmForm.FormType == 2)
{
for( var i = 0 ; i < crmForm.all.length ; i++ )
{
if( crmForm.all[ i ].req)
crmForm.all[ i ].Disabled = true;
}
}
Would you like to keep some fields editable, you can do the following:
if (crmForm.FormType == 2)
{
for( var i = 0 ; i < crmForm.all.length ; i++ )
{
if( crmForm.all[ i ].req && crmForm.all[i].id != "name")
crmForm.all[ i ].Disabled = true;
}
}
check these.
https://community.dynamics.com/forums/p/12505/17186.aspx
http://www.eggheadcafe.com/software/aspnet/31621303/disabling-attributes-in-a.aspx- Marked as answer by DavidJennawayMVP, Moderator Friday, February 26, 2010 5:25 AM
Thursday, January 21, 2010 4:14 PM
All replies
-
if (crmForm.FormType == 2)
{
for( var i = 0 ; i < crmForm.all.length ; i++ )
{
if( crmForm.all[ i ].req)
crmForm.all[ i ].Disabled = true;
}
}
Would you like to keep some fields editable, you can do the following:
if (crmForm.FormType == 2)
{
for( var i = 0 ; i < crmForm.all.length ; i++ )
{
if( crmForm.all[ i ].req && crmForm.all[i].id != "name")
crmForm.all[ i ].Disabled = true;
}
}
check these.
https://community.dynamics.com/forums/p/12505/17186.aspx
http://www.eggheadcafe.com/software/aspnet/31621303/disabling-attributes-in-a.aspx- Marked as answer by DavidJennawayMVP, Moderator Friday, February 26, 2010 5:25 AM
Thursday, January 21, 2010 4:14 PM -
Thursday, January 21, 2010 5:06 PM
-
This is the answer:
http://jianwang.blogspot.com/2007/11/how-to-disable-readonly-crm-fields.html
Jimmy Larrauri http://jimmylarrauri.blogspot.com- Proposed as answer by Jimmy LarrauriModerator Thursday, January 21, 2010 5:16 PM
- Marked as answer by DavidJennawayMVP, Moderator Friday, February 26, 2010 5:25 AM
Thursday, January 21, 2010 5:16 PMModerator