Page 1 of 1

Field color based on lead value

PostPosted: Tue Feb 07, 2017 6:01 am
by DarknessBBB
Hello everybody!
Quick question: I can't find the code portion where the fields are populated in the agent screen when the customer answers.
My goal is to change the background color of the "comments" textarea with a PHP if.

Is this possible in a raw and quick way? It's just a test

Thank you very much.

Vicibox Redux
VERSION: 2.12-538a
BUILD: 160122-1401
Single server installation

Re: Field color based on lead value

PostPosted: Tue Feb 07, 2017 6:37 am
by mflorell
That wouldn't be PHP, you'd have to use CSS to do it, and there's no framework to do that so it would take a bit of work to do that on a per-call basis.

Re: Field color based on lead value

PostPosted: Tue Feb 07, 2017 6:52 am
by DarknessBBB
Thank you very much Matt

Re: Field color based on lead value

PostPosted: Tue Feb 14, 2017 9:40 am
by DarknessBBB
Very raw (but working) workaround:

Code: Select all
<textarea  rows="10" cols="10"  autofocus="autofocus" onfocus="if(this.value.length>5) this.style.backgroundColor = '#ff0000';if(this.value.length<=5) this.style.backgroundColor = '#ffffff'"></textarea>