Input box that can only be used if the linked cell is empty

I would like to create a submission form on a page that is linked to a database collection dynamically.
The submission form has an input box, and I would like it so that this input box only accepts a new input if the particular cell that the input box is linked to in the data collection is empty.

My preference is that the input box appears greyed out if there is already data in the linked cell (visible but not editable), and is not greyed out if the linked cell is empty.

Alternatively, it could be that the input box just does not work if the linked cell is not empty.

I believe this may involve a wix query, but after looking at examples, I am not able to find a solution.

Thanks

Hi Eaton,

Can you please provide a link to the relevant page?

Thanks,
Itai