Custom Display Controller Bootstrap Fields.

Custom Display Controller Bootstrap Fields.

washuit-iammwashuit-iamm Posts: 43Questions: 20Answers: 1

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


  • allanallan Posts: 48,908Questions: 1Answers: 7,132 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.


Sign In or Register to comment.