FAQ: I want to prevent input from being entered into another field depending on the user's input operation
## Answer
Use "[Script](/en/manual/table-management-script)".
---
## Overview
If you enter "1" in category A, the function that makes category B read-only must be implemented using a "[Script](/en/manual/table-management-script)". The sample code is shown below.
### Operation Procedure
1. Create a table and enable Classification A and Classification B.
1. Create a new "[Script](/en/manual/table-management-script)" and enter the contents of the script below. Check "Create new" and "Edit" for the output destination to change or update.
1. Open the record editing screen and enter '1' into Classification A.
## Sample Code
##### JavaScript
```
$(document).on('change', '#' + $p.getControl('ClassA')[0].id', function () {
if ($p.getControl('ClassA').val() === '1') {
$p.getControl('ClassB').attr('readonly', true);
$p.getControl('ClassB').css('background', '#f5f5f5');
}
});
```
## Related Information
<div id="ManualList"><ul><li><a href="/en/manual/table-management-script">Table Management: Script</a><span>08.13.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />