Tag Info

Hot answers tagged

5

I believe that the EditForm.aspx you are referring to (Workflow > Open task list > Forms > EditForm.aspx) is for the standard tasks in the task list. Workflow tasks, though they are in the same list, operate a little differently. Firstly, what type of workflow is it? Browser SharePoint Designer Visual studio Workflow tasks created by the approval ...


5

This is the way it works for me: <tr> <td valign="top" class="ms-formlabel"><nobr>Created by</nobr></td> <td valign="top" class="ms-formbody"> <SharePoint:CreatedModifiedInfo ControlMode="Display" runat="server"> <CustomTemplate> <SharePoint:FormField FieldName="Author" ...


5

You can do this by using the SPUtility.js library As example I have created a simple list with: Title (simple text). Country (ChoiceField) [Tunisia, Switzerland, Canada, France, Other] – Other is the default value. City (Simple text). By default the City field is hidden if the Country field value is Other. Every list has three default forms to add, ...


4

Have you considered email enabled libraries? Since 90% of your users do not have access, you should consider that to get the information or form into SharePoint. If you use InfoPath, you could possibly still do this with an email distributed form, then the completed form would be an attachment and could be emailed into the library.


4

If you want to customize a list new\edit\display form there is a couple of ways you can do it. I mean programming ways (not InfoPath). All this methods related to creating custom rendering templates. Every list form has its own rendering template, for list its a "ListForm", for document library "DocumentLibraryForm". All this templates (and otheres) listed ...


4

The below code access current user's department and manager from AD: SPSite _site = SPContext.Current.Site; ServerContext serverContext = ServerContext.GetContext(_site); UserProfileManager myUserProfile = new UserProfileManager(serverContext); UserProfile currentUserProfile = myUserProfile ...


3

You should not have to worry about how the dialog launches, it should happen seamlessly from the ribbon new button no matter the content type. I would check two things: Is the site operating with v4 (sp2010) visual styles? Is the list configured to show forms in a dialog. List Settings -> Advanced -> Dialogs -> Launch forms in a dialog? -> Yes The list ...


3

Okay, so after some debugging I found the problem and, even better, the solution. The OK button on the attach form runs a script called OKAttach(), which features a line towards the end that reads: document.getElementById("idAttachmentsRow").style.display=""; All well and good, except that at some point SharePoint sneaked behind your back and did this to ...


3

For 2010: Add this to the page in a content editor webpart, or add to the page layout <script language="javascript" type="text/javascript"> function DoAction() { var clientContext = new SP.ClientContext.get_current(); var web = clientContext.get_web(); var user = web.get_currentUser(); clientContext.load(user); ...


3

You're probably looking for InputFormControl. It should be placed inside Template_Control tag of InputFormSection control. In header section of your custom user control, you will need to add the following code: <%@ Register TagPrefix="wssuc" TagName="InputFormSection" Src="~/_controltemplates/InputFormSection.ascx" %> <%@ Register ...


3

Robert... This time, dont use relative URLs, just add absolute URL (the entrie path of the page) eg. <input type="button" value="Add List Item" name="BtnSave" onlick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect{http://<server>/sites/<site name>/Pages/<page name>.aspx}')}" /> It should work, cheers


3

The best practice approach is to make copies of each of the forms then edit the copies. Then on the custom forms you can add in custom list form web parts and style and change until your heart's content. With SharePoint 2010, you can also utilize InfoPath to customize the forms pretty easily. Here (from MSDN) is a nice excercise on that process.


3

This looks like good place to start: Custom SharePoint List Forms It will give you some insight on what can be done. Replacing default forms with custom application pages is briefly explained at bottom of the article. I am very fond of this technique but I never come across some really good article that explains everything.


3

Can't resist mentioning, that the "Open" button on the ribbon and the link on the folder title are still there, and they really do the same what you want, with only one click cost. Anyway, certainly there are several approaches to achieve what you want. Approach 1: iframe I believe the most simple way would be what I call "dirty js hack"... It is NOT ...


3

If you have followed the steps correctly, it should work. Make sure that, once you have created the application page, the solution explorer structure looks like this - Deploying this will create the folder and files for you inside the "Layouts" folder.


3

A couple of issues: The Id part of SPFieldLookupValue should be the Id of the listitem in the list with groups (Groups?) not the Id of the item you're updating. So ideally you setup the ddlGroups with Text=Text from Groups and Value=Id of corresponding listitem in Groups. The code to populate the ddlGroups should be changed to: foreach (SPListItem ...


3

Another way to do it (if "Open with Explorer" works for you) In the form library, on the ribbon navigate under "Library Tools" to the "Library" tab. In the "Connect & Export" section find "Open with Explorer". Depending on your screen resolution the full label may not be displayed; the icon looks like a folder with an arrow pointing to a computer ...


2

This is a bit tricky. You can edit the View page for a task pretty easily (that is the first one that comes up when you click on a task list). When you open it, you see some generic labels and text boxes. The page is actually built from an enumeration at run time. You can use the Insert ribbon at the top to drop your own Data View Web Part under the generic ...


2

It sounds as though you broke something in the page that is needed for the ribbon, e.g. JavaScript reference or a control. Not a very helpful answer, I know! Not much more we can suggest with the information given. I would go back to the original EditForm.aspx and make simple incremental changes until either you get what you want or the ribbon dissapears, ...


2

You could do this fairly easily using SPUtility.js (full disclosure this is a library I maintain). You would probably put it all inside a Content Editor Web Part on the NewForm.aspx. You would have your "advanced mode" link that would toggle showing/hiding the fields. Example using SPUtility.js: SPUtility.GetSPField('Field A').Hide(); // or Show() after ...


2

The only way to do that would be to use javascript/jQuery. The code that you posted runs server side and you have no control over the output. You'll have to do some front-end manipulation after the page has been rendered. Hopefully, SharePoint gives you a good hook onto these elements, otherwise, it could be rather difficult. Here's some jQuery to help ...


2

It looks like InfoPath (at least in 2007 version) is not supporting images in Rich text box control: http://office.microsoft.com/en-us/infopath-help/insert-a-rich-text-box-HP010080917.aspx#BM3 Quote from Compatibility considerations: You can enable linked pictures for a rich text box in a browser-compatible form template. However, embedded pictures ...


2

This article describes doing it "the advanced way" in Visual Studio, which gives most control: http://www.codeproject.com/Articles/195348/SharePoint-2010-State-Machine-Workflows-with-Custo It is not 100% intuitive, but right elements are there.


2

Looks like it is a Microsoft bug, and nothing can be done about this :( Second AttachmentsField control on the page is always displaying this text: ["Attachments" column value] I found that inside both controls' HTML, where is a table with static id: <table id="idAttachmentsTable" border="0" cellSpacing="0" cellPadding="0"> So, this could be ...


2

Looking at a custom EditForm.aspx page in Sharepoint Designer, the form code looks like this: <tr id="idAttachmentsRow"> <td nowrap="true" valign="top" class="ms-formlabel" width="20%"> <SharePoint:FieldLabel ControlMode="Edit" FieldName="Attachments" runat="server"/> </td> <td valign="top" class="ms-formbody" width="80%"> ...


2

I had a glance in the AttachmentsField.UpdateFieldValueInItem call to see where it gets the list of files from for its own use. It appears to use this property: AttachmentsField.Context.Request.Files, the documentation for which is here: HttpRequest.Files Edit: I suddenly realised that you may be trying to access the control in order to save the ...


2

How about SharePoint 2010: Customize out of the box Application Pages (AccessDenied, Confirmation, Error, Login, RequestAccess, Signout, WebDeleted )?


2

The deployment and implementation included in Wictor's article is only suitable for 2010 due to how the solution package would be deployed and how the custom web part is referenced in the custom page. In 2010 sandboxed webparts are referenced using the SPUserCodeWebPart wrapper which does not exist in 2007. In 2007, you can reference the web part directly ...


2

Maybe you can consider alternative approach for your solution. You can add additional library designated for storing exe files. Then you can establish link between list and library by using additional url field on list to store direct link to exe in library (if you only have one-to-one relations) or you can use lookup field in library to establish ...


2

It is not advisable to start playing with the ribbon like this as it will come back to haunt you. Rather than hiding the Ribbon and adding your own buttons, why don't you simply create a feature to add your own buttons to the current Ribbon? Here's a great article to get you started.



Only top voted, non community-wiki answers of a minimum length are eligible