getFormInitOptions(url, form) {
    const options = {};
    const index = url.indexOf(form?.path);
    // form url doesn't include form path
    if (index === -1) {
      return options;
    }
    const projectUrl = url.substring(0, index - 1);
    const urlParts = Formio.getUrlParts(projectUrl);
    // project url doesn't include subdirectories path
    if (!urlParts || urlParts.filter(part => !!part).length < 4) {
      return options;
    }
    const baseUrl = `${urlParts[1]}${urlParts[2]}`;
    // Skip if baseUrl has already been set
    if (baseUrl !== Formio.baseUrl) {
      return {
        base: baseUrl,
        project: projectUrl,
      };
    }

    return {};
  }
Check Subdirectories path and provide correct options
@param {string} url - The the URL of the form json.
@param {import('@formio/core').Form} form - The form json.
@returns {object} The initial options with base and project.