Add new from Related Items
On the initial form to hijack the add new:
var cat = fd.field('Catagory').control().value();
var newFormUrl = '/sites/resources/Lists/Activity%20Updates/fd_Item_NewForm.aspx?Catagory=' + cat;
var uri = new URI(newFormUrl);
var url = uri.getLastPathSegment();
g_useDialogAlwaysList.push(url.toLowerCase());
$('.ms-list-addnew a').eq(0).attr('onclick', 'NewItem2(event, "' + newFormUrl + '");return false;');
On the new form to get the parameter:
var cat = GetUrlKeyValue("Catagory");
alert(cat);
I'm trying to pass additional parameters to the new form but getting nothing. I sure this worked in the past, maybe I'm wrong?
var cat = fd.field('Catagory').control().value();
var newFormUrl = '/sites/resources/Lists/Activity%20Updates/fd_Item_NewForm.aspx?Catagory=' + cat;
var uri = new URI(newFormUrl);
var url = uri.getLastPathSegment();
g_useDialogAlwaysList.push(url.toLowerCase());
$('.ms-list-addnew a').eq(0).attr('onclick', 'NewItem2(event, "' + newFormUrl + '");return false;');
On the new form to get the parameter:
var cat = GetUrlKeyValue("Catagory");
alert(cat);
I'm trying to pass additional parameters to the new form but getting nothing. I sure this worked in the past, maybe I'm wrong?
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Please, try JavaScript from the following comment:
viewtopic.php?f=1&t=65#p211
viewtopic.php?f=1&t=65#p211
-
- Information
-
Who is online
Users browsing this forum: No registered users and 21 guests