I thing that in dialog API date-text field type is not working and when i use field type radio in server side the value of radio is transfered but in swl in controls[].val() not working
when i write the following code in button client before the controls[2].val() don`t return anything but in server side the $result['Who_called'] has the right value maybe is not the proper definition of radio field. Can anyone help me.
return ctrl.dialog( {
title: 'Customer Contact',
fields: [{
name: 'remark',
label: 'remarks',
type: 'textarea',
value: ''
},
{
name: 'action_to_do',
label: 'Action',
required: true,
type: 'lookup',
value: 'Υπενθύμηση',
options: ['Act','Reminder','Inform','Cancel']
},
{
name: 'Who_called',
label: 'Who Called',
required: true,
type: 'radio',
value: 'Customer',
options: ['Customer','Third','Our office','Salesman']
},
{
name: 'Date_of_apointement',
label: 'Date of apointement',
type: 'date',
datepicker: true,
value: ''
}],
ok: 'Save',
cancel: 'Cancel',
beforeOK: function( popup, controls ) {
swal('Contact Confirmation', 'Purpose of Communication: \n' + controls[0].val()+'\νCommunication started by :'+controls[2].val()+'\nAction to do : '+controls[1].val(), 'success');
}
});
when i write the following code in button client before the controls[2].val() don`t return anything but in server side the $result['Who_called'] has the right value maybe is not the proper definition of radio field. Can anyone help me.
return ctrl.dialog( {
title: 'Customer Contact',
fields: [{
name: 'remark',
label: 'remarks',
type: 'textarea',
value: ''
},
{
name: 'action_to_do',
label: 'Action',
required: true,
type: 'lookup',
value: 'Υπενθύμηση',
options: ['Act','Reminder','Inform','Cancel']
},
{
name: 'Who_called',
label: 'Who Called',
required: true,
type: 'radio',
value: 'Customer',
options: ['Customer','Third','Our office','Salesman']
},
{
name: 'Date_of_apointement',
label: 'Date of apointement',
type: 'date',
datepicker: true,
value: ''
}],
ok: 'Save',
cancel: 'Cancel',
beforeOK: function( popup, controls ) {
swal('Contact Confirmation', 'Purpose of Communication: \n' + controls[0].val()+'\νCommunication started by :'+controls[2].val()+'\nAction to do : '+controls[1].val(), 'success');
}
});