Change color of field based on another fields value
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Jaydius,
That should be doable, but it depends on what type of field you want to change background of. Do you want the background to save or be only visible when the form is opened?
That should be doable, but it depends on what type of field you want to change background of. Do you want the background to save or be only visible when the form is opened?
Cheers
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Jaydius,
For standard text field, you can use the following code on Edit form to change background color:
For Display Form, use the following code:
How to detect change in Choice field, you can find in the following article - https://spform.com/javascript-framework ... eld-values
For standard text field, you can use the following code on Edit form to change background color:
Code: Select all
fd.field('Title').control()._el().find('input').attr('style', 'background-color: #EE5050;')
Code: Select all
var style = fd.field('Title').control()._el().attr('style');
fd.field('Title').control()._el().attr('style', 'background-color: #EE5050;' + style);
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests