gd-sprest-bs 10.2.5 → 10.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -586,18 +586,18 @@ exports.ListForm.renderEditForm = function (props) {
586
586
  var _loop_1 = function (i) {
587
587
  var fieldName = fieldNames[i];
588
588
  var field = props.info.fields[fieldName];
589
- // Ensure the field exists
590
- if (field == null) {
591
- // Log
592
- console.error("[List Form] Field '" + fieldName + "' does not exist. Check the list or query.");
593
- return "continue";
594
- }
595
589
  // See if this is the attachment field
596
590
  if (fieldName == "Attachments") {
597
591
  // Generate the attachments row
598
592
  generateAttachmentsRow();
599
593
  return "continue";
600
594
  }
595
+ // Ensure the field exists
596
+ if (field == null) {
597
+ // Log
598
+ console.error("[List Form] Field '" + fieldName + "' does not exist. Check the list or query.");
599
+ return "continue";
600
+ }
601
601
  // See if the item exists
602
602
  value[fieldName] = null;
603
603
  if (props.info.item) {
@@ -800,6 +800,11 @@ exports.ListForm.renderEditForm = function (props) {
800
800
  }
801
801
  // Get the field value
802
802
  var fieldValue = formField.getValue();
803
+ // See if an event exists
804
+ if (formField.controlProps.onGetValue) {
805
+ // Update the value
806
+ fieldValue.value = formField.controlProps.onGetValue(formField.controlProps);
807
+ }
803
808
  // Set the item value
804
809
  values[fieldValue.name] = fieldValue.value;
805
810
  // See if this is the file leaf ref
@@ -892,6 +897,12 @@ exports.ListForm.renderEditForm = function (props) {
892
897
  }
893
898
  // Validate the form field and update the status flag
894
899
  var controlIsValid = formField.isValid();
900
+ // See if there is a custom method
901
+ if (formField.controlProps.onValidate) {
902
+ // Call the event
903
+ controlIsValid = formField.controlProps.onValidate(formField.controlProps, formField.getValue());
904
+ }
905
+ // Update the flag
895
906
  isValid = isValid && controlIsValid;
896
907
  }
897
908
  // Parse the custom controls