0

I have a jquery control that i developed with JSLink. If I save the form the contents of the list item disappears. So I have created a PreSaveAction function in jquery that at the moment copies content from one column to another (this bit works), but it does not save , so it runs the function but it does not save afterwards (and go back the list itself. I have added Return true at the end of the function and it now says "The server was unable to save the form at this time. Please try again" here is my sample code :

<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.2.min.js" type="text/javascript">
</script>
<script type="text/javascript"> 
$(document).ready(function(){
   // Here i added code for other functionalities
});

     function PreSaveAction()
{
    var empNum = $('input[title="Title Required Field"]').val();
    //alert(empNum);
    $("input[title='TitleA']").val(empNum);
    return true;


}
</script>
  • 1
    What have you done using JSLink exactly? Can you please add the code you used in JSLink? It will be easier for us to answer your question by looking at the code. – Ganesh Sanap Feb 29 at 12:09
  • Concur with @Ganesh, there is nothing syntactically wrong with your PreSaveAction function, but we can't see how this fits into your jslink pipeline. – willman Mar 1 at 22:38
  • My JSlink just makes a multi choice lookup field pretty - quite happy to show you.. but the problem is that if I put validation in another column then the column goes blank so I need something in PreSaveAction to get the data and then when the return true executes it brings the data back into the column again. – Jason Hough Mar 2 at 8:27

Your Answer

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

Browse other questions tagged or ask your own question.