Wednesday, 14 March 2012

JQuery: SharePoint field for editform.aspx

Setting fields via JQuery route.



<script src="http://code.jquery.com/jquery-latest.js"></script>


<script type="text/javascript">


$(document).ready(function () {

$("#ctl00_m_g_1596db13_5dea_457d_9096_ec6073656ee4_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_TextField").val("hello");
$('input[title="Name"]').val('just testing');

});</script>



How it looks, note the HTML for the input fields.

No comments:

Post a Comment