Tag Info

Hot answers tagged

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, ...


2

Create custom edit form using SPD so that DataFormWebPart is generated: Go to this form and edit it. Find the following code: <SharePoint:SaveButton runat="server" ControlMode="Edit" id="savebutton1"/> Replace it with the following code: <input type="button" value="Save" onclick="javascript: ...


2

How do you arrive at the assumption in point 1.? List forms do have rich text and enhanced rich text and support them in SharePoint native forms. If you don't want to use InfoPath, you can create forms in SharePoint Designer. As a general tip: Don't customize the out of the box forms. Instead create a new form for "New", "Display", "Edit" and style the ...


2

I know it's too late to respond but I just wanna share here for later reference, for guys who have no idea how to customize the form for External List by using Visual Studio. I had to google a lot to customize the (Display, Edit, New) forms for External List but there was nothing which could help me to fully customize and replace default forms by ...


2

I can tell you where its going wrong! its here: cs.RegisterClientScriptInclude(this.GetType(), "jq", "/_layouts/js/jquery.js"); cs.RegisterClientScriptInclude(this.GetType(), "custom", "/_layouts/js/custom.js"); how do i know? well its simple! i presum as you said you have many instances of custom.js now this is where it gets messy, to put it ...


2

First, Safari 6.x isn't a browser supported by SP 2007: Web Browser support for SharePoint 2007 with SP2 Second, if it is a custom form we'd need more detail to be able to help you. Perhaps you would be best in contacting the company or person who created the form for you.


2

You can create two different ContentTypes <ContentType ID="CTA_ID" Name="ContentTypeA" Version="0" Overwrite="TRUE"> <FieldRefs> <FieldRef ID="{Field_ID}" Name="MyField" Required="True"/> </FieldRefs> </ContentType> <ContentType ID="CTB_ID" Name="ContentTypeB" Version="0" Overwrite="TRUE"> ...


2

If you're new to SharePoint development, I can understand your struggling to understand its development model. Responding to UI events by "calling C# code" is possible only with custom webparts or application pages, as no inline-code is allowed in SharePoint Designer by default. You should really first try to determine if what you think will require C# code ...


2

In SharePoint PreSaveItem function is called when onClick event handler is fired for Save button in List Forms. PreSaveItem function: function PreSaveItem() { if ("function"==typeof(PreSaveAction)) { return PreSaveAction(); } return true; } PreSaveAction function from another hand, allows to override behavior for a Save button. It ...


1

How to find ContentTypeChoice control in SharePoint:ChangeContentType control: DropDownList dropDownList = (DropDownList) control.TemplateContainer.FindControl("ContentTypeChoice");


1

How about relying on the Source querystring instead? Here is a crude example of what I'm getting at: (function(w) { w.PreSaveAction = function() { return w.confirm('Have you been working on it?'); }; var source = '/sites/dev/SitePages/Home%20Page.aspx'; var loc = w.location; var s = loc.search; if (s.indexOf(source) >= 0) return; ...


1

Cant you just add an extra column where it asks the user to enter a text/number/character of any type, and then add an event handler on ItemAdding that checks if the specific field is matching what you asks for and then let the event continue, else cancels the event? Or do the same in your custom webpart with a regular expression. Regular Expressions ...


1

Since you are coming from Windows Forms environment, I will tell you that Visual Studio way is the bestest way (AFAIK).. Since in Windows Forms you have Forms objects, similarly in SharePoint if you create Visual Web Parts; you have ascx files of the User Controls on which you can drag and drop controls and also you can write Page Events or Control Events ...


1

Have a look here on MSDN. I think FormUrls can be of help in your case. This schema enables you to specify client-side redirects to different Display, Edit, and New form pages for items of this content type.


1

It depends on what you want to do. For example the SPServices jQuery library by Marc Anderson, downloadable from CodePlex, has a multitude of commands and manipulations for forms. It's not done with server side code, but purely with jQuery. Another option, if you have the Enterprise license, is to use InfoPath to customise list forms. InfoPath list forms ...


1

I was having this similar issue with SharePoint/InfoPath 2010 and the people picker field throwing "There was an error with the callback" when the field would validate. It would occur when the people picker was on a secondary view and I switched to it to make a change. This sounded very similar to what was happening here and I would assume that the same ...


1

You don't really have custom permissions for the basic list forms (new/edit/view). Those permissions are driven by the base list permissions, ie, 'New' is restricted to only those that can add items to the list. What you do have is the notion of a 'default' form for each action. If you create a custom form that you want to always use, you must set it as ...


1

jQuery & SPServices (client side) are my preferred tools for this type of task: thisUserAccount = $().SPServices.SPGetCurrentUser({fieldName: "Name"}); // Set the [PeopleColName] to be the Logged in user $().SPFindPeoplePicker({ peoplePickerDisplayName: "PeopleColName", valueToSet: thisUserAccount });


1

I have had this problem, and here are the steps I've taken to resolve it. I have no idea if all these steps are necessary, and feedback is welcome. Check out DispForm.aspx Ignore the Design view and go straight to the code. Cut and paste the web part code to where you want it. This is usually enough. (Don't forget to check it back in!) Escalating the ...


1

Found an answer to your question in this blog. Author of this blog says what you are asking is possible. In his words You have created a custom list through the browser and now you just need to change the forms displayed by default or you just want to do that programmatically without editing the list content type definition!?! That’s possible, just ...


1

Within SPD, I did the following. First, I didn't edit the existing new item file. I created a new one. Then I did advance edit. Deleted the text from a field that I didn't need in the new item form. Replaced the verbiage with Attach File. Then, where the field was, I deleted the checkbox in my case and drag and dropped an .net file upload control. ...


1

If your SharePoint has SMTP configured you can use following helper function to send email: You can pass SPWeb object using SPContext.Current.Web public static void SendEmail(SPWeb web, string mailTo, string mailSub, ref string mailMsg) { var header = new StringDictionary(); header.Add("to", mailTo); header.Add("subject", mailSub); ...


1

View this add-on(SharePoint Default Value Add-On), which inject a "default value" section into "Create Column" dialog. Set "Current User" (User who is adding item) as default value.


1

Yes - you should be able to check this if you already have the proper access. You can start with a personal view if you don't want other to see it (or use a listview webpart on a page with a custom view if you want to control access that way). You have a variety of options but they depend on the configuration of the farm. Custom listview (targeted at ...


1

Yes, you could create custom page for your lists and libraries. Just simply crate a ASPX page in your solution, and create a class, which will inherits from base type of your list/library (ex. NewDocSet for page that created a new document set). For doing something when an "OK" button on form pressed, just add a method to that class: new public void ...


1

You're missing the closing quote for the "concat" (after the closing curly bracket of mypage.aspx) : <a href="javascript: if(DeleteItemConfirmation()) {ddwrt:GenFireServerEvent(concat('__cancel;__delete{',$KeyField,'=',$KeyValue,'};__commit;__redirect={mypage.aspx}'))};" > <img border="0" src="someimage.pgn" alt="delete" width="20" height="20"/> ...


1

It depends what you are trying to achieve... If you want to completely customise the list view page, or add content to it, you could modify the collection of web parts on that page with C# code. This would involve: Creating a feature receiver within your solution that modifies the list view page web part collection (using SPWebPartManager or ...


1

High level steps for an InfoPath browser form: You don't need any fields in the main data source, but you need a secondary data source to the list, including all the fields you want to show in the form. You will need code to get a URL parameter into the InfoPath form. There is a plug-in for InfoPath from Qdabra Software called "qRules" that loads DLL's ...


1

This is certainly more of a hack than a real solution, but it is what I do because I also need to capture screenshots (taken with OneNote keystroke shortcut) and place them in SP. part of the My Note: I work in a Windows 7 & Sharepoint Enterprise 2010 w/Foundation environment set up a blog on your "personal" site in sharepoint (part of the MyContent ...


1

Is you SharePoint Online account type dedicated or multi-tenant. If multi-tenant then it will have to run in Sandbox but if dedicated you can get your solution approved from MSO and take advantage of full SP object model? You can try to customize the list forms as InfoPath forms using SharePoint 2010 designer and in InfoPath you have the liberty to create ...



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