- This topic is empty.
- AuthorPosts
-
- 05/21/2014 at 9:24 am #4555
AnonymousParticipantHi
n
Will be migrating SharePoint farm to SP2013 over the next 12 months, along with QuickApps – SP2013.
n
At the present configuring “Valid” / “Invalid When” has no effect on SP2007.
n
Have JavaScript / jQuery script to attempt to validate QlistForm Start / End Contract form fields,
n
Have set up change events for the appropriate date fields using for instance :-
n
$(“input[name*=” + Form_StartDate_FieldName + “]”).change(function() {
n
//*** Retrieve Start Date value var Form_StartDate_FieldValue = $(this).val(); //*** Retrieve the appropriate End date to compare var Form_EndDate_FieldValue = $(“input[name*=” + Form_EndDate_FieldName + “]”).val();
n
//*** Comparison code here …..
n
});
n
function.
n
Have jQuery code working to retrieve form field values via the Change events then convert into a javaScript Date variable for comparison purposes.
n
If the user enters a Start Date which is GT the form End date, I issue an Informative message and attempt to reset the End Date to the Start date value using :-
n
//*** Now Change Form End Date to Start Date $(“input[name*=” + Form_EndDate_FieldName + “]”).val(Form_StartDate_FieldValue);
n
however the form field does NOT refresh unless I click in the End Date input field.
n
If I set AutoPostBack=”true” on the Start / End date field(s), my On Change event does NOT fire correctly.
n
Any ideas, how I can get the form field to refresh to the updated value set by JavaScript / jQuery.
n
Thanks
n
- 05/21/2014 at 9:24 am #6808
AnonymousParticipantHi ,
n
You can achieve this using custom actions (C# code sample solution provided with the product) to validate data on Save action.
n
It's easy to adapt and extend, just open the solution in Visual Studio from the <InstallationLocation>pleCode folder and look at the file called pleCustomActionEx.cs It has already validation sample code and it's easy to adapt to your needs.
n
Please check the product documentation for more details.
n
n
n
-
- AuthorPosts
You must be logged in to reply to this topic.