Posts

Showing posts from August, 2014

Bryce Canyon National Park

http://www.campingroadtrip.com/tips-and-articles/bryce-canyon-national-park

Adding Validation to a Custom NewForm.aspx in SharePoint & Redirect

SharePoint has a built in function called "PreSaveAction" that can be invoked to process anything before the form should submit. So now we will create a submit button which calls “PresaveActon” function. Once users Submits the form, PreSaveAction is executed. If PreSaveAction is returns true it will commit and redirect. If the PreSaveAction returns false, then the commit will not happen nor the redirect. Input Button Code: Replace this code <SharePoint:SaveButton runat="server" ControlMode="New" id="savebutton1"/> with <input type="button" value="Submit" name="btnSave" onclick="javascript: if(PreSaveAction()) {ddwrt:GenFireServerEvent('__commit;__redirect={http://<Site>/ SitePages/ThankYou.aspx}')}" /> Add Script in NewCustom Form. Now edit New custom newform.aspx and add content editor webpart and with below script <script type="text/javascript

show append changes to existing multiline textbox in Custom Edit/Display form

To show append changes to existing multiline textbox, use below code: <SharePoint:AppendOnlyHistory runat="server" FieldName="multiple field" ControlMode="Display" ItemId="{@ID}"/> How to Add: 1. in custom display form Try to create a new custom display form in Designer, select the multiple field, then go to code, tries to use the above code to replace <xsl:select value-of="@multiple field" /> 2. In custom edit form Try to create a new custom edit form in Designer, select the multiple field, then go to code, try to use the above code to replace      <SharePoint:FieldDescription runat="server" id="ffndescription{$Pos}" FieldName="mul" ControlMode="Edit"/>