Skip to content

Commit

Permalink
FIO-9524: Fix bad request to nested form
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekotikov committed Jan 3, 2025
1 parent 4ad2b5f commit 7f97ee6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/directives/formio.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ export default app.directive('formio', function() {
$scope.src += ($scope.src.indexOf('?') === -1) ? '?' : '&';
$scope.src += 'live=1';
}
const optionsForm = _.cloneDeep($scope.options);
optionsForm.project = Formio.projectUrl || ""

if ($scope.src || $scope.form) {
$scope.initialized = true;
Formio.createForm($scope.element, $scope.src || $scope.form, _.cloneDeep($scope.options)).then(formio => {
Formio.createForm($scope.element, $scope.src || $scope.form, optionsForm).then(formio => {
formio.nosubmit = $scope.noSubmit;
$scope.$emit('formLoad', formio.wizard ? formio.wizard : formio.form);
$scope.formio = formio;
Expand Down

0 comments on commit 7f97ee6

Please sign in to comment.