Score:0

Proper usage of Webform 6.x + webform_validation 2.x with conditional statements

kr flag

I'm on Drupal 9.4 with webform 6.x. The webform validation module is a bit confusing and I couldn't get the conditional statements to work properly. Below is my configuration. I have a hidden field and I want to populate this field with the duration the user is on the page when 5 seconds has passed with 5000 for milliseconds. From there I want to setup a webform condition to see if the number in this field is greater than 1000, if so it should submit the form, otherwise throw an error.

What is wrong with my condition?

enter image description here

unusedspoon avatar
aq flag
Sounds like honeypot but with extra steps. This module will do what you're trying to achieve I think? https://www.drupal.org/project/honeypot (spam protection using a timer between page load and form submission) Have you considered using that if that's the case?
Patoshi パトシ avatar
kr flag
i would rather not install another module if possible.
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.