How can I Implement the following : I Created Custom Edit Form for my custom List with tow field ( title , checkedIn ), when you click save button i want to show alert message (yes/No) , if You choose Yes , then Set Value of checkedIn Field to True , after that save the form data


PreSaveAction function allows to override functionality when Save button is clicked. PreSaveAction function executes the code written for validation on click of Save button. Place the following function:

function PreSaveAction() { if (confirm('Yes/No')) { $('input[title="checkedIn "]').val("True"); } }

  • i want to redirect to list page after clicking yes , and the item get change – Taher Esmail May 11 '16 at 19:51
  • i did this : <input type="button" value="Save" name="btnSave" onclick="if (!PreSaveAction()) return false; {ddwrt:GenFireServerEvent('__commit;__redirect={home.aspx}')}" /> <script type="text/javascript"> function PreSaveAction() { if (confirm('Yes/No')) { $('input[title="checkedIn"]').val("True"); } } </script> – Taher Esmail May 11 '16 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.