toggle menu
MahatmaInnovation-Discussion
Categories
Discussions
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Activity
Sign In
·
Register
×
Home
›
VtigerCRM Help
Read-only field text
DungNH_1234
January 2021
in
VtigerCRM Help
When a field is read-only, it disappears during editing. How to make them appear but that it is not editable.
Thank you very much
Comments
vivek85
January 2021
Hi DungNH_1234,
You are right unless you control this in Javascript(Edit.js) as below -
container.find('[name="FIELD_NAME"]').prop("readonly", true);
container.find('[name="FIELD_NAME"]').parent().css('pointer-events', 'none');
container.find('[name="FIELD_NAME"]').css('background-color' , '#DEDEDE');
Thanks
Vivek
DungNH_1234
January 2021
@vivek85
Thank you for reply.
I fixed it
I use code
jQuery('#id').attr("readonly",true);
vivek85
January 2021
Good , Thanks.
Sign In
or
Register
to comment.
Comments
You are right unless you control this in Javascript(Edit.js) as below -
container.find('[name="FIELD_NAME"]').prop("readonly", true);
container.find('[name="FIELD_NAME"]').parent().css('pointer-events', 'none');
container.find('[name="FIELD_NAME"]').css('background-color' , '#DEDEDE');
Thanks
Vivek
Thank you for reply.
I fixed it
I use code
jQuery('#id').attr("readonly",true);