Results 1 to 3 of 3

Thread: [resolved] DCA save

  1. #1
    User
    Join Date
    11-23-09.
    Location
    Valais, Switzerland
    Posts
    77

    Default [resolved] DCA save

    hello,

    just to know if we can custome the save buttons at the end of the form?

    I don't want to display "save" but only save and close.

    thanks

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    328

    Default Re: DCA save

    Quote Originally Posted by synergie
    hello,

    just to know if we can custome the save buttons at the end of the form?

    I don't want to display "save" but only save and close.

    thanks
    the buttons are hardcoded into the php code. However you can hide the save button with css.

    just put an onload_callback in your dca file with the following code in order to load a custom css only if user is in the "edit" window:

    Code:
    /* this must be inside a class that extends Backend */
    
    
    public function hideSaveButton {
        $act = $this->Input->get('act');
    
        if ($act == 'edit') {
    
           $GLOBALS['TL_CSS'][] = 'system/modules/path/to/your/css/file.css';
    
       }
    }
    the css should be something like this:
    Code:
    input#save {
        display: none; 
    }
    Consulenza Contao CMS https://www.intco.it

  3. #3
    User
    Join Date
    11-23-09.
    Location
    Valais, Switzerland
    Posts
    77

    Default Re: DCA save

    thanks that's perfectly what I need!

    I will consider a donation!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •