Hello,
I am testing Chronoforms 5 using a clean test Joomla 3.2.3 with the protostar default template (empty site, without sample data).
I set JS validation onload (I tested onsubmit too) with only one required field. When I display the form (with the plugin or directly width the direct form url), the validation doesn't work. I opened firebug and I get the following error : gvalidate is not a function.
I modified the client_validation.php file remplacing the $ with jQuery to avoid JS library conflicts :
jQuery("#chronoform-'.$form->form['Form']['title'].'").gvalidate({});
No change. Then I searched for the gvalidate function. It was not called so I called this file in my template :
$doc->addScript('libraries/cegcore/assets/gplugins/gvalidation/gvalidation.js');
No error anymore but validation doesn't work too. How do I have to proceed to get it work ? Current Chronoform 5 is in RC, I think it's a bug.
I use Chronoforms 5 because I was not able to get CF4 to work with the same config (I used the J3.x component version). I saw there's video tutorial, I'm going to watch it. I don't like using beta, RC in a production website.
Thank you
Hi Makinero,
You don't need to use the "Client validation" action, just add your fields using the designer and add the "HTML" action to the "on load", if any of your fields has validation enabled then it should work.
If both v4 and v5 validations don't work then there may be some other problem which we don't know, can you post a link to your website ?
Let me know how this works!
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hello
I don't use code wizard, I hand code HTML. If I understand you, in this case, validation does not work ? I can't give a link of a website at the moment.
You can use your own HTML code, please send me a screenshot for the "Client validation" config you have ?
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
The setup :
http://www.hostingpics.net/viewer.php?id=640711setupcf5.png
The detail :
http://www.hostingpics.net/viewer.php?id=487512setupcf5detail.png
With an input type text having a name "nom".
Thanks
Please try to drag the "client validation" before the "html", also please add this to the detail:
nom:your error message
Another note, nothing can run after a "redirect", so please drag your email before it!
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
OK, I've set the options as you said but it still doesn't work. I have the following JS error :
TypeError : $this.tooltip is not a function (gvalidation.js line 158)
$this.gtooltip('destroy','gtooltip gvalidation-error-tip');
Ok, another file is needed, please remove the linke you added to your template earlier and add this code to a "custom code" action BEFORE the "client validation" action:
$doc = \GCore\Libs\Document::getInstance();
$doc->_('jquery');
$doc->_('gtooltip');
$doc->_('gvalidation');
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
That worked fine ! Thanks !
I think that should be integrated by default. It's a native feature !
I forget. I can't send you my url website because it's an intranet. Then I could send screenshot if needed.
Hi ag3,
#1- As noted earlier in the topic, the Client validation action has a bug, and so I suggest that you enable the validation in your field settings only for now, until a new update is available! (its almost ready)
#2- Custom elements should work fine, please try to inspect the place where the element has been added in the designer, I can't tell without checking your form!
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi
#1 how enable validation on field, because on the texarea box , the validation is on YES and that doesn't work.
all fields have validation on yes and its only on this textarea box where the validation doesn't work.
Hi ag3,
I will need to check this myself then, please send me a link to the form here or in a PM
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.