This topic is locked
[SOLVED]

Default Value for Color Picker

2/17/2024 1:24:58 PM
PHPRunner General questions
D
druck281 author

I am using a color picker that will set the text color for a record but when I add a new record, it defaults to #FFFFFF (white). Can I force the default option to be #000000 (black)?

Thanks!

fhumanes 2/18/2024

Hello,

At least, the plugins that I have do not have a parameter to fix the color by default, but what you can do is put the color that you want by default to the field before it is displayed on the screen.

In this way, you can take the default value.

Greetings,
fernando

D
druck281 author 2/22/2024

Thanks Fernando. I was thinking about doing that. I wasn't sure how to pull that off using an inline add but I got it.

In the JS OnLoad event for the Add page...

var ctrl=Runner.getControl(pageid,'TextColor');
ctrl.setValue('#000000');
fhumanes 2/22/2024

Thanks for sharing your solution.

Greetings,