form.php
protected function createAction($action, $page)
    {
        if (($action === '') || ($action === false)) {
            return $page->expandUrl($page->getUrl());
        }

        return $page->expandUrl(new SimpleUrl($action));
    }
protected function createAction($action, $page)
    {
        if (($action === '') || ($action === false)) {
            return $page->expandUrl($page->getUrl());
        }

        return $page->expandUrl(new SimpleUrl($action));
    }
Combined action attribute with current location to get an absolute form target.

@param string $action    Action attribute from form tag.
@param $page   Page location.

@return SimpleUrl        Absolute form target.