Show the form for the requested action.
771610
def doAction(self, loginMethod, actionClass):
        
        loginAccount = loginMethod.account
        return actionClass(
            self,
            loginMethod.localpart + u'@' + loginMethod.domain,
            loginAccount)
1027602
def see_form(self, url):
    

    elements = ElementSelector(
        world.browser,
        str('//form[@action="%s"]' % url),
        filter_displayed=True,
    )
    if not elements:
        raise AssertionError("Expected form not found.")
1307959
def single_item_action_form_fields(form, document, action)
        render 'hyrax/dashboard/collections/single_item_action_fields', form: form, document: document, action: action
      end
605821
protected function doFormAction ()
  {
//    if (count ($_POST) == 0 && count ($_FILES) == 0)
//      throw new FileException(FileException::FILE_TOO_BIG, ini_get ('upload_max_filesize'));
    $this->getActionAndParam ($action, $param);
    $class = new ReflectionObject ($this);
    try {
      $method = $class->getMethod ('action_' . $action);
    }
    catch (ReflectionException $e) {
      throw new FlashMessageException('Class <b>' . $class->getName () . "</b> can't handle action <b>$action</b>.",
        FlashType::ERROR);
    }
    return $method->invoke ($this, $param);
  }
1230321
def get_upload_form(self):
        """"""
        return self.form_class(self.request.POST, self.request.FILES)
259288
def get_form(self, form_class):
        """"""
        if not hasattr(self, '_form'):
            kwargs = self.get_form_kwargs()
            self._form = form_class(instance=self.object, **kwargs)
        return self._form
1251360
def request(self, action):
    """"""
    ev = threading.Event()
    first = False
    with self.__lock:
      if len(self.__events) == 0:
        first = True
      self.__events.append(ev)
    if first:
      action()
    return ev
715008
public function showAction()
    {
        if ($this->enableScreens) {
            $show = false;
            $org  = $this->getRespondent()->getOrganization();
            if ($org) {
                $show = $org->getRespondentShowScreen();
            }

            if (! $show) {
                $group = $this->currentUser->getGroup();
                if ($group) {
                    $show = $group->getRespondentShowScreen();
                }
            }

            if ($show) {
                if ($show instanceof ProcessModelInterface) {
                    $show->processModel($this->getModel());
                }

                // All are arrays, so easy to set
                $this->showParameters = $show->getParameters() + $this->showParameters;
                $showSnippets = $show->getSnippets();
                if (false !== $showSnippets) {
                    $this->showSnippets = $showSnippets;
                }
            }
        }

        parent::showAction();
    }
1016496
def form_valid(self, form):
        """"""
        auth_login(self.request, form.get_user())
        return HttpResponseRedirect(self.get_success_url())
295731
public function showAction()
    {
        if (! isset($this->showParameters['contentTitle'])) {
            $this->showParameters['contentTitle'] = $this->getShowTitle();
        }

        parent::showAction();
    }
578836
public function editAction()
    {
        if(method_exists($this, 'getEditForm'))
        {
            $form = $this->getEditForm();
        }
        else
        {
            $form = $this->getForm();
        }

        $id = $this->getEvent()
                ->getRouteMatch()
                ->getParam('id', 0);

        $form->add([
            'type'       => 'Zend\Form\Element\Hidden',
            'name'       => 'id',
            'attributes' => [
                'id'    => 'id',
                'value' => $id,
            ],
            'filters'    => [
                [
                    'name' => 'Int',
                ],
            ],
            'validators' => [
                [
                    'name' => 'Digits',
                ],
            ],
        ]);

        $em            = $this->getEntityManager();
        $objRepository = $em->getRepository($this->getEntityClass());
        $entity        = $objRepository->find($id);
        $form->bind($entity);

        $redirectUrl = $this->url()->fromRoute($this->getActionRoute(), [], true);
        $prg         = $this->fileprg($form, $redirectUrl, true);

        if($prg instanceof Response)
        {
            return $prg;
        }
        elseif($prg === false)
        {
            $this->getEventManager()->trigger('getForm', $this, [
                'form'        => $form,
                'entityClass' => $this->getEntityClass(),
                'id'          => $id,
                'entity'      => $entity,
            ]);

            return [
                'entityForm' => $form,
                'entity'     => $entity,
            ];
        }

        $this->getEventManager()->trigger('getForm', $this, [
            'form'        => $form,
            'entityClass' => $this->getEntityClass(),
            'id'          => $id,
            'entity'      => $entity,
        ]);

        $savedEntity = $this->getEntityService()->save($form, $entity);

        if(!$savedEntity)
        {
            return [
                'entityForm' => $form,
                'entity'     => $entity,
            ];
        }

        $this->flashMessenger()->addSuccessMessage($this->getServiceLocator()
                        ->get('translator')
                        ->translate($this->successEditMessage));

        return $this->redirect()->toRoute($this->getActionRoute('list'), [], true);
    }
762376
public function getFormActions()
    {
        $submitText = ($this->controller->SubmitButtonText)
            ? $this->controller->SubmitButtonText
            : _t('SilverStripe\\UserForms\\Model\\UserDefinedForm.SUBMITBUTTON', 'Submit');
        $clearText = ($this->controller->ClearButtonText)
            ? $this->controller->ClearButtonText
            : _t('SilverStripe\\UserForms\\Model\\UserDefinedForm.CLEARBUTTON', 'Clear');

        $actions = FieldList::create(FormAction::create('process', $submitText));

        if ($this->controller->ShowClearButton) {
            $actions->push(FormAction::create('clearForm', $clearText)->setAttribute('type', 'reset'));
        }

        $this->extend('updateFormActions', $actions);
        $actions->setForm($this);
        return $actions;
    }
685266
def is_form_get(attr, attrs):
    """"""
    res = False
    if attr == "action":
        method = attrs.get_true('method', u'').lower()
        res = method != 'post'
    return res
357349
def get_form(self, request, rel, admin_site):
        """"""
        return DynamicRawIDFilterForm(
            admin_site=admin_site,
            rel=rel,
            field_name=self.field_path,
            data=self.used_parameters,
        )
408727
def make_action category, name, defopts, opts = {}
      req = Net::HTTP::Post.new(
        category.nil? ? "#{API_URI.path}/#{name}" : "#{API_URI.path}/#{category}/#{name}"
      )
      form = get_form_data(defopts, opts)
      RegApi2.form_to_be_sent(req.path, form)

      req.set_form_data(form)
      res = http.request(req)

      handle_response(defopts, res)
    end
1058424
public function Form() {
		// The editing form hasn't been put in place by the 'edit' action
		// so lets just show the status form
		$append = '';
		if (!$this->form) {
			if (WikiPage::$show_edit_button || $this->data()->canEdit()) {
				// create the information form 
				$this->form = $this->StatusForm();
			}
		} else {
			// if we have got an editing form, then we'll add a New Page
			// form if we have permissions to do so
			if (Permission::check(MANAGE_WIKI_PAGES)) {
				$append = $this->CreatePageForm()->forTemplate();
			}
		}

		return $this->form->forTemplate() . $append;
	}
970286
def form_valid(self, form):
        """"""
        response = super().form_valid(form)
        messages.success(self.request, "Successfully created ({})".format(self.object))
        return response