Hello,
I want to add validation for name field in Account module.
Does anyone have any code reference or hint ?
Hello,
I want to add validation for name field in Account module.
Does anyone have any code reference or hint ?
Hello,
1) Create a javascript file and include it via custom/modules/Accounts/metadata/editviewdefs.php
2) override check_form function to validate before submit
Hope it helps.
Thanks & Regards,
Team Urdhva Tech
Hello Urdhva Tech,
Thank you for the answer. Can you share some sample code if you have any.
That would be highly appreciated!
Hello,
Here how to do it in your editviewdefs.php file for including your js
<?php
$module_name = 'Accounts';
$viewdefs [$module_name] =
array (
'EditView' =>
array (
'templateMeta' =>
array (
'includes' =>
array (
0 =>
array (
'file' => 'custom/modules/Accounts/abc.js',
),
),
'maxColumns' => '2',
'widths' =>
and create a abc.js file at the following location
Add your jquery validation in that js file simple
I hope it helps
Hello Umar Akhlaq,
thank you for the reply, I got the answer from urdhva's reply