Skip to end of banner
Go to start of banner

Making child fields read-only

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Sometimes you may want to make the database child information fields read-only. Here's a simple way of doing it, using javascript injection into the custom field's description:

You should add the following javascript code into the dbcf child field description from the field’s configuration:

<script type="text/javascript">
document.getElementById('customfield_xxxxx').readOnly=true;
</script>

,where customfield_xxxxx is the the id of your dbcf child custom field. You can see the cf id as parameter in the URL when editing its configuration (eg  '.../secure/admin/EditCustomField!default.jspa?id=10701'):

That's it. Your database child field will now be read-only on all screens.

  • No labels