Add edit button on display form
Hi,
Add the toolbar and then add the following JS:
Add the toolbar and then add the following JS:
Code: Select all
$('td.ms-toolbar > span > table > tbody > tr > td.ms-toolbar:not(:eq(0))').css('display', 'none');
$('td.ms-toolbar > span > table > tbody > tr > td.ms-separator').css('display', 'none');
1. Click 'Buttons' in FD
2. Add a button beside 'Save'
3. Add onclick code to it:
Make sure the URL is correct.
2. Add a button beside 'Save'
3. Add onclick code to it:
Code: Select all
window.location.href = 'https://example.com/Lists/b/fd_Item_EditForm.aspx?ID=' + GetUrlKeyValue('ID');
Hi Guys,
Here is my list: https://sharepoint domain name.com/sites/Site1/SubSite1/Lists/List1/AllItems.aspx
when I modify the following : window.location.href = 'https://ex a mple.com/Lists/b/fd_Item_EditForm.aspx?ID=' + GetUrlKeyValue('ID');
to
window.location.href = 'https://sharepoint domain name.com/sites/Site1/SubSite1/Lists/List1/fd_Item_EditForm.aspx?ID=' + GetUrlKeyValue('ID');
and then add it to onClick in FD, I get 404 error.
What am I doing wrong? Do I need to provide the ID of the list too?
Thanks
Here is my list: https://sharepoint domain name.com/sites/Site1/SubSite1/Lists/List1/AllItems.aspx
when I modify the following : window.location.href = 'https://ex a mple.com/Lists/b/fd_Item_EditForm.aspx?ID=' + GetUrlKeyValue('ID');
to
window.location.href = 'https://sharepoint domain name.com/sites/Site1/SubSite1/Lists/List1/fd_Item_EditForm.aspx?ID=' + GetUrlKeyValue('ID');
and then add it to onClick in FD, I get 404 error.
What am I doing wrong? Do I need to provide the ID of the list too?
Thanks
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
Make sure that 'fd_Item_EditForm.aspx' form exists: just open the edit form of the List1 from a view and compare its URL with the URL of 404 page.
Make sure that 'fd_Item_EditForm.aspx' form exists: just open the edit form of the List1 from a view and compare its URL with the URL of 404 page.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 4 guests