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,
$('#hiddenField').val(JSON.stringify(valueOfExtendedField));and after the execution of the script it will submit the formm - Ya BashahiddenFieldvalue, I understand you want tocreate jsonand need to use it inbackendif you share how you intend to use this details in backend then I can help you : for ex like:storing in db table etc..- Hardik Satasiya