New answers tagged

1

var value = formCtx.fieldValue; value = Math.floor(value/10) * 10; If the original value is between 0 and 100, dividing by 10 will give you a value between 0 and 10, with a decimal place. Math.floor will round down to the nearest integer, getting rid of the decimal. Then multiplying by 10 again will get you back to an even multiple of 10. So for ...


0

2 possibilities: Custom Editfield via jsLink Add a editform render with a custom UI that only allows your values. You could even implement a validation but thats a bit more tricky. List Validation Settings Add a formula that checks for your field to be in the desired state. This works OOTB.


0

I think I might be late answering your question. but for your future reference. On setting up the rules for the 'Submit' button we use, submit using Main Dataconnection and close the form. for 'Submit & New' button we can use, submit using the Main dataconnection and switch views. In the switch views try using the same default view which will appear when ...


0

What you can do is, instead of button, add an anchor tag with following URL format: <a href='https://server-name/Lists/listName/NewForm.aspx' target='_blank'>Click here to add an item!</a>


2

If you try to put the code into the Page Content field, it will get stripped out. You'll want to insert a Script Editor web part (Under the Media and Content grouping) and insert your code there. If you want to use the SharePoint modal dialog, insert this into your Script Editor Web Part: <script type="text/javascript"> function ...


0

This might help you: On the View menu, click Manage Views. In the Views task pane, select the view whose margins you want to modify, and then click View Properties. In the View Properties dialog box, click the Page Setup tab. Under Margins, select the options that you want.


0

I know this post is old, but for anyone who has a similar use case for this. If you are launching your forms in the dialog, you can assign a function to the dialogReturnValueCallback property of the options object that you pass to your function that opens the dialog. For example: // Using the DialogOptions object function showDialog() { var options = { ...


0

I guess you need to turn on the Team Collaboration Lists Site(Web level) Feature. That's the one that enables Form Libraries. It is turned off by default when using some of the Publishing Site templates.


0

Create a Button Create a dictionary like below: private Dictionary<string, object> EnumerateFieldControls() { Dictionary<string, object> fieldValues = new Dictionary<string, object>(); try { foreach (Control validator in _listFieldIterator.ItemContext.FormContext.FieldControlCollection) ...


2

Editing Newform.aspx is not a Good Practice. Instead of editing default new form, Create a new form. This form will have all the code for each columns. You can add your CSS class to those columns for the Table and define your CSS for that class. Editing default form or default CSS is never considered as good practice. How to Create a Custom New form


0

Editing the newform.apsx with SharePoint designer is certainly a good option. As SP Designer is not my favorite tool, I tend to user jQuery / javascript to show / hide fields or make other small changes to the form.


0

Your code behind is running as the current user. Since anonymous users do not have permission to add items to your list you get access denied. The solution to this is generally to use SPSecurity.RunWithElevatedPrivileges, this will run the small block of code as the web app account which will generally have the correct permissions to add items to a list. ...


0

There is an easier way to accomplish changing the default destination folder. Just go to 'advanced settings' in the library. There you can say if you want this library to be the default one for site activa. Check 'yes' en check 'no' in the advanced settings of every other library on the site. Done!



Top 50 recent answers are included