I posted a related issue some time ago (viewtopic.php?f=4&t=9065&p=18708&hilit=Contact+Form#p18708).
I assume that CouchCMS provides some basic PHP server-side validation / sanitization of forms. (Correct me if I am wrong and it only provides front-end validation). For security reasons, I would like to avoid having to write my own data validation functions on the server.
I have a basic contact form that I am validating on the front-end with jQuery Validate (http://jqueryvalidation.org/) as I find this plugin more intuitive to use (works without problems) , but would like to use CouchCMS for back-end validation of the inputted data of the form. Now, I don't know if this is possible, because in the case of using jQuery Validate, I am not sure if I can use the CouchCMS form validation tags (or can I ?!?).
My form looks like this:
Furthermore, as the server I am working on does not support the PHP mail() function, I will have to use a library like PHPMailer, which another user already laid out (viewtopic.php?f=4&t=8675&p=16802&hilit=Contact+Form+PHPMailer#p16802).
Would appreciate your advise if this is possible as intended.
I assume that CouchCMS provides some basic PHP server-side validation / sanitization of forms. (Correct me if I am wrong and it only provides front-end validation). For security reasons, I would like to avoid having to write my own data validation functions on the server.
I have a basic contact form that I am validating on the front-end with jQuery Validate (http://jqueryvalidation.org/) as I find this plugin more intuitive to use (works without problems) , but would like to use CouchCMS for back-end validation of the inputted data of the form. Now, I don't know if this is possible, because in the case of using jQuery Validate, I am not sure if I can use the CouchCMS form validation tags (or can I ?!?).
My form looks like this:
<!-- contact form -->
<form id="contactForm" class="contact-form" method="post" action="">
<div class="row">
<div class="l-contact-left">
<label for="firstname">First Name</label>
<input type="text" id="firstname" name="firstname"><br>
</div>
<div class="l-contact-right">
<label for="lastname">Last Name</label>
<input type="text" id="lastname" name="lastname"><br>
</div>
</div>
<div class="row">
<div class="l-contact-left">
<label for="email">E-Mail</label>
<input type="email" id="email" name="email"><br>
</div>
<div class="l-contact-right">
<label for="phone">Phone</label>
<input type="number" id="phone" name="phone" min="1"><br>
</div>
</div>
<div class="row">
<div class="l-contact-left">
<label for="company">Company</label>
<input type="text" id="company" name="company"><br>
</div>
<div class="l-contact-right"></div>
</div>
<label for="message">Message</label>
<textarea rows="8" id="message" name="message" placeholder="Your message"></textarea><br><br>
<input class="btn btn-contact" type="submit" value="Submit">
</form><!-- /contact form -->
Furthermore, as the server I am working on does not support the PHP mail() function, I will have to use a library like PHPMailer, which another user already laid out (viewtopic.php?f=4&t=8675&p=16802&hilit=Contact+Form+PHPMailer#p16802).
Would appreciate your advise if this is possible as intended.