(non-PHPdoc)
@see tao_models_classes_import_ImportHandler::getForm()
773304
public function getForm()
    {
        $form = empty($_POST['source']) && empty($_POST['importFile'])
            ? new tao_models_classes_import_CsvUploadForm()
            : $this->createImportFormContainer();
        return $form->getForm();
    }
192427
public function getImport()
    {
        $form = FormBuilder::create($this->import_form, [
            'model' => $this->model
        ]);

        $form_content = view('expendable::admin.form.components.formgenerator.import', [
            'form' => $form
        ]);
        $content      = view('expendable::admin.form.state.form', [

        ]);

        $this->layoutManager->add([
        'form'=>$form_content,
        'content'=>$content,
        ]);

        return $this->layoutManager->render();
    }
259434
protected function createComponentEditForm(): Form
	{
		$form = $this->formFactory->create();

		$form->addText('name', 'default.name')
			->setRequired();

		if ($this->editConst) {
			$form->addText('const', 'webManager.web.content.const')
				->setRequired();

			$form->addSelectUntranslated('locale', 'webManager.web.pages.locale')
				->setItems($this->localeService->allowed);
		}

		$form->addText('title', 'webManager.web.content.contentTitle')
			->addRule(Form::MAX_LENGTH, null, 150)
			->setRequired(false);

		$form->addTextArea('keywords', 'webManager.web.content.keywords');

		$form->addImageUpload('image', 'webManager.web.content.photo', 'webManager.web.content.photoDelete')
			->setNamespace('content')
			->setPreview('300x100');

		$form->addColor('background', 'webManager.web.content.background');

		$form->addTextArea('description', 'webManager.web.content.description');

		$form->addTextEditor('content', 'webManager.web.content.content');

		$form->addSubmit('save', 'form.save');

		$form->addLink('back', 'form.back', $this->getBacklink());

		$form->onSuccess[] = [$this, 'editFormSucceeded'];

		return $form;
	}
857463
def get_form(self, **kwargs):
        """"""
        if not hasattr(self, "form_class"):
            raise AttributeError(_("You must define a form_class"))
        return self.form_class(**kwargs)
408587
public function ImportForm()
    {
        $modelSNG = singleton($this->modelClass);
        $modelName = $modelSNG->i18n_singular_name();
        // check if a import form should be generated
        if (!$this->showImportForm ||
            (is_array($this->showImportForm) && !in_array($this->modelClass, $this->showImportForm))
        ) {
            return false;
        }

        $importers = $this->getModelImporters();
        if (!$importers || !isset($importers[$this->modelClass])) {
            return false;
        }

        if (!$modelSNG->canCreate(Security::getCurrentUser())) {
            return false;
        }

        $fields = new FieldList(
            new HiddenField('ClassName', false, $this->modelClass),
            new FileField('_CsvFile', false)
        );

        // get HTML specification for each import (column names etc.)
        $importerClass = $importers[$this->modelClass];
        /** @var BulkLoader $importer */
        $importer = new $importerClass($this->modelClass);
        $spec = $importer->getImportSpec();
        $specFields = new ArrayList();
        foreach ($spec['fields'] as $name => $desc) {
            $specFields->push(new ArrayData(array('Name' => $name, 'Description' => $desc)));
        }
        $specRelations = new ArrayList();
        foreach ($spec['relations'] as $name => $desc) {
            $specRelations->push(new ArrayData(array('Name' => $name, 'Description' => $desc)));
        }
        $specHTML = $this->customise(array(
            'ClassName' => $this->sanitiseClassName($this->modelClass),
            'ModelName' => Convert::raw2att($modelName),
            'Fields' => $specFields,
            'Relations' => $specRelations,
        ))->renderWith($this->getTemplatesWithSuffix('_ImportSpec'));

        $fields->push(new LiteralField("SpecFor{$modelName}", $specHTML));
        $fields->push(
            new CheckboxField(
                'EmptyBeforeImport',
                _t('SilverStripe\\Admin\\ModelAdmin.EMPTYBEFOREIMPORT', 'Replace data'),
                false
            )
        );

        $actions = new FieldList(
            FormAction::create('import', _t('SilverStripe\\Admin\\ModelAdmin.IMPORT', 'Import from CSV'))
                ->addExtraClass('btn btn-outline-secondary font-icon-upload')
        );

        $form = new Form(
            $this,
            "ImportForm",
            $fields,
            $actions
        );
        $form->setFormAction(
            Controller::join_links($this->Link($this->sanitiseClassName($this->modelClass)), 'ImportForm')
        );

        $this->extend('updateImportForm', $form);

        return $form;
    }
367358
protected function getAutoSearchForm()
    {
        $data = $this->getSearchData();
        // \MUtil_Echo::track($data);

        $this->form = $form = $this->createForm(array('name' => 'autosubmit', 'class' => 'form-inline', 'role' => 'form'));

        $elements = $this->getAutoSearchElements($data);

        if ($elements) {
            // Assign a name so autosubmit will only work on this form (when there are others)
            $form->setHtml('div');
            $div = $form->getHtml();
            $div->class = 'search';

            $span = $div->div(array('class' => 'panel panel-default'))->div(array('class' => 'inputgroup panel-body'));

            $elements[] = $this->getAutoSearchSubmit();

            if ($reset = $this->getAutoSearchReset()) {
                $elements[] = $reset;
            }

            $prev = null;
            foreach (\MUtil_Ra::flatten($elements) as $element) {
                if ($element instanceof \Zend_Form_Element) {
                    $appendLabel = false;
                    if ($element->getLabel()) {
                        $labelDecor = $element->getDecorator('Label');

                        if ($labelDecor) {
                            $appendLabel = \Zend_Form_Decorator_Abstract::APPEND === $labelDecor->getPlacement();

                            if (! $appendLabel) {
                                $span->label($element);
                            }
                        }
                    }
                    $span->input($element);
                    if ($appendLabel) {
                        $span->label($element);
                    }
                    // TODO: Elementen automatisch toevoegen in \MUtil_Form
                    $form->addElement($element);
                } elseif (null === $element && $prev !== null) {
                    $span = $div->div(array('class' => 'panel panel-default'))->div(array('class' => 'inputgroup panel-body'));
                } else {
                    $span[] = $element;
                }
                $prev = $element;
            }

            // \MUtil_Echo::track($data);
            if ($this->request->isPost()) {
                if (! $form->isValid($data)) {
                    $this->addMessage($form->getErrorMessages());
                    $this->addMessage($form->getMessages());
                }
            } else {
                $form->populate($data);
            }

            if ($this->containingId) {
                $href = $this->getAutoSearchHref();
                if ($href) {
                    $form->setAutoSubmit($href, $this->containingId);
                }
            }

            return $form;
        }
    }
181031
def get_form(formcls):
    
    from uliweb.form import Form
    import inspect
    
    if inspect.isclass(formcls) and issubclass(formcls, Form):
        return formcls
    elif isinstance(formcls, (str, unicode)):
        path = settings.FORMS.get(formcls)
        if path:
            _cls = import_attr(path)
            return _cls
        else:
            raise UliwebError("Can't find formcls name %s in settings.FORMS" % formcls)
    else:
        raise UliwebError("formcls should be Form class object or string path format, but %r found!" % formcls)
863658
protected function initForm()
	{


		(isset($this->options['name'])) ? $name = $this->options['name'] : $name = '';
		if(empty($name)){
			$name = 'form_'.(count(self::$forms)+1);
		}
		unset($this->options['name']);

		$this->index = array_key_exists( 'index', $this->options ) ? $this->options['index'] : 1;

		$this->form = tao_helpers_form_FormFactory::getForm($name, $this->options);


	}
506492
protected function initForm()
    {
    	(isset($this->options['name'])) ? $name = $this->options['name'] : $name = ''; 
    	if(empty($name)){
			$name = 'form_'.(count(self::$forms)+1);
		}
		unset($this->options['name']);
			
		$this->form = \tao_helpers_form_FormFactory::getForm($name, $this->options);
		
		//create action in toolbar
		$createElt = \tao_helpers_form_FormFactory::getElement('create', 'Free');
		$createElt->setValue('<button class="btn-info" type="submit" id="addButton">'.\tao_helpers_Icon::iconAdd().__('Create').'</button>');
		$this->form->setActions(array(), 'top');
		$this->form->setActions(array($createElt), 'bottom');
    }
789360
def get_form(self, form_class=None):
        '''
        
        '''
        formobj = super(GenModify, self).get_form(form_class)

        # Set requested group to this form
        selfgroups = getattr(self, "form_groups", None)
        if selfgroups:
            if type(selfgroups) == list:
                formobj.__groups__ = lambda: selfgroups
            else:
                formobj.__groups__ = selfgroups
        else:
            selfgroups = getattr(self, "__groups__", None)
            if selfgroups:
                formobj.__groups__ = selfgroups

        # Return the new updated form
        return formobj
483818
def get_form(self, form_class):
        """"""
        if not hasattr(self, '_form'):
            kwargs = self.get_form_kwargs()
            self._form = form_class(**kwargs)
        return self._form
305428
public function getStem($transliterationForm, $verbalForm, $languageForm)
    {
      return ($transliterationForm === Inflector::KANJI_FORM) ? $this->stem[Inflector::KANJI_FORM] : $this->stem[Inflector::KANA_FORM];
    }
480244
public function getFromForm()
    {
        if ($this->form !== null) {
            $this->user_id = $this->form->user_id;
            $this->phone = $this->form->phone;
            $this->code = $this->form->code;
            $this->type_id = $this->form->type_id;
            $this->ip = $this->form->ip;
            $this->is_used = $this->form->is_used;
            $this->is_validated = $this->form->is_validated;
            $this->is_deleted = $this->form->is_deleted;
        }
    }
997044
def get_form(self, request, obj=None, **kwargs):
        """"""

        template = get_template_from_request(request, obj)

        #model = create_page_model(get_placeholders(template))

        form = make_form(self.model, get_placeholders(template))

        # bound the form
        language = get_language_from_request(request)
        form.base_fields['language'].initial = language
        if obj:
            initial_slug = obj.slug(language=language, fallback=False)
            initial_title = obj.title(language=language, fallback=False)
            form.base_fields['slug'].initial = initial_slug
            form.base_fields['title'].initial = initial_title

        template = get_template_from_request(request, obj)
        page_templates = settings.get_page_templates()
        template_choices = list(page_templates)
        # is default template is not in the list add it
        if not [tpl for tpl in template_choices if tpl[0] == settings.PAGE_DEFAULT_TEMPLATE]:
            template_choices.insert(0, (settings.PAGE_DEFAULT_TEMPLATE,
                    _('Default template')))
        form.base_fields['template'].choices = template_choices
        form.base_fields['template'].initial = force_text(template)

        for placeholder in get_placeholders(template):
            ctype = placeholder.ctype
            if obj:
                initial = placeholder.get_content(obj, language, lang_fallback=False)
            else:
                initial = None
            form.base_fields[ctype] = placeholder.get_field(obj,
                language, initial=initial)

        return form
436696
public function initForm()
    {
        

    	$this->form = new tao_helpers_form_xhtml_Form('export');

		$this->form->setDecorators(array(
			'element'			=> new tao_helpers_form_xhtml_TagWrapper(array('tag' => 'div')),
			'group'				=> new tao_helpers_form_xhtml_TagWrapper(array('tag' => 'div', 'cssClass' => 'form-group')),
			'error'				=> new tao_helpers_form_xhtml_TagWrapper(array('tag' => 'div', 'cssClass' => 'form-error ui-state-error ui-corner-all')),
			'actions-bottom'	=> new tao_helpers_form_xhtml_TagWrapper(array('tag' => 'div', 'cssClass' => 'form-toolbar')),
			'actions-top'		=> new tao_helpers_form_xhtml_TagWrapper(array('tag' => 'div', 'cssClass' => 'form-toolbar'))
		));

    	$exportElt = tao_helpers_form_FormFactory::getElement('export', 'Free');
		$exportElt->setValue('<a href="#" class="form-submitter btn-success small"><span class="icon-export"></span> ' .__('Export').'</a>');

		$this->form->setActions(array($exportElt), 'bottom');
        
    }
1015187
private function getLocale(FormInterface $form)
    {
        if (null === $form->getParent()) {
            return null;
        }

        $entity = $form->getParent()->getData();

        if (!is_object($entity)) {
            return null;
        }

        $class = ClassUtils::getClass($entity);

        if (!$this->translatableManager->isTranslation($class)) {
            return null;
        }

        return $this->propertyAccessor->getValue($entity, $this->translatableManager->getTranslationLocaleProperty());
    }
15719
public function getForm()
    {
        if (null === $this->form) {
            $this->setForm($this->getUserService()->getLoginForm());
        }

        return $this->form;
    }