Page 1 of 1

Passing information on a new form

Posted: 12 May 2014
by Katerina
Hi Dimitry,

Is the following possible with the related ites in SP Forms?

Manipulate the “Add” item links on the sub-grids / related data so that when we open a new form we can have information passed in the query string


Thanks

Re: Passing information on a new form

Posted: 13 May 2014
by Dmitry Kozlov
If you open a child new form in a dialog you can obtain a parent form fields via JavaScript. Example:

window.top.fd.field('Title').value()

You can find more detail in the following thread:
viewtopic.php?f=1&t=65

Re: Passing information on a new form

Posted: 19 Jun 2014
by Katerina
Hi Dimitry,


Thanks for your reply and appologies I didn't come back to you earlier. What do you mean by child form? I thaught that we could passed info in the same form as we do when we pass a query string from the usrl. Is that right?


Thanks

Re: Passing information on a new form

Posted: 19 Jun 2014
by Dmitry Kozlov
Actually, not. SharePoint truncates all unrecognized parameters from the query string when opens the specific form. Thus you should use the code from my previous message to obtain values from the parent form.

Re: Passing information on a new form

Posted: 19 Jun 2014
by Katerina
So do I need to have two new forms? One parent and one child?

Re: Passing information on a new form

Posted: 19 Jun 2014
by Dmitry Kozlov
Not sure I understood you. Could you describe the case in more detail?

Re: Passing information on a new form

Posted: 19 Jun 2014
by Katerina
Yes sure...

The user will start by filling the first form. After they submit it and is approved they need to fill an other form from the same list and I need to pass 2 fields from the previous form ( from the list item is created before) to the new form. The forms are under the same list as content types. How do I pass those infromation in the new list?

Hope this makes more sence.


Thanks

Re: Passing information on a new form

Posted: 19 Jun 2014
by Dmitry Kozlov
Ok, now I see, thanks. Here you should add JavaScript code into the new form which requests field values of the previously created item via JSOM. Our support team can help you with this task, it will take about 200-300 support minutes depending on the number of columns. If you're interested, please drop the detailed description of the task to support@spform.com.

Re: Passing information on a new form

Posted: 20 Jun 2014
by Katerina
If you iplement that for us, will it be something that we will be able to use in other scenarios or it will be something specific for that scenario?


Thanks

Re: Passing information on a new form

Posted: 23 Jun 2014
by Dmitry Kozlov
It will be the script for the specific scenario but you will be able to adapt it to similar scenarios.