[Vtigercrm-developers] vtiger 6.5: Examples of using Validation Engine without using button type="submit"?

Mariusz Krzaczkowski m.krzaczkowski at yetiforce.com
Tue Jan 10 14:53:07 GMT 2017


Hi Alan,
use the validationEngine('validate') function, it returns true or false.
Just be careful because it works once while validating, then it returns
null.
Here's an example of using it after clicking on a normal button:
https://github.com/YetiForceCompany/YetiForceCRM/blob/developer/layouts/basic/modules/Vtiger/resources/List.js#L64
Here's the description:
https://github.com/posabsolute/jQuery-Validation-Engine#actions

---
Z poważaniem / Regards

MARIUSZ KRZACZKOWSKI 
_Director of Product Development_ 
M: +48 884-998-123
E: m.krzaczkowski at yetiforce.com 
-------------------------

YetiForce 3.0 LTS has arrived! Test [1] the latest, most innovative open
source system in the world, and join [2] our community. 

W dniu 2017-01-10 15:01, Alan Lord napisał(a):

> I have quite a complex custom view/page in vtiger where I need the client to populate some fields then click on a button.
> 
> When they click on the button the Validation engine runs and the results are displayed in a Popup window if the Validation is good.
> 
> However, the only way I can get the Validation to run is to have the button as type="submit". This then ends up triggering a page reload on the original page which I do not want. I have tried various
> 
> form.submit(function(e) {
> e.preventDefault();
> });
> 
> and trying to
> 
> return false;
> 
> from the event handler but nothing seems to work.
> 
> Can anyone think of any examples in the vtiger codebase where the Validation Engine is being used, but without using a button of type submit that I can review for a cluebat?
> 
> Cheers
> 
> Al
> 
> _______________________________________________
> http://www.vtiger.com/
 

Links:
------
[1] https://gitdeveloper.yetiforce.com/
[2] https://github.com/YetiForceCompany/YetiForceCRM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20170110/4526bcc4/attachment.html>


More information about the vtigercrm-developers mailing list