We’re rewarding the question askers & reputations are being recalculated! Read more.
3

I deleted my earlier answer, since it was on some points true but not exactly answered the question. My mind was blurred by the question. :) The question is very tricky. Why? Because in the question the linked Joomla document clearly states that in order to have the validation jQuery functions ignited on your Form, you have to add the form-validate class ...


3

If there is no native answer I have a solution to do this with an own JFormRule class. Create a file in your component/models/form/rules directory called regex.php Insert the source below class componentnameFormRuleRegex extends JFormRule { public function test(&$element, $value, $group = null, &$input = null, &$form = null) { $...


3

You can use Client Side Validation for this, however You will need to make a Custom Form Field for this to happen. Assuming you're using Joomla 3.4, you first need to initialise the validation script, like so: JHtml::_('behavior.formvalidator'); Then for your field, you need to add the class validate-changeme <field name="firstname" type="text" label="...


3

I have had similar issues in the past where scripts seem to be stripped regardless of the text filter settings. Temporarily Disable Editor As a temporary work around, you can temporarily set the Default Editor to "None" each time you edit the content. This works but is not convenient especially when you or another administrator forgets to disable the ...


2

The problem is you haven't set the Error messages, so no error message is shown. You need to include: message="This field is required!" You were using description="" and this is shown in the tooltips of the field. So your code becomes: <?xml version="1.0" encoding="utf-8"?> <form class="form-validate"> <fieldset name="lead" label="...


1

Its possible to use the Joomla\CMS\Form\Rule\EmailRule directly within code. Just instantiate it and then call its test method. The test method requires two arguments, a SimpleXMLElement defining the field tag the value to be tested. To validate a bunch of uploaded email addresses, you would use the code $emails; //an array of email addresses $...


1

Would you not have joy with adding required as an additional class on the field? On the https://docs.joomla.org/Special:MyLanguage/Client-side_form_validation doc page, <field name="email" type="text" class="required validate-email" size="30" /> suggests that you could just add required to the end of class="validate-myemail gngcontact". As for your ...


1

If you are using Google's reCaptcha that is the default plugin for Joomla!, the validation is done off site and a pass or fail "flag" is returned to your form...no further action needed from you.


1

It appears you are submitting the from without executing the validation. Using jQuery, you could listen for the form submit event, check validation and submit the form if it passes. At the top of your PHP file add the following to load the jQuery library: JHtml::_('jquery.framework'); Add the below JS to the page inside a script tag: (function($) { ...


1

TinyMCE removes empty tags by default, so a tag like <script src="myScript.js"></script would be removed because it's empty. You can try changing the settings of the TinyMCE plugin (Extensions -> Plugins -> **Editor - TinyMCE) and add the following text to the Extended Valid Elements field. script[*] That should allow you to add JavaScript ...


1

We were never able to solve this with Tiny MCE either. As Neil suggests, you merely turn it off entirely while using it, or utilize Sourcerer from the component formerly known as NoNumber. Alternative: Install JCE as your editor. There you have the ability to set it to allow script, iframes, etc, and you have a better editor with more control at the end of ...


Only top voted, non community-wiki answers of a minimum length are eligible