Conditionally make hidden form field visible

Context

  • See the image below as a reference for my example. At times, I’ve wanted to prefill a form field, such as a client’s Date of Birth. It should be filled with the Date of Birth field coming from the Clients table.
  • However, sometimes this field will be empty, upon which it will need to be collected. So there’s my issue: if I make it hidden so that it passively collects the client’s Date of Birth, that’s great until they don’t already have a DOB value. In that case, the form will be submitted and the DOB will be empty.
  • I’m getting around this with some workflows but ideally you could just conditionally display a hidden form field.

In other words, you could have a section in the window below that allows you to create rules that, if true, causes the field to display on the form. That way, if the client has a DOB in the system, it will be prefilled. Otherwise if the client doesn’t have a DOB in the system, the field will display.

Method 1 - Conditionally display a hidden form field

Here’s another possibility for approaching a feature that will fix this issue.

Method 2 - Self-reference a field in conditional visibility

  • In this method, I would have my “Date of Birth” field set to have it’s default value be the client’s date of birth. Easy. But then the field is sitting there visibly, with a pre-filled value which is just ugly and, depending on your use-case, unacceptable if that datapoint needs to be hidden. So I went to conditionally display that field only if there is NO default value. But I found you can’t do that… yet :slight_smile:

I’ve run into this situation many times as well. I’d say more broadly I’d like to see the ability to conditionally set default values.

Just realised this is very close to my request here: Conditional hidden field