User Manual

06.26.2025

MANUAL

FAQ: Change the color of input column depending on the selected content

## Answer Use "「Script」". --- ## Overview Create a record table, enable ClassA, Value A, and B, then create a new "「Script」" and write the following script. Check "Create new" and "Edit" for the output destination to update. Below is a sample script that changes the border color of Value A and Value B depending on the selection of ClassA. ##### JavaScript ``` $(document).on('change', '#' + $p.getControl('ClassA')[0].id, function() { const myClassA = $p.getControl('ClassA').val(); const myCssBlue = {'borderColor': 'blue', 'background': '#f0f8ff'}; const myCssDefault = {'borderColor': '#c0c0c0', 'background': 'white'}; switch(myClassA) { case 'A': // Processing for number A $p.getControl('NumA').css(myCssBlue); // Processing for number B $p.getControl('NumB').css(myCssDefault); break; case 'B': // Processing for number B $p.getControl('NumB').css(myCssBlue); // Processing for number A $p.getControl('NumA').css(myCssDefault); break; default: // Processing for number A $p.getControl('NumA').css(myCssDefault); // Processing for number B $p.getControl('NumB').css(myCssDefault); break; } }); ``` If you select "A" in category A, the border color of numA will change to blue. ![image](https://pleasanter.org/binaries/65808d1294394af98237f9c223cb3544) If you select "B" in category A, the border color of numB will change to blue. ![image](https://pleasanter.org/binaries/99bc3bd0b2af494b96ecd027fcbed186) If you select anything other than "A" or "B" in category A, the border color of numA and numB will be returned. ![image](https://pleasanter.org/binaries/ecf29b1c48724a28b64b7d1370547bb0) ## Related Information <div id="ManualList"> <article class="s-blog_list_unit"><h2> <h2>The specified information was not found.</h2> <p><a href="/ja/manual">Return to top</a></p> </article> </div><input id="SearchTextHidden" type="hidden" value="" />
TOP
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.