Custom Display Controller Bootstrap Fields.

Custom Display Controller Bootstrap Fields.

washuit-iammwashuit-iamm Posts: 89Questions: 34Answers: 1

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: 61,723Questions: 1Answers: 10,108 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.