Hot answers tagged

7

That is not the internal field name of the SharePoint field, it is how ASP.NET (ASPX pages) gives IDs to the fields when it renders them. You should never rely on those as they keep changing based on other controls on the page. In this case MS has probably pushed an update that has brought in one additional control to the page, causing incremented ID to all ...


5

You can use queryselector to reach the text inside the div: var textValue = document.querySelector("#allowances div").innerText;


4

What you could to is just create a OOTB custom list, change the Title field to "New Idea" or something relevant and then enable ratings for the list from List Settings > Rating Settings. Enable it to Yes and select Star ratings and voila! Users can now rate the item/idea on a scale of 1-5 stars. If you wanna take it further from there, you could set up a ...


4

I just want to add one thing, you should not override PreSaveItem - this is a SharePoint built in function. Instead, like mentioned above - override/create PreSaveAction. But: be sure to remember you may not be the only one doing so. So, the correct way to do it is this, which will call other overrides if existed before your code: __OriginalPreSaveAction ...


3

Yes you can. At least in SharePoint 2013 on-prem First create a new custom form. Go to the list where you want the new form and edit the form in SharePoint Designer. Then create a new form (1), give it a name (2), select which kind of form (3), option to set it als default (4) and click ok (5). Then open the newly created form in advanced mode (right ...


3

If I am not wrong, you need to change the default New & Edit form of your specific list using CSOM. Following is using C# Get your list an Content Types. var specificList = oWebsite.Lists.GetByTitle("SpecificListName"); var specificListContentTypes = specificList.ContentTypes; specificListContentTypes holds all the content type those are being ...


3

Add the URL of the next form as the &Source=[url] parameter The Source parameter in the URL is where the browser is redirected to after a Form is saved. Open an EditForm and investigate the URL The URL has to be URL encoded (and it needs to be within the SharePoint domain) https://xxx.sharepoint.com/sites/VM/Lists/Tasks/NewForm.aspx ?Source= ...


2

Hey I recommend you to create a webpart with the form as you like and insert the details into your custom list where you don't need to expose your list to anybody. Let me know if you have any questions.


2

In your custom form use Client Side Rendering and render the desired people picker column with the default template, i.e. SPClientPeoplePickerCSRTemplate. This will automatically render your column as you desire. Source


2

No, if you create a Custom form, you are breaking the automatic associations where an updated question (or field in the case of standard lists) automatically shows up. You must maintain your custom form any time you make structural changes to your list or it isn't reflected.


2

I added the following snippet: <td class="ms-formbody"> <SharePoint:FormField runat="server" ID="field_name" controlMode="Edit" FieldName="Name" /> </td> I don't know why but the FieldName attribute should be the exact displayed name (and NOT the internal name) of the column we want to display.


2

You can make that column required by going to List Settings and clicking on to the column, and then just clicking option Yes under "Required that this columns contains information". If you are using sharepoint Forms, then I think you need to create again the new form if you are making changes on the list after creating the new form. That changes will get ...


1

You can use below <a> tag to work. Place below mentioned code to your Custom Edit Form & it will work. <a href="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;__delete={ID=',@ID,'};__commit'))}"><img border="0" alt="Edit" src="/_layouts/images/delete.gif" /></a> Above Code is getting @ID from the URL as it defined the ...


1

Try the below steps Add ID field in Form <td> ID </td> <td id="txtID"><xsl:value-of select="@ID"/></td> Add Delete button to the Form <input type="button" onclick="javascript:CustomDelete()" value="Delete"></input> Add the below code to Javascript of Form function CustomDelete() { var context = ...


1

I recommend you start with this book, "Inside Microsoft SharePoint 2010". The first 4 chapters can be read online at MSDN this link: Book landing page: Inside Microsoft SharePoint 2010 There are versions of this book for 2007 and 2013 too.


1

I just happen to have a great blog post on this. It's not only people pickers that break, it's also rich text editors (and god knows what else). Many blog posts will tell you to revert back to IE8 mode, but you can actually override the ootb function that breaks with a fixed version. Anyway, for the sake of having the full answer (or my blog exploding) ...


1

This is a known problem. With SP2010, IE 11 should be in IE8 compatibility. Check this link, and read the solution ;) People Picker/Edit Web Parts/More not working in IE11


1

First You can assign Read permission to the users whom you want to only view the items and not add modify or delete. IF you want the users to add items but not edit or delete any item then Create a Custom Permission Level by going into Site Settings-->Site permission--> Permission Levels--> Add a permission level. Here select the action item you want the ...


1

There are a few different ways I can think of to handle this, based on what I think you described. Created your fields - and then just create a custom list view that doesn't show those column. Your fields will be visible in the edit form. Use InfoPath - with InfoPath you can have fields tied to XML that never populate in the list (this if for InfoPath ...


1

That depends on how you build your ASPX page. If this is one off page - use SharePoint Designer. Create new pages as needed for the library, remove the default markup and replace with your own. You can search for how to do this and get a lot of examples. Once you have your page - you can manipulate the template directly (via XSL) or use the Client Side ...


1

Not sure how related this can be, but we have seen some SharePoint updates changing way internal fields are named and shown in final HTML output. Here is a case where 'Required Field' is appended to internal display name of mandatory field. http://code2care.org/2015/sharepoint-update-append-required-field-to-display-name-of-mandatory-columns/


1

Then you don't need some fancy javascript to load in values etc. You may bash on JavaScript all you want; it is the preferred solution here from an End-User point of view because he/she triggers the cloning in the Browser. You have to let go of the old-school SharePoint back-end approach and poplulating controls. All you have to do is create a new item ...


1

What you need to do is create a new Edit form, not create a new New form. You can reuse all the Edit form markup from the original Edit form from the list, but you will have to add some custom codebehind to override the Save mechanism. I've found that these 2 blog posts describe quite well how to do this; given they describe it for a custom Display form, ...


1

Use PreSaveAction() function PreSaveAction() { var MyNumber = $('input[title="My Number"]').val(); if( MyNumber == 0 ) { return false; //dont save } return true; //save } http://social.technet.microsoft.com/wiki/contents/articles/31330.sharepoint-using-presaveaction-function-on-custom-list-forms.aspx


1

You can do something like this: function click(){ flag = formValidation(); // call function first to return values if(flag == 1){ alert('Your new request has been submitted successfully'); }else{ // some alert } } function formValidation(){ // validate fields here // something like if(val == ''){ ...


1

Following is the way to achieve this requirement Create one document library with "ItemID" field Add one hyperlink field to your actual list to store PDF url Create one word document with placeholder 3.1. You need to enable "Developer Tools" in word. Follow this link to do so 3.2. Design your document exactly same as your display form and add "TextBox ...


1

Though I am not sure if Farm solutions can be used so I can provide you with a workaround with the help of workflows. Break permission of the list and give users Add permission. HR group can have any permission you like. On item creation on the list start a workflow which gives HR users the desired permission and remove everybody else permission. This way ...


1

By "unsightly HTML" do you perhaps mean something like this? <nobr><span><a href="/yoursite/_layouts/userdisp.aspx?ID=1">Some User</a><img border="0" height="1" width="3" src="/_layouts/images/blank.gif"/><a href='javascript:;' onclick='IMNImageOnClick(event);return false;' class='ms-imnlink'><img name='imnmark' ...


1

Have you tried this? TL;DR version, using jQuery: $(function() { $('input[value=Cancel]').click(function() {history.go(-1);}); }); Or to tackle both Cancel buttons at once: function redirectCancelButtons(){ // form Cancel button jQuery('input[value=Cancel]').click(function() {history.go(-1);}); // ribbon Cancel button ...


1

Solution: On custom form i added SharePoint:ClientPeoplePicker control near SP2010 peoplepicker control (Which not have autocomplete), that was hided. Markup to add sharepoint:clientpeoplepicker: <sharepoint:clientpeoplepicker allowemailaddresses="true" allowmultipleentities="true" clientidmode="Static" cssclass="ms-long ms-spellcheck-true" ...



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