Dynamic Colour Picker in form?

Hi,
I’m trying to create a form that includes a color picker, it’s pre populated from a data_detail compnent which is defined by clicking a row in a table.

If I use a text input the colour hex shows correctly, but using the same method with a colour picker doesn’t work…the colour picker always shows black and doesn’t change with the table selection. Is this possible to do, and is there anything I’m missing?

image

Thanks!

Hello,

Just the other day I implemented a palette of colors in his project.

So. The palette will always show some color, initially it is black, but you can choose any other color as the starting color. To do this, in the input settings, enter in the Static Value field the color value that you want to see by default (I made white):

To make the color selection work, first you need to click on the main colors, and only then choose the palette, whereupon the color will be set correctly (I think this is a mistake, but not critical):

Also, if you want to default to no color at all, then in the action of the server responsible for inserting the record, you can make a condition whereby the default color will be ignored and an empty field or “null” will be inserted into in the database if the user did not choose a color.

Thanks, I can get it to work creating a new database entry. I’m looking to set the colour based on a database query in an update form.

So you choose a record and it shows the form with the colour picker set to the colour of the database record? So rather than set a static value, I;ve tried to set a dynamic value

image

The dynamic works it it’s a text input but doesn;t set the colour in the colour picker

image

Very strange. I have no problem setting the previously selected color to the color picker in the update form.