Read-only fields in forms

Hi all!

:bulb: Here is a new feature proposal: allow to lock (prefilled) fields in forms (or any other way to display field as read-only).

:question: Why that ? We developed a way to use forms with prefilled fields to allow users to update existing rows. Locking values would allow the user to have access to different fields values while not being able to change it.

For instance, let’s say I have a table Event with different events (with fields like date, location, guests, concerts, etc.) and the user is the organizer of one them. I would like him to be able to update guests and concerts and not date and location. But it could be nice to display date and location on the form.

:gear: How ? I think the simplest way would be to add a tick in the form view and use the prefill_ functionality to fill it. In the form, this would appear as read-only field (grey-scale or so).

Hope this can be useful for other use cases!
asan

Hello,
I think it is a good idea to have locked fields in a form, but I wonder how it can be done to avoid malicious use.

If the information “this field is locked” is present in the URL (such as prefill_ or hide_ parameter, let’s imagine a lock_ parameter), anyone can change the URL to unlock the field.

This should be set from the form creator view. Here is how it could look like (I copied the “required” tick):
image

Then how could we prefill (and lock) dynamically a field? Even if the field is locked from the creator biew, anyone could change the prefill_ parameter from the URL to change the value of the field.
I think it is not possible to combine dynamic prefill and lock at the same time, or it should not be done in the URL.

Any idea?