Set form instance to render.
@param \MvcCore\Ext\Form|\MvcCore\Ext\Forms\IForm $form
@return \MvcCore\Ext\Forms\View|\MvcCore\Ext\Forms\IView
493619
public function & SetForm (\MvcCore\Ext\Forms\IForm & $form) {
		$this->form = & $form;
		return $this;
	}
123161
private function renderMain($form)
	{
		// #main .content
		echo CHtml::openTag('div', array('id' => 'main', 'class' => 'nano'));
			echo CHtml::openTag('div', array('class' => 'nano-content'));

				echo CHtml::openTag('fieldset');

					// If we want a custom form view, render that view instead of the default behavior
					if ($this->model->form !== NULL)
						$this->controller->renderPartial($this->model->form, array('model' => $this->model, 'properties' => $this->properties, 'form' => $form));
					else if (count($this->properties) == 0)
					{
						echo CHtml::tag('legend', array(), Yii::t('Dashboard.main', 'Change Theme Settings'));
						echo CHtml::tag('div', array('class' => 'alert alert-info'), Yii::t('Dashboard.main', 'There are no settings for this section.'));
					}
					else
					{
						$groups = $this->model->groups();

						if (!empty($groups))
						{
							foreach ($groups as $name=>$attributes)
							{
								echo CHtml::tag('legend', array(), $name);
								echo CHtml::tag('div', array('class' => 'clearfix'), NULL);
								foreach ($attributes as $property)
								{
									$p = new StdClass();
									$p->name = $property;
									$this->renderProperties($form, $p);
								}
							}
						}
						else
						{
							echo CHtml::tag('legend', array(), CiiInflector::titleize(get_class($this->model)));
							foreach ($this->properties as $property)
							{
								$this->renderProperties($form, $property);
							}
						}
					}

				echo CHtml::closeTag('div');
			echo CHtml::closeTag('div');
		echo CHtml::closeTag('div');
	}
1044075
public function transform(FormInterface $form)
    {
        $formView = $form->createView();

        $question = new AlwaysReturnKeyOfChoiceQuestion($this->questionFrom($form), $formView->vars['choices'], $this->defaultValueFrom($form));

        if ($form->getConfig()->getOption('multiple')) {
            $question->setMultiselect(true);
        }

        return $question;
    }
654429
public function createOrUpdate(FormInterface $form)
    {
        /** @var CreateUpdateActionHandler $viewHandler */
        $viewHandler = $this->actionHandlers[CreateUpdateActionHandler::class];
        $viewHandler->setView($this->view);
        $viewHandler->setRequest($this->request);
        $viewHandler->setForm($form);

        return $this->getResponse($viewHandler->getView($this->driver));
    }
58716
public function setForm(ControlCollection $form = null): Control
    {
        $this->control->setForm($form);

        return parent::setForm($form);
    }
1197184
public function renderRequestForm($widget = true, FormInterface $form = null)
    {
        if (empty($form)) {
            $form = $this->passwordResetTokenFormFactory->createRequestForm();
        }

        $template = $widget
            ? 'DarvinUserBundle:PasswordResetToken/widget/request:form.html.twig'
            : 'DarvinUserBundle:PasswordResetToken:request.html.twig';

        return $this->templating->render($template, [
            'form' => $form->createView(),
        ]);
    }
56153
public function createJsModel(Form $form)
    {
        $this->currentElement = $form;

        $conf = $form->getConfig();
        // If field is disabled or has no any validations
        if (false === $conf->getOption('js_validation')) {
            return null;
        }

        $model                 = new JsFormElement;
        $model->id             = $this->getElementId($form);
        $model->name           = $form->getName();
        $model->type           = get_class($conf->getType()->getInnerType());
        $model->invalidMessage = $this->translateMessage(
            $conf->getOption('invalid_message'),
            $conf->getOption('invalid_message_parameters')
        );
        $model->transformers   = $this->normalizeViewTransformers(
            $form,
            $this->parseTransformers($conf->getViewTransformers())
        );
        $model->bubbling       = $conf->getOption('error_bubbling');
        $model->data           = $this->getValidationData($form);
        $model->children       = $this->processChildren($form);

        $prototype = $form->getConfig()->getAttribute('prototype');
        if ($prototype) {
            $model->prototype = $this->createJsModel($prototype);
        }

        // Return self id to add it as child to the parent model
        return $model;
    }
653452
protected function overrideAlternative(FormInterface $form)
    {
        $needFlush = false;
        foreach ($this->thumbnailConfig as $format => $parameters) {
            $file = $form->get('files')->get($format)->get('file')->getData();
            if (null !== $file) {
                $media = $form->getData();
                $tmpFileName = time() . '-' . $file->getClientOriginalName();
                $file->move($this->tmpDir, $tmpFileName);
                $tmpFilePath = $this->tmpDir . DIRECTORY_SEPARATOR . $tmpFileName;
                $this->imageAlternativeStrategy->overrideAlternative($media, $tmpFilePath, $format);
               $this->objectManager->persist($media);
                $needFlush = true;
            }
        }
        if ($needFlush) {
            $this->objectManager->flush();
        }
    }
98455
protected function setForm(Doozr_Form_Service_Component_Interface_Form $form = null)
    {
        // Check for scope inject requirement
        if (null !== $form && null === $form->getName()) {
            $form->setName($this->getScope());
        }

        $this->form = $form;
    }
139591
public function render(Form $form)
    {
        $this->htmlSpecialCharsFlag = ENT_NOQUOTES;
        if (defined('ENT_HTML5')) {
            $this->htmlSpecialCharsFlag |= $this->html5 ? ENT_HTML5 : ENT_HTML401;
        }
        $this->form = $form;
        $this->form->addValues();
        return $this->renderFields($this->form->getFields());
    }
573314
public void setForm(AbstractForm form)
    {
        this.form = form;
        if(getId() == null) {
            setId(form.getId());
        }
    }
136077
public function transform(FormInterface $form)
    {
        $question = parent::transform($form);
        $question->setHidden(true);

        return $question;
    }
853601
public FormAction setValuesInForm(Form form) {
		FormAction formAction = new FormAction();
		form.setFormAction(formAction);
		this.forms.add(form);
		return formAction;
	}
638377
function($form) {
        var $form = $form, _id = null;
        if ( typeof($form) == 'undefined' ) {
            if ( typeof(this.target) != 'undefined' ) {
                _id = this.target.getAttribute('id');
            } else {
                _id = this.getAttribute('id');
            }

            $form = instance.$forms[_id]
        } else if ( typeof($form) == 'string' ) {
            _id = $form;
            _id = _id.replace(/\#/, '');

            if ( typeof(instance.$forms[_id]) == 'undefined') {
                throw new Error('[ FormValidator::resetErrorsDisplay([formId]) ] `'+$form+'` not found')
            }

            $form = instance.$forms[_id]
        }
        //reseting error display
        handleErrorsDisplay($form['target'], []);

        return $form
    }
1238863
public function getForm(string $name = '', array $form = null)
    {
        if (!isset($this->_forms[$name])) {
            $this->_forms[$name] = $this->createFormObject($name, $form);
        }

        return $this->_forms[$name];
    }
1229902
public function & SetView (\MvcCore\IView & $view) {
		parent::SetView($view);

		if (self::$appRoot === NULL) self::$appRoot = $this->request->GetAppRoot();
		if (self::$basePath === NULL) self::$basePath = $this->request->GetBasePath();
		if (self::$scriptName === NULL) self::$scriptName = ltrim($this->request->GetScriptName(), '/.');
		$app = $view->GetController()->GetApplication();
		$configClass =$app->GetConfigClass();
		self::$loggingAndExceptions = $configClass::IsDevelopment(TRUE);
		$mvcCoreCompiledMode = $app->GetCompiled();

		self::$ctrlActionKey = $this->request->GetControllerName() . '/' . $this->request->GetActionName();

		// file checking is true only for classic development mode, not for single file mode
		if (!$mvcCoreCompiledMode) self::$fileChecking = TRUE;

		// file rendering is true for classic development state, SFU app mode
		if (!$mvcCoreCompiledMode || $mvcCoreCompiledMode == 'SFU') {
			self::$fileRendering = TRUE;
		}

		if (is_null(self::$assetsUrlCompletion)) {
			// set URL addresses completion to true by default for:
			// - all package modes outside PHP_STRICT_HDD and outside development
			if ($mvcCoreCompiledMode && $mvcCoreCompiledMode != 'PHP_STRICT_HDD') {
				self::$assetsUrlCompletion = TRUE;
			} else {
				self::$assetsUrlCompletion = FALSE;
			}
		}

		self::$systemConfigHash = md5(json_encode(self::$globalOptions));

		return $this;
	}
138810
public function renderConfigForm(ActiveForm $form)
    {
        /* @var $controller \skeeks\cms\controllers\AdminCmsSiteController */
        $controller = \Yii::$app->controller;
        $object = \yii\helpers\ArrayHelper::getValue($controller->callableData, 'object');

        $model = \Yii::createObject($object);

        if (!$model)
        {
            return \Yii::t('skeeks/cms-rp-view', 'Not specified model in the widget settings');
        }

        echo $form->field($this, 'visible_properties')->widget(
            Chosen::class,
            [
                'items'     => $model->relatedPropertiesModel->attributeLabels(),
                'multiple'  => true
            ]
        );

        echo $form->field($this, 'visible_only_has_values')->radioList(\Yii::$app->formatter->booleanFormat);
    }