Tag Info

Hot answers tagged

5

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


4

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


3

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


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

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 am not sure i can understand correctly your question, but it seems to me that you want to submit a form via "original" save button. But would like to do your own code in between. If that's correct, what I usually do is to return 'false' in PreSaveItem. Then do all the things I need to do and then submit form with javascript like this: function ...


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

That's one of the UI issues in SharePoint 2013, that when Enhanced Rich Text is selected the required validation message appears twice. I don't know if there is an update available to fix this (and other issues). But you can try some JS/jQuery to hide one of them.


2

I'm actually fairly sure this isn't possible -- and the reason might seem kind of silly, but is a limitation of the architecture having to deal with content types: Forms (edit/view) are associated with a particular content type; so when you go to a list and edit an item, the first question SharePoint asks before it renders any form is 'what content type is ...


1

Yes, this is possible. You can add Last three field in section (Containers). After adding fields in section, add rules to this section to display only when login user is inside a SharePoint user group. You can add data connection having SharePoint user group there. And validate the same using rule applied in section. The blog ...


1

The good thing with using ASP.NET is you can write your own logic and customize it whenever needed with much flexibility. It is relatively difficult than using InfoPath as we have to be concerned about the page life-cycle a lot. Also you can manage it easily with asp:view controllers when a large amount of components are there. (In your case 300) But on the ...


1

I am not involve in IP form designing but i know one of our department create IP form with tons of fields which slow down their site collection. Personally, As we know, this is last version of IP so i think better to design in ASP.net or access form. Check this post, they discuss couple of limitation. Disadvantages of implementing InfoPath in SharePoint ...


1

In addition to customizing List Views & Forms via XSLT, with SharePoint 2013 was introduced a Client Side Rendering (CSR) technique. As an introductory please follow this article Introduction to Client Side Rendering in SharePoint 2013. Since CSR is the default rendering mode in SharePoint 2013, I would recommend this approach to customize a New Form ...


1

On the NewForm.aspx add a Script Editor Web Part (from Media and Content) and add the following script: <script type="text/javascript"> window.location.replace(http://theListUrl/MyCustomNewForm.aspx); </script> But be careful. If you do, the only option to get it back to where it "normal" is to edit the NewForm.aspx in SharePoint Designer: ...


1

When I want to change the style of one of the default forms I use something like this. The key is creating a new html form, and giving each element you want to include a span tag with the name "hillbillyform". Then the script will look for these fields, and apply the styles that you choose. This is applied using a CEWP on the form you desire to modify. ...


1

70 fields on one form does not sound like a great user experience. You may want to re-think your data architecture. Other discussions show that exceeding the limit will result in a stack overflow error. Even a field that is just displayed would need to be on the stack, so the display mode will probably not help much. In any case, why don't your try it ...


1

Try this: to disable the textarea $("textarea[title^='What']").attr('disabled', 'disabled'); to hide $("textarea[title^='What']").css('display', 'none !important'); or $("textarea[title^='What']").parent().find("iframe").hide(); $("textarea[title^='What']").css('display', 'block !important'); $("textarea[title^='What']").attr('disabled', ...


1

You don't need to use any code to hide your fields in every form.. Just create a new Content Type with the fields you need, attach it to the list (ensure that its the 1st CT / remove the default CT) and that's the metadata that will show up in your NewForm Make sure you inherit your Content Type from the parent 'Event'


1

I would use Knockout JS to bind your inputs and jQuery to submit/create SPList items. here is an example of knockout dynamic row binding: http://knockoutjs.com/examples/gridEditor.html Personally i try to stay away from SPServices and rather use OOB JavaScript api's. Infopath is almost dead, i wouldn't invest my time creating forms etc with it.


1

When I have experienced this error, it's usually do to invalid XSLT in the web part. Something as simple as leaving off a quote or a backslash will result in this error when loading your page. Sometimes I even have to blow away the web part and start over because I can't find anything wrong after staring at the code. But when I do find the problem, it's ...


1

Alex, You should set the control as follow: MyCustomField.ItemFieldValue = "1"; MyCustomField.Field.DefaultValue = "1"; Where 1 is for true, and 0 is for false


1

Using powershell, should be something like: $web = Get-SPWeb http://path/to/web $list = $web.GetList("/server/relative/path/Lists/ListUrl") $list.DefaultDisplayFormUrl = "/server/relative/path/Lists/ListUrl/displayifs.aspx" $list.DefaultEditFormUrl = "/server/relative/path/Lists/ListUrl/editifs.aspx" $list.DefaultNewFormUrl = ...


1

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


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

Seems like this has caused a fair bit of angst amongst the dev community working with SP Online and far greater minds than mine have devoted blog posts to the whys and wherefores, but the change is real and here to stay - on the grounds of accessibility for screen readers etc. etc. There's a couple of ways I got around this: Firstly you could change your ...


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



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