newForm to DisplayFOrm

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Malboro
Posts: 28
Joined: Wed Mar 09, 2016

04 Apr 2016

hi,

Affer creation of new element(NewForm pop-up) i want to redirect to displayForm(pop-up) but i don't have id

Can you help me please?

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

04 Apr 2016

Yes, please follow this how-to: http://spform.com/forms-designer- ... sharepoint

You will, of course, need to use the display form's name instead of the edit form's name in the code.

Malboro
Posts: 28
Joined: Wed Mar 09, 2016

04 Apr 2016

i try this but don't work

my code:

fd.onsubmit(function() {
fd.field('ID_Affire').readonly(false);

fd.field('N_Comm_Interne').readonly(false);
fd.field('N_Affaire').readonly(false);
fd.field('Date_Commande').readonly(false);
fd.field('Soci_x00e9_t_x00e9_').readonly(false);
var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', 'fd_Élément_DisplayForm.aspx?ID=');
fd.sourceFormParam(uri);

return true;

});

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

04 Apr 2016

What constitutes as 'not working'? This code will work unless you either have an error in your code - check the console, the name of the form is incorrect or maybe some other problem coming from somewhere else (maybe you've not added this code to the correct form).

1. Check the code is executing via alert messages
2. Check that the name of the form is correct

Malboro
Posts: 28
Joined: Wed Mar 09, 2016

04 Apr 2016

alert of uri link:

Image

Image

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

04 Apr 2016

That's not how you check the name of the form. See the small screenshot at the bottom of the article.

Malboro
Posts: 28
Joined: Wed Mar 09, 2016

04 Apr 2016

I have list A and list B.

On displayform of list A I created related Items(list B)

when i create new item (listB) i want to open pop-up of displayform(listB) on displayform(listA).

i check name of display form on sharepoint designer

link of alert(uri)

http://postimg.org/image/euzvwjc0n/

link of scrrenshot form of list B in sharepoint designer

http://postimg.org/image/lakbnzxxf/

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

05 Apr 2016

Hi,

You cannot use FDRedirectWithID parameter in dialogs because a dialog closes right after creating a new item. Why do you need to display just created item in a dialog? It will appear in the list of related items.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests