Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

PreSaveItem or PreSaveAction SP 2010 question

$
0
0

Hi all,
    I have a custom form and as you can see below i have succesfuly added  a value to the textbox when the form is loaded and i can see it.(Pre filled a textbox field)

And i would like to insert the value to a field

I have done this in SP 2007 so many times and it works using PreSaveAction.in SP 2010 is
PreSaveAction or PreSaveItem ??
Basically i'm having problem with the PreSaveItem as when i submit my form it doesn't get to insert the value but it redirects.

<input type="button" value="Submit" name="Submit" onclick="if (!PreSaveItem()) return false;{ddwrt:GenFireServerEvent('__commit;__redirect={Submitted.aspx}')}" />

<script type="text/javascript"> function PreSaveItem(){ $("input[Title='Location']").attr("disabled",""); //var t = $("input[Title='Location']").attr("disabled",""); alert("t"); return true; }</script>

Thanks

Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>