sandy159 Posted November 25, 2020 Report Share Posted November 25, 2020 Hello, I have a Submission form and want to change the background of the cell when the user changes or enters the values. For example, here is the initial view: Once the data is entered, the background is changed: How this is possible? Quote Link to comment Share on other sites More sharing options...
0 CoopperBackpack Posted November 25, 2020 Report Share Posted November 25, 2020 Hello @sandy159, You may try to add this code to the DataPage Footer section: <script type="text/javascript"> document.addEventListener('DataPageReady', updateColor); function updateColor() { const recordsListArr = document.querySelectorAll('[id*=InsertRecord]'); recordsListArr.forEach(element=>element.addEventListener('change', (event) => { element.style.backgroundColor = '#acdbdf'; }) )}; </script> By this code we select all source fields that have the following Form elements: Text Field/Text Area/Dropdown/Listbox. You may customize the background color if needed. sandy159 1 Quote Link to comment Share on other sites More sharing options...
0 telly Posted November 28, 2020 Report Share Posted November 28, 2020 Hi @sandy159, You may use this code, you can input it in the header of the DataPage: <style> input[type=text] { width: 100px; -webkit-transition: width .35s ease-in-out; transition: width .35s ease-in-out; } input[type=text]:focus { width: 250px; background-color: red; } </style> Quote Link to comment Share on other sites More sharing options...
0 telly Posted November 28, 2020 Report Share Posted November 28, 2020 For customizing your DataPage, this will help you, https://howto.caspio.com/tech-tips-and-articles/common-customizations/tech-tip-5-ways-to-customize-the-look-of-your-datapages/ - https://www.w3schools.com/cssref/sel_attribute_value.asp - https://howto.caspio.com/styles/ Quote Link to comment Share on other sites More sharing options...
Question
sandy159
Hello,
I have a Submission form and want to change the background of the cell when the user changes or enters the values.
For example, here is the initial view:
Once the data is entered, the background is changed:
How this is possible?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.