show_error improvement
Posted: 2018-10-09 00:25
Hello to you all,
The show_error function used in field content validation javascript is great.
However, the title of the modal window is sometimes "cryptic" especially if the name of the database name of the field looks like "sta_form_start_date". Since the caption of the field is nicer "Student Class Start Date", I wonder if it is possible to display the field caption instead of the field name in the show_error title.
I think that ergonomy of the tool would be greatly improved for end users.
I did not succeed in doing this (where is the list of methods and functions for fields?)
=====================================
function show_error(field, msg){
modal_window({
message: '<div class="alert alert-danger">' + msg + '</div>',
title: 'Error in ' + field,
close: function(){
$j('#' + field).focus();
$j('#' + field).parents('.form-group').addClass('has-error');
}
});
================================
Best regards,
RP
The show_error function used in field content validation javascript is great.
However, the title of the modal window is sometimes "cryptic" especially if the name of the database name of the field looks like "sta_form_start_date". Since the caption of the field is nicer "Student Class Start Date", I wonder if it is possible to display the field caption instead of the field name in the show_error title.
I think that ergonomy of the tool would be greatly improved for end users.
I did not succeed in doing this (where is the list of methods and functions for fields?)
=====================================
function show_error(field, msg){
modal_window({
message: '<div class="alert alert-danger">' + msg + '</div>',
title: 'Error in ' + field,
close: function(){
$j('#' + field).focus();
$j('#' + field).parents('.form-group').addClass('has-error');
}
});
================================
Best regards,
RP