I have tried to make the data input form but when an empty input form can still be saved when in press save and how when the input is empty then it will not be save.
this is my form code: https://jsfiddle.net/bubyj5xj/
$(".btn_save_news_item").button().click(function() {
var form = $("#form_news_item");
var json = ConvertFormToJSON(form);
$.ajax({
type: "POST",
contentType: "application/json",
url: BASE_URL + "setting/news",
data: JSON.stringify(json),
success: function(response) {
console.log(response);
resetForm();
reloadGrid();
}
});
});