Please enter at least 2 characters
-
Hi Guido,
Another problem which I’ve seen intermittently. I fill in all the form fields, click submit, and get back the same form with all fields blank and an error message by each one saying e.g., please enter at lest 2 characters.
I looked at the POST data and all fields seem to be filled in, so my only guess is that in the form validation the $rand_suffix value doesn’t match for some reason. I’m using the Siteground caching plugin and if I exclude the page from caching then form submission seems to work OK.
I can see that the suffix is handled using a transient but I’m not exactly sure how it works and it seems quite complicated.
Looking at other contact forms I can see they don’t do this. There is an ID for the form, 1 for the first form, 2 for the second, etc. in case you have more than one on a page, but no random component. I’ve done something similar myself for a maps plugin, adding a suffix to differentiate between maps on the same page.
Do you actually need the random suffix as it seems to introduce other problems?
Simon
The topic ‘Please enter at least 2 characters’ is closed to new replies.