0

I have a list of projects with a related list of fields and that page works as intended. I made a second view of that list that just shows a subsection of that list. When I click the edit button on the second view I'd like to have an edit form that only has the fields from the parsed down view. I made a 2nd edit form that has that data but I can't find where I can change the URL for the edit button.

The item in red, how do I change that URL

0

If you want two separate edit forms you'll need to create a custom way to access the second editform2.aspx. There's no direct way to change the "built in" button to navigate to a different edit form per view.

Here's what I would do...

  1. Add a script editor to the second view (that uses the alternate edit form)
  2. Add javascript that effectively "finds" the edit buttons in the current view and replaces the onclick/href value to use editform2.aspx instead of the default.

If you need help with that there's plenty of resource for jquery around. It's as simple as (pseudo code):

$('find your buttons').onclick(navigate to editform2.aspx)

EDIT:

I should also mention that if you do something that causes a "postback" on the list view that would re-render it (sort/filter/page) it will reset the buttons. So you'll need to tap into the "after ajax" event using the following:

Sys.Application.add_load(function() { rebind your buttons here again });
0

you don't need to modify the URL of the edit or new item

what you have to do is to create an action rule to redirect the users to a different infopath edit view.

you have to do this during the load

  • Can you expand on this a little bit? I feel like I'm close to understanding but missing a piece. – Robert Sullivan Apr 30 '18 at 23:58
  • I am using sharepoint lists and views to load the data, i'm not using repeating tables on InfoPath. That would be one way of going about it, but I was hoping to maintain the same styling throughout the site. – Robert Sullivan May 1 '18 at 0:19
  • the only way you can have different forms for a new item is by using content types. depending on the selected content type the user will see the different fields – Mike May 1 '18 at 1:07
0

Yes, You can do this using SharePoint Designer, Open the site in Sharepoint Designer and Navigate to the list from the left hand navigation.

Then On the List, you see the editForm.aspx where you can modify the URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.