Forum Discussion
I know you have your reasons to not use the out of the box filters, but I would advise to reconsider it. What you're looking to do seems very easy with a regular expression and the filters ...
Now, if you really want to use some scripting (which might slow down the system), have you tried to look at jQuery? jQuery is quite powerful when it comes to forms and actions ... Just a thought ...
- phani11 years agoAdvisor
Hi Jordan,
The following jquery code might fullfill your needs.
$('.lia-button-Submit-action').bind('click', function(e) {
/* perform your validation here */
var subject = $(".lia-subject");
if(subject.value.match(/* characters to check */))
{
e.preventDefault();
alert(/* alert user for wrong characters */)
}else {
return true;
}
};I have given example to check subject after user click Post button.
Related Content
- 11 years ago
- 10 years ago
- 14 years ago
- 12 years ago
- 11 years ago