Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do i enable client side JavaScript validation?

0
Posted

How do i enable client side JavaScript validation?

0

Since this plugin uses jQuery Validation plugin, you need to add some CSS classes to your comment form in your WordPress Theme. Open comments.php file of your theme file and find out the comment form in it. Now add following CSS classes to various input boxes: • To the Author textbox, add attribute class=”required” e.g. if your Author textbox looks like ” size=”35″ tabindex=”1″ /> then make it ” class=”required” size=”35″ tabindex=”1″ /> or if you already have some class associated, like class=”foo” in it, then make it class=”foo required” • Similarly, To the Email textbox, add attribute class=”email required” • To the URL textbox, add attribute class=”url” • To the comment textarea, add class=”required” • If you need to change styles for error messages, refer to Q 2 below. • That’s it, you are done adding JS validation to your comment form.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123