Custom Display Controller Bootstrap Fields.

Custom Display Controller Bootstrap Fields.

washuit-iammwashuit-iamm Posts: 133Questions: 55Answers: 2

https://editor.datatables.net/examples/plug-ins/displayController.html

How would I get the bootstrap styles into a custom display controller?

Are you just manually adding form-control to all DTE_Field_InputControl on the boostrap display controller open event to the append param?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Basically yes. If you have a look in the editor.bootstrap4.js file you'll see:

            // Add `form-control` to required elements
            dte.on( 'displayOrder.dtebs', function ( e, display, action, form ) {
                $.each( dte.s.fields, function ( key, field ) {
                    $('input:not([type=checkbox]):not([type=radio]), select, textarea', field.node() )
                        .addClass( 'form-control' );
                } );
            } );
    

    You could do the same thing in a custom display controller if you don't want to use the Bootstrap Modal.

    Allan

This discussion has been closed.