Jump to content

about a contact form


Martinus
 Share

Recommended Posts

Hi PW's,

I am trying to find out if there is such a thing as a simple contact form with validation etc. on PW.

Right now I have a simple form using bootstrap but obvious - there is not really a good validation in it's framework.
I could fill in whatever I want and it validates ok.

I have looked in modules but there is so much and also many seem to be outdated (more then ten years back). I have tried to install frontendForms but was giving me errors after I placed the folder in my modules map and did a refresh.

Any advice is welcome.

Link to comment
Share on other sites

Which Bootstrap Version are you using? Since Bootstrap 4 there is a form validation component that you can use. It prevents submitting when required fields are empty (for example).

https://getbootstrap.com/docs/4.6/components/forms/#validation

https://getbootstrap.com/docs/5.1/forms/validation/

However this validation is frontend only. If you disable JavaScript you are still able to submit the form to the server. So I would advice you to make use of both frontend validation (Bootstrap) and backend validation (either via the processwire API or a third party PHP module (https://github.com/rakit/validation).

Link to comment
Share on other sites

ok. I have bootstrap 5.2, and I know the validation of it only checks for empty fields. I still need PW validation at the back. Where do I find such examples? I have looks in the docs, api, and tutorials section (forum) but did not find any.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...