library/Garp/Form.php
public function setAjax($flag) {
        $this->_ajax = $flag;
        $class = $this->getAttrib('class');
        if ($flag && !preg_match('/(^|\s)ajax($|\s)/', $class)) {
            $class .= ' ajax';
        } else {
            $class = preg_replace('/(^|\s)(ajax)($|\s)/', '$1$3', $class);
        }
        $this->setAttrib('class', $class);
        return $this;
    }
public function setAjax($flag) {
        $this->_ajax = $flag;
        $class = $this->getAttrib('class');
        if ($flag && !preg_match('/(^|\s)ajax($|\s)/', $class)) {
            $class .= ' ajax';
        } else {
            $class = preg_replace('/(^|\s)(ajax)($|\s)/', '$1$3', $class);
        }
        $this->setAttrib('class', $class);
        return $this;
    }
public function setAjax ( $ flag ) { $ this -> _ajax = $ flag ; $ class = $ this -> getAttrib ( 'class' ) ; if ( $ flag && ! preg_match ( '/(^|\s)ajax($|\s)/' , $ class ) ) { $ class .= ' ajax' ; } else { $ class = preg_replace ( '/(^|\s)(ajax)($|\s)/' , '$1$3' , $ class ) ; } $ this -> setAttrib ( 'class' , $ class ) ; return $ this ; }
Set wether to hijack the form using AJAX

@param bool $flag
@return $this
Set wether to hijack the form using AJAX