• Resolved glenbelt

    (@glenbelt)


    Hi there,

    I’ve setup a contact form with several fields, but for some reason whenever I submit data I’m getting a ” Validation errors occurred. Please confirm the fields and submit it again” error message.

    Contact Form

    Code is here:

    <p>Your Name (required)<br />
        [text* your-name] </p>
    
    <p>Your Email (required)<br />
        [email* your-email] </p>
    
    <p>Your Phone Number<br />
    [tel tel-168]</p>
    
    <p>Species Found (required)<br />
    [select* menu-78 "Zebra mussel (Dreissena polymorpha)" "Alpine newt (Mesotriton alpestris)" "Himalayan balsam (Impatiens glandulifera)" "Orange balsam (Impatiens capensis)" "Parrot's feather (Myriophyllum aquaticum)" "Canadian waterweed (Elodea canadensis)" "Nuttall's Waterweed (Elodea nuttallii)" "Curly waterweed (Lagarosiphon major)" "New Zealand pygmyweed (Crassula helmsii)" "Large flowered waterweed (Egeria densa)" "Water fern (Azolla filiculoides)" "Hottentot fig (Carpobrotus edulis)" "Australian flatworm (Austroplana sangiuinea)" "Quagga mussel (Dreissena bugensis rostriformis)" "Chinese mitten crab (Eriocheir sinensis)" "American mink (Mustela vison)" "Signal crayfish (Pacifastacus leniusculus)" "Other (please explain in comment box below)"] <br />
    If you selected Other, please explain in the text box below.
    [textarea textarea-153]</p>
    
    <p>Location - a grid reference, coordinates or a post code is ideal (required)<br />
    [textarea* textarea-153]</p>
    
    <p>Date of Sighting (required)<br />
    [date* date-687 min:2012-12-01 max:2017-04-01 placeholder "01/01/2015"]</p>
    
    <p>Photograph<br />
    [file file-144 limit:10000 filetypes:jpg|gif|png]
    
    <p>Any other relevant comments<br />
    [textarea textarea-153]</p>
    
    <p>[submit "Send"]</p>

    Have checked I don’t have any caching plugins running, and I do have Jetpack but all modules are disabled apart from some social ones.

    Thanks for any help!

    https://wordpress.org/plugins/contact-form-7/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    It’s confusing because the reasons for the validation error aren’t displayed due to the wrong theme you use. Try switching it to the default theme (twentyfifteen).

    Hello Matt Tutt,
    Your issue is due to your form having two textfields with the same id

    [textarea textarea-153]
    [textarea* textarea-153]

    You also have a second issue with the date format.
    User must enter date in the format 2015-01-30.
    Your placeholder should be in that format to guide the user to enter it like that.

    Thread Starter glenbelt

    (@glenbelt)

    Thanks for the replies – and thanks very much for pointing those issues wally0, you were right.
    I changed those, and fixed the dates. I then had issues with the form I was receiving, but didn’t realise I had to add those fields myself to the form generator on the next tab. Working fine now.

    Thanks again guys.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Validation errors occurred when trying to submit form’ is closed to new replies.