Pass parameter to new form
Posted by stieland - Aug 8 ’14 at 09:36
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)
-
Dmitry KozlovAdminMember for: 10 years 4 days
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
-
stielandMemberMember for: 10 years 3 months 13 days
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)?
-
Dmitry KozlovAdminMember for: 10 years 4 days
[#2]: 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')