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


4

One way at least is to use this CSS: .ms-formtoolbar { display: none; }


3

Yes, there is. In the list go to List Settings > Form Settings and tick "Use the default SharePoint Form". If you keep the option "Delete the InfoPath form from the server" unticked, you can later switch back to the IP form. If you tick that option, it will be gone for good.


3

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


3

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


3

in your page make sure there is no reference to core.css.... issue is due to masterpage which has that reference that the page your using could be referencing the masterpage. several methods: 1) if its referencing a masterpage than make a custom masterpage that is almost the same only that it doesnt contain the core.css reference. 2) within your css add ...


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

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

It turns out to be my fault. I was using absolute url for the DisplayFormUrl property, when I changed it to relative url (/_layout/WorkflowTaskForm.aspx), everything works just fine. (so the code snippet in my question works)


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

It seems that for JSLink to work on the display/new/edit forms you need to set the JSLink on the webpart used in the forms, not directly on the form itself. The following PowerShell code works for the new form on a blog post and should be easy to adopt to your needs in C#: $web = Get-SPWeb "http://myportal" $file = $web.GetFile("Lists/Posts/NewPost.aspx") ...


2

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 });


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

I can think of 2 possible ways to achieve this: Create a separate Web Part with your form only, and add that web part in the same page as the XsltListViewWebPart. Create a custom Web Part in Visual Studio that has both the form AND the XsltListViewWebPart. You can override the CreateChildControls (and other methods) to have both components coexisting in ...


2

I usually do an <xsl:value-of select="substring-after(@YourField, ';#')" /> I believe. You might need to adjust the ;# part but as I recall, the lookup field value is returned like 1;#Name. So in you example (had to edit your post to see it) it would be like: <div id="Artikelnaam"><xsl:value-of select="substring-after(@Artikelen, ';#')" ...


2

To create a form that would submit items to multiple lists, you should: Add some elements to your main list form, probably arranging them in a certain way. If those elements aren't related to fields as I suspect from your description, best way to do it would be to leverage OnPostRender CSR event and then use HTML5 selectors or jQuery to insert your HTML ...


1

You need to set the Inherits attribute to False and then manually include all of the columns.


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

You said you have a FLAG column in your list and that you have multiple edit forms and you are looking for a way to discern which edit form actually caused the editing. You can achieve your goal by adding a <asp:HiddenField> to each edit form, and setting its Value to the value you want the flag to have. <asp:HiddenField runat="server" ...


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

I've been fighting this for days. There is a limit of 70 fields in a custom edit form, and this includes Attachment, Modified, Modified By, Created, Created By. I'm in SP2010, but the issue is also in 2013. Reference the book SharePoint Designer 2010 Unleashed by Hughes, p1329. You can get around this by editing for form in InfoPath if you have enterprise ...


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

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

SharePoint 2013 workflows allow looping, why not try a workflow that will start if a course changes, and then have it loop through the registration list and update any item that is linked to the course. In my experience, the closer you get to out of the box, the less headaches.


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

Turns out it does have something to do with which view the people picker is on. I moved it to the default (edit) view and it works normally now. If someone has a better solution please post it and I will accept it instead.


1

Check the "Column Settings" in SharePoint Designer. If the "Choose from:" is to "SharePoint Group" change it to "All Users".



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