Score:0

Disable pre-populated fields in webform

in flag

I have form created with Webform module, some fields are enabled for pre-population, so in some cases I use URL parameters to pre-populate them.

The thing is that I need to forbid users to change pre-populated fields (ether to disable them, or to hide them).

I checked field conditions in Webform configuration, but there's no option for this.

How it's possible to resolve this?

id flag
A person could change the query string so no matter Webform’s implementation I would say this is impossible.
Score:0
cn flag

When you edit an element, under form display you should have a list of options:

  • Input hiding
  • disabled
  • read only
  • prepopulate

I believe disabled should achieve what you require.

However, as the comment mentioned, there is no way to prevent anyone from amending the query string as they seem fit.

If you need the 'query string' to be 'secure' then you should be looking at a different solution entirely, e.g. you could store it in the session.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.