Edit modal size, multiple forms on page, need different modal layout size per form.

Edit modal size, multiple forms on page, need different modal layout size per form.

MarkAndersonUKMarkAndersonUK Posts: 43Questions: 16Answers: 0

Hi,

I have multiple forms on a page, and one of the forms requires a large width layout. The problem is, I also have another form on the same page, that is small and doesn't require the large layout, in fact it needs the opposite, a small layout. The example listed for large layout editor forms (see https://editor.datatables.net/examples/styling/large.html) is to edit the CSS like this :

div.DTED_Lightbox_Wrapper {
    left: 1em;
    right: 1em;
    margin: auto;
    width: 100%;
}

The problem is, this applies to all the forms on the page. After looking at the HTML and CSS, I cannot find a way to create a selector that only applies to the one form.

Has anyone found a way around this, so you can have one form editor modal large and the other normal?

Answers

  • colincolin Posts: 15,091Questions: 1Answers: 2,580

    You could so something like this, perhaps. In that example, the CSS is applied dynamically when the form opens. If you know which form is being opened, or was opened, you could add some conditional code to apply the appropriate CSS,

    Colin

Sign In or Register to comment.