Use SPFx to modify the 'edit form' from a modern document library - sharepoint-online

Right now I am learning SPFx for SharePoint Online. My customer wants to modify the 'edit form' of a document library in a way that if a user starts typing keywords into the Summary field, predifined keywords are displayed which share the same letters in the beginning.
I was wondering if I can use SPFx to geht this job done
I thought maybe I can bind the ID of the summary textbox to a javascript file which then does the heavy lifting.
Thank you for your help

Yes, you can create a edit form with SPFx, however, you can't replace the default edit form with the one you created with SPFx.
The only way to replace the default edit form is using PowerApps or InfoPath to create a new form, however, I don't think that we can achieve the goal with these two solution.
Maybe you should create your own list web part, and implement the edit button of the web part, such that the web part will show your edit form with the auto completion.

Related

Quick Edit View Substitute in Modern?

I have been attempting to have a section on a Sharepoint main page where anyone with modify access to that document library can easily modify the document metadata. Specifically there is a Status column that directs which stage of a review process a document is in and where it is displayed on the site.
I'm trying to make this as painless as possible for the end users. Right now the proposed process is to click the Quick Edit button, modify the column via a dropdown, and then click Exit quick edit to save the changes. Ideally, this document library web part would have a view set up that allowed access to the dropdown without having to go into quick edit, but it appears that the modern view of Sharepoint Online does not allow for the datasheet view to work correctly when used within the web part.
Is there another option to make this editing simpler?
Thanks!

How do we build custom forms in a sharepoint solution?

Sharepoint designer is not allowed. The forms must contain fields with references to list items but may contain custom asp controls as well, which we whish to use later in the process.
The target isn't always to replace the original new, edit and display forms but to create extra forms too. Currently, we create custom forms by copying the existing base forms and edit them by hidding the zonetemplates and add our custom fields below. It aint the most elegant way, but at the moment the best result we have so far.
I would like any suggestions.
If developer tools ar not allowed, you might want to consider Infopath.
Also, SharePoint comes with a Form Web Part that you could include in your page.

is there a way to generate input fields in ascx from sharepoint 2010 list

I'm developing a custom aspx form for a SharePoint list in Visual Studio, basically to add a new item to the list (that's a business requirement).
I'm wondering if there's a way to generate input controls from the list in design time just like we used to do from a database in ASP.NET.
If you're doing a straight match from the SP List to web form take a look at the SharePoint Form Generator web part
Just add the web part to the page and identify which list to build a form for.
To answer your question, yes there is a way to generate the fields. What you are looking for is the Sharepoint FormField class in the webccontrols namespace.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.formfield.aspx
Here is an article explaining the entire field controls heirarchy for sharepoint. http://msdn.microsoft.com/en-us/library/aa543321.aspx
Generally this is used inside an ASCX control, let me know if you need any more explanation.
I discovered T4, that's exactly what I'm looking for,,, I used it to generate input controls in design time... I faced some problems accessing SharePoint from T4 templates but were resolved using The Client Object model :)

Customizing the "Upload Document" Form in SharePoint 2010 based on Content type

When you click on the name of a library, go to the documents tab, click on "upload document".
An upload form appears that is created using the dialog framework. The 1st choice on the form is content type.
I need to instead launch a custom infopath form that will allow me to dynamically populate a 2nd dropdown box on the page after the content type (still 1st) dropdown is populated.
I feel like I'm really grasping at straws here. At this point I could use a reference to a relevant section of a book, a link to a relevant post or even just the correct terms to put into a google search. What is the correct name for that form?
I found this which seems to teach you how to insert a customized aspx form: http://microsoftsharepointandbeyond.blogspot.com/2009/10/customizing-ootb-sharepoint-forms.html
But I'd really like one that uses Infopath instead.
Any advice or direction you can provide would be greatly appreciated.
I'm pretty sure doing this with infopath is not possible, the forms are bound to a (codebehind) class in the SharePoint object model, which handles the actual upload (add to list, set field values etc. etc.).
A custom aspx page would be possible though, exactly as the post you mentioned descibes. I agree with the post's author that an HttpModule would be best, because:
editing the OOTB upload.aspx in the 14 hive would make your environment unsupported (i.e. if anything brakes, MS will have you revert your farm to a supported state before they come and help you.
The next time you install an update for sharepoint, your changes could be overwritten.

Sharepoint 2010 search: How to modify search query before submit (programmatically?)

I'm making a custom search box Web Part, similar to the OOTB Web Part from SharePoint
(SearchBoxEx class).
I'm interested in modifying the search query with additional text before it is submitted, based on a custom checkbox added on the Web Part.
Any help on how I can achieve this?
UPDATE:
I've used the AppendToQuery and AppQueryTerms properties, but this will rewrite the text in the search box as well. I'm interested in passing the values "in the background", maybe as an extra parameter. Point is that the query modification should happen without the user seeing it explicitly.
In the core result webpart there is a property where you can append text to the query and you will not see that in the textbox.
Best,
Bibhu
I when I had to customize People Search, I opted to roll my own web part and just called Response.Transfer to the Results.aspx and appended query string parameters to the URL. This wasn't the most elegant solution, but it was a quick way to modify the query "behind the scenes."
I'm sure you could develop an application page and set it as the Search Box web part's Results page. Put your custom logic in the page_load and then transfer (or do a form POST) to the actual results.aspx page.
I'm now developing an Extension of SearchBoxEx myself, and I'm currently trying to figure out how to call the base method that submits the query too. This blog shows how to call the internal CreateAdvanceSearchLink method of the SearchBoxEx class: http://pholpar.wordpress.com/category/search/

Resources