PreFill Form Field
Posted: 26 May 2013
I have two lists, "Pipeline" and "Notes". I am following the blog post http://spform.com/forms-designer- ... ist-part-2
I want to prefill the "Pipeline" field in the New Item Notes form with the "Title" field from the "Pipeline" form.
In the Parent (Pipeline) Edit form I enter the following in the js-editor:
In the (Notes) New Item Form, I enter the following in the js-editor:
I see the Title ID in the url when I open the Notes NewItem Form.
But the Title ID in the url is populating the "Title" field in the Notes New Item Form.
Am I doing something wrong?
I want to prefill the "Pipeline" field in the New Item Notes form with the "Title" field from the "Pipeline" form.
In the Parent (Pipeline) Edit form I enter the following in the js-editor:
Code: Select all
// getting query string hash
var queryString = SP.ScriptHelpers.getDocumentQueryPairs();
// adding get-parameter 'order' into new item link
newItem.attr('onclick',
'NewItem2(event, "' + newItem.attr('href') + '&Title=' + queryString['ID'] + '"); return false;')
Code: Select all
// getting query string hash
var queryString = SP.ScriptHelpers.getDocumentQueryPairs();
// fill order number
fd.field('Pipeline').control().value(queryString['Title']);
But the Title ID in the url is populating the "Title" field in the Notes New Item Form.
Am I doing something wrong?