Ready to get started?Download WordPress


Contact Form 7
need help with my map plugin for cf7 (4 posts)

  1. shemesh
    Posted 1 year ago #

    I've written a plugin for cf7 - Contact Form 7 Map Field and i need some help with the code, please.

    in map-code-leaflet.html, which is where all the map coding going on, down at the end of the file, you can see a "function validate()" where i try to make 2 validations: first that there is a marker, and second for the map zoom level.

    BUT... i don't know how to connect this with the cf7 validation!

    i do have a field validation, at "contact-form-7-map-field.php".

    but how do i connect them?

    any idea, and comments are welcomed.

  2. shemesh
    Posted 1 year ago #


  3. Takayuki Miyoshi
    Plugin Author

    Posted 1 year ago #

    Every Contact Form 7's validation is executed on server side. I think you shouldn't run original JS validation function on client side. Instead, just POST the values and validate them on server side as well as other field inputs.

  4. shemesh
    Posted 1 year ago #

    (i'm not a php developer but i'm doing my best)

    OK... i think I've got it.
    I've uploaded a new version - 2.3
    can you please take a look at my code and say if I've done good?

    any comments for improvements are welcomed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.