Webforms with hidden or read-only fields?

Hi,

I just discovered the pre-fill of web forms, and want to know whether it’s worth following this idea:

I want to re-use a web form by using the pre-fill option via the URL (?prefill_Name=AnyName) to kind of “preconfigure” the form. For example, I’d like to pre-set a drop-down to one option, and then I could configure other fields to (dis-)appear. So, using the URL-I’d like to set different “modes” for the form.

Most of all, I need the users NOT to be able to change the pre-filled option. Either the pre-filled value should therefore be hidden or read-only.

I tried to cheat my way into this by:

  • Using the preset / cannot change pre-set value in fields. This could solve my problem, but only if I build multiple forms. Possible, but tedious, and nothing to do with using pre-fill
  • I tried to hide a field with an “impossible” condition, and then pre-fill it via URL param. Hidden fields don’t seem to exist, of are not pre-filled - not good

Any ideas? Thanks!

I think there is an easier way: You can define default values in a form and then set the default value to read-only (see below).


Wouldn’t that solve your problem?

Hi,

partly! I actually used that already as a workaround, and it works perfectly.

However, the particular application I have in mind involves hundreds of these forms: We intend to create forms where people can submit feedback based on a particular location. The users should not need to choose or enter the location. In fact, they should not be able to even change it.

The form’s URL (along with the information about the location) will be baked into a unique QR code for that location. That, of course, can be done by creating lots of different forms with different URLs and pre-set location fields … or by dynamically setting the location with the pre-fill parameter.

Note: When I say “location”, it will be most likely just a place’s name, which will then link to a different table with a “link on create” automation.

Background: A similar use case has been offered to us commercially, and I want to prove that Seatable is capable of this with 10 minute’s work. Still working on my acceptance mission to introduce Seatable here :slight_smile:

Therefore, It’s rather a matter of whether this can be done in a time-saving manner. Creating hundreds of forms … no way. The rest of Seatable’s features … field dependencies, mobile-friendly forms etc. fit the use case perfectly. So close!

Thanks!

I see! Thanks for the extra info.

Right now, prefill values are editable. In SeaTable 3.2, I see no easy way to make them read-only or hide them.

@daniel.pan Would it be possible to upgrade the current prefill feature so as to fill with read-only values or to hide the fields? Could look like this:

  • …/?prefill_COLUMNAME=VALUE → a field is prefilled with an editable value
  • …/?prefillforce_COLUMNAME=VALUE → a field is prefilled with a value and the field is set to read-only
  • …/?prefillhide_COLUMNAME=VALUE → a field is prefilled with a value and the field is hidden

In summary, I think you need the feature

  1. Enable setting a field to be read-only, independent of the default value setting
  2. Can pre-fill a read-only field by URL

In addition

  1. More easy to generate a URL with prefilled values for fields

We can add such a feature in version 3.3.

3 Likes

That would be a great feature!

Yes, I think that sums it up. Pre-filling a hidden field from the url would have just been a way to keep the user from changing it. In my case, I’m happy if I can set the pre-filled field to “read-only”.

For the other case (pre-filled hidden field), there may be applications, but not mine at the moment.

Thanks for considering this für 3.3!

And feature 3. would be wonderful!

1 Like

I am happy to announce: The brand new SeaTable 3.4 ships with all of the above!

1 Like