getFormElementDetails(el) {
    if (!el.type) {
      log(1, "uibuilder:getFormElementDetails", "Cannot get form element details as this is not an input type element")();
      return null;
    }
    const id = this.returnElementId(el);
    if (!id) {
      log(1, "uibuilder:getFormElementDetails", "Cannot get form element details as no id is present and could not be generated")();
      return null;
    }
    let { value: value2, checked } = this.getFormElementValue(el);
    const formDetails = {
      id,
      name: el.name,
      valid: el.checkValidity(),
      type: el.type
    };
    if (value2 !== null) formDetails.value = value2;
    if (checked !== null) formDetails.checked = checked;
    if (formDetails.valid === false) {
      const v = el.validity;
      formDetails.validity = {
        badInput: v.badInput === true ? v.badInput : void 0,
        customError: v.customError === true ? v.customError : void 0,
        patternMismatch: v.patternMismatch === true ? v.patternMismatch : void 0,
        rangeOverflow: v.rangeOverflow === true ? v.rangeOverflow : void 0,
        rangeUnderflow: v.rangeUnderflow === true ? v.rangeUnderflow : void 0,
        stepMismatch: v.stepMismatch === true ? v.stepMismatch : void 0,
        tooLong: v.tooLong === true ? v.tooLong : void 0,
        tooShort: v.tooShort === true ? v.tooShort : void 0,
        typeMismatch: v.typeMismatch === true ? v.typeMismatch : void 0,
        valueMissing: v.valueMissing === true ? v.valueMissing : void 0
      };
    }
    if (Object.keys(el.dataset).length > 0) formDetails.data = el.dataset;
    return formDetails;
  }
For HTML Form elements (e.g. input, textarea, select), return the details
@param {HTMLFormElement} el Source form element
@returns {object|null} Form element key details