question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EditForm Dialog without style

See original GitHub issue

I don’t use bootstrap in my application, because if I do it brokes many things. To manage that, I used the following to make the FormBuilder style works:

:host ::ng-deep {
  @import "~bootstrap/scss/bootstrap";
  @import "~formiojs/dist/formio.builder";
}

And it does work! But the EditForm dialog is appended to the body, so it doesn’t get the bootstrap styles. Is there any way I can append the edit form inside my component instead of the body?

Thanks in advance for your help!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
aiwebbcommented, Aug 16, 2019

@felipebelluco, here’s an example JSFiddle:

https://jsfiddle.net/zqr9Ljsv/3/

1reaction
aiwebbcommented, Aug 15, 2019

@felipebelluco, the WebformBuilder is calling Base.createModal() from here:

https://github.com/formio/formio.js/blob/3983c3b33c625a4cdad97848354a5ec36027f95c/src/WebformBuilder.js#L320

Base.createModal() is attaching the modal to the body here:

https://github.com/formio/formio.js/blob/3983c3b33c625a4cdad97848354a5ec36027f95c/src/components/base/Base.js#L698

You may want to override Base.createModal() to fire an event when the modal is created - that way you can hook into the creation of that dialog and immediately move it as needed. Something like this:

Base.prototype.createModal_original = Base.prototype.createModal;
Base.prototype.createModal = function(name) {
  let dialog = Base.prototype.createModal_original();

  document.dispatchEvent(new CustomEvent('modal-created', {name, dialog}));

  return dialog;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

EditForm Dialog without style · Issue #348 · formio/angular
But the EditForm dialog is appended to the body, so it doesn't get the bootstrap styles. Is there any way I can append...
Read more >
Edit Form Dialog Not Prepopulating - angular - Stack Overflow
I am using Angular 11 and Ionic as my UI library. The issue that I'm having is that I created an upsert dialog...
Read more >
How to make DialogButton trigger EditForm validation and ...
I have a problem with Dialog Form. When user opens a dialog with some form components, without filling any content, they may directly...
Read more >
How to specify the Edit Form Dialog width - DevExpress Support
Use this property to define a custom DialogService, and set the desired Height and Width for the EditForm in a custom style defined...
Read more >
How to modify width of standard dialog form sharepoint 2010
4 : towards right you will see option as Form Web Parts, click on it, the three forms will be listed there [New...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found