Skip to main content
Question

Changing Field Color Based on Checked Box

  • February 22, 2020
  • 0 replies
  • 56 views

I have a set of date fields that I would like to change the background color once a box is checked indicating that the task is complete.  Would love some help with this if it's possible.

Thank you!

-g

------------------------------
Gwen Peters
------------------------------
This topic has been closed for replies.

AdamKeever1
Forum|alt.badge.img+2
  • Quickbase Alumni
  • February 24, 2020
You could use a formula rich text field:

If([checkbox1]=true,
"<span style=background-color:#00ff00;><b>"&ToText([field4])&"</b></span>",
ToText([field4]))

Unchecked:

Checked:

You can use dynamic form rules to show/hide the original date field and include an edit checkbox so the user can change the date field if needed:


Date field is blank:

Date field is not blank:

Date field is not blank AND checkbox is checked:

Date field is not blank AND checkbox is checked and Edit is checked:





------------------------------
Adam Keever
------------------------------

  • Quickbase Alumni
  • February 24, 2020
What Adam posted was along my initial thinking as well, it would work.

There may be other solutions to this that are more user/UI friendly.

One thing I was just thinking of would be if you had hidden fields next to each field you want to show as completed. Similar to what Adam posted but have them only show up when a checkbox after each section is clicked, or at the end of the form even. You could do this per field, which would get a little out of hand very quickly, or per section. MY example here is going to be very simple but hopefully it helps to illustrate my point. IT has a form rule that is essentially "when Section 1 - Date is no blank and Section 1 - Finished Checkbox is checked, show Section 1 - Validated". You could have other conditions in there as well.

With an alternate label showing no names this would look much better, I also picked a rather large icon.

And obviously nothing is shown as valid if there is no date. However it does not prevent submission in that case, you could add it in.

Hopefully that helps to show another option.