Edit in View Only mode

Edit in View Only mode

raydlevel5raydlevel5 Posts: 112Questions: 49Answers: 1
edited July 2019 in Editor

Is there an easy way to open an Editor in "view only" mode? (Kind of like a property sheet)

Additionally, is there a way to get this button function into formOptions? What I mean is, is there a way to configure Editor buttons in its instantiation?

            dteEffectiveDates = new $.fn.dataTable.Editor({

            // can I configure form buttons here?  Can I get a button function here?

            }).on('preOpen', function (e, mode, action) {

                switch (action) {
                    case 'edit':

                        // disable editing if Locked
                        if (recordLocked) {

                            // disable all fields

                            // $('div.DTE_Form_Buttons button').attr('disabled', true);

                            // change what the Update button does
                                text: 'OK',
                                action: function () {

                        } else {
                        //do nothing



  • colincolin Posts: 8,088Questions: 0Answers: 1,359

    Hi @raydlevel5 ,

    I think we covered this in your other threads, here and here. If I'm missing something can you explain the difference please,



  • raydlevel5raydlevel5 Posts: 112Questions: 49Answers: 1

    In summary:

    • I would like to suggest a feature: Specifically, a setting that opens an Editor form in "View Only" mode. Perhaps established as a function editor.viewOnlyMode(), or a 4th action: Create, Edit, Remove, and View.
    • I would like to know if you can configure a function for a Form button in Editor via formOptions.main or form-options.

    I promise to leave you alone for a while. Thank you for being there for me. I'm kinda a noob all alone in a corner. Sometimes they let me go outside. :)

  • allanallan Posts: 51,440Questions: 1Answers: 7,758 Site admin


    Agreed - this is something we've actually got in our feature tracker already, but no target release for it I'm afraid.


Sign In or Register to comment.