0

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?

1
  • A person could change the query string so no matter Webform’s implementation I would say this is impossible.
    – cilefen
    May 9, 2023 at 11:36

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.