Page 1 of 1
Pass parameter to new form
Posted: 08 Aug 2014
by stieland
I have a request list and form that is working fine. What I want to do is on the home page of my site, use the promoted links webpart (or really any UI that shows images with links behind them) and when they click the image the new form for my request list shows up, but I want to preselect the request type (based on what image was clicked)
Re: Pass parameter to new form
Posted: 10 Aug 2014
by Dmitry Kozlov
Hello,
You can wrap each image into <a href="New form URL"></a> tag and define an individual URL with a custom parameter for each link e.g.
/Lists/ListName/fd_Item_New.aspx?image=5
Re: Pass parameter to new form
Posted: 11 Aug 2014
by stieland
And how do I get that querystring on the new form? Does it change if it is opened as a popup versus the full page (and can I tell)?
Re: Pass parameter to new form
Posted: 12 Aug 2014
by Dmitry Kozlov
Hello,
You can get an additional parameter via JavaScript in a full page mode as well as in a dialog following way:
GetUrlKeyValue('name of a query param')