I extended the user plugin to include extra form fields:
UsersController::extendFormFields(function ($form, $model, $context) {
$form->addTabFields([
'mobile' => [
'label' => 'Mobile',
'type' => 'text',
'span' => 'storm',
'cssClass' => 'col-md-6',
'tab' => 'Security Profile'
],
'phone' => [
'label' => 'Phone',
'type' => 'text',
'span' => 'storm',
'cssClass' => 'col-md-6',
'tab' => 'Security Profile'
],
]);
});
The new fields working fine, but I want to do some javascript functions before saving the form, I searched google and octobercms Javascrip API but no luck.
Please Advice,
Add this to your Plugin.php file: