How to write the custom validation using jQuery in custom HTML form?
I have created a custom html form which has fields dropdown, single line of text, people picker,date, etc. and custom submit button.
But, I am stuck at how to perform custom validation using jsom/ jquery etc.?
- Can i use spservices inside jsom ?
- Can i use presaveaction on click of the custom submit button?
- Also,i want to redirect the browser to a editForm.aspx page and need to populate with the newly created ID as a query string.
I have just started learning jsom coding in SPO(basically i am a SSOM guy !!), so any help is appreciated for guiding me.
function bindButtonClick() {
$("#btnSubmit").on("click", function () {
addListItem();
});
}
Though I have written the above code , I am not able to get where to write custom validation, and if its success, how to redirect and fetch the last generatedID.