Hi @PowerRanger ,
Yes , this is Possible by javascript
Example:
<script>
document.addEventListener("DOMContentLoaded", function() {
// Check the approval checkbox status
function updateFormFields() {
var approvalCheckbox = document.getElementById("approvalCheckbox");
var assignedContact = document.getElementById("assignedContact").value;
var loggedInUser = "JohnDoe"; // Replace with your actual logged-in user
// If the approval checkbox is checked and the user is the assigned contact, make fields read-only
if (approvalCheckbox.checked && loggedInUser === assignedContact) {
document.getElementById("readOnlyField1").readOnly = true;
document.getElementById("readOnlyField2").readOnly = true;
// Add more fields as needed
} else {
// If conditions are not met, make fields editable
document.getElementById("readOnlyField1").readOnly = false;
document.getElementById("readOnlyField2").readOnly = false;
// Add more fields as needed
}
}
// Attach the update function to the change event of the approval checkbox
document.getElementById("approvalCheckbox").addEventListener("change", updateFormFields);
// Call the update function on page load
updateFormFields();
});
</script>
Regards
Surendran Ravindran
--------------------------------------------------------------------------------------
Hope that helps.
If the post solves your problem, please mark it as solution. If it helps, consider a thumbs up.