Pass parameter to new form

rss

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 Kozlov
    Dmitry Kozlov
    Admin
    Member for: 10 years 11 days
    #1 by Dmitry Kozlov Aug 10 ’14 at 05:14

    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

  • stieland
    Member
    Member for: 10 years 3 months 19 days
    #2 by stieland Aug 11 ’14 at 02:58

    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 Kozlov
    Dmitry Kozlov
    Admin
    Member for: 10 years 11 days
    #3 by Dmitry Kozlov Aug 12 ’14 at 03:26

    [#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')

     

Displaying 1 to 3 of 3 messages