Hello,
Edit the file custom/modules/Accounts/metadata/editviewdefs.php or if this file don't exists copy modules/Accounts/metadata/editviewdefs.php to this folder and then edit to that:
PHP Code:
'templateMeta' =>
array (
'form' =>
array (
'buttons' =>
array (
0 =>
array (
'customCode' => '<input type="submit" value="{$APP.LBL_SAVE_BUTTON_LABEL}" name="button" onclick="this.form.action.value=\'Save\';
return my_verification();" class="button" accesskey="{$APP.LBL_SAVE_BUTTON_KEY}" title="{$APP.LBL_SAVE_BUTTON_TITLE}"/>',
),
1 => 'CANCEL',
),
),
'maxColumns' => '2',
'widths' =>
array (
0 =>
array (
'label' => '10',
'field' => '30',
),
1 =>
array (
'label' => '10',
'field' => '30',
),
),
'includes' =>
array (
0 =>
array (
'file' => 'modules/Accounts/Account.js',
),
1 =>
array (
'file' => 'custom/modules/Accounts/MyVerification.js',
),
),
),
See that in the onclick of the save button I call the function my_verification(); and in the includes I include MyVerification.js, so you need to do this file with this function:
MyVerification.js
PHP Code:
function check_phones(){
//Put your confirmation here
return check_form('EditView');
}
You can use the function and the file with the name you want but don't remove the "return check_form('EditView');" part because this part will make the validation of fields (required fields, int fields, etc.).
I hope it helps,
Bookmarks