Returns the initial data to use for forms on this view.
978223
def get_initial(self):
        
        initial = super(ProjectCopy, self).get_initial()
        if self.copy_object:
            initial.update({'name': '%s copy' % self.copy_object.name,
                            'description': self.copy_object.description,
                            'use_repo_fabfile': self.copy_object.use_repo_fabfile,
                            'fabfile_requirements': self.copy_object.fabfile_requirements,
                            'repo_url': self.copy_object.repo_url})
        return initial
1025863
function get_submitted_data() {
        $mform =& $this->_form;

        if ($this->is_submitted()) {
            $data = $mform->exportValues();
            unset($data['sesskey']); // we do not need to return sesskey
            unset($data['_qf__'.$this->_formname]);   // we do not need the submission marker too
            if (empty($data)) {
                return NULL;
            } else {
                return (object)$data;
            }
        } else {
            return NULL;
        }
    }
932916
def first(self):
        """"""
        page = self.get_page(num_elements=1)
        data = self.extract_data(page)
        if data:
            return data[0]
929549
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);


        $this->form->setActions(\tao_helpers_form_FormFactory::getCommonActions(), 'bottom');
    }
884084
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return FormInstance(self._version, payload, form_type=self._solution['form_type'], )
655262
protected function getData()
    {
        if (empty($this->data) || !is_array($this->data)) {
            $this->init();
        }

        return $this->data;
    }
65496
private String getFormDataId(HttpServletRequest request) {

        String result = request.getParameter(CmsUgcConstants.PARAM_FORM_DATA_ID);
        return result;
    }
246237
private FormLayout initForm() {

        FormLayout form = new FormLayout();
        form.setWidth("100%");
        m_dateField = new CmsDateField();
        m_dateField.setCaption(
            CmsVaadinUtils.getMessageText(org.opencms.workplace.commons.Messages.GUI_LABEL_DATE_PUBLISH_SCHEDULED_0));
        form.addComponent(m_dateField);
        m_includeSubResources = new CheckBox(
            CmsVaadinUtils.getMessageText(org.opencms.workplace.commons.Messages.GUI_PUBLISH_MULTI_SUBRESOURCES_0));
        if (hasFolders()) {
            form.addComponent(m_includeSubResources);
        }

        return form;
    }
492211
def get_form_kwargs(self):
        
        kwargs = super(ApiFormView, self).get_form_kwargs()
        kwargs['data'] = kwargs.get('initial')
        return kwargs
1317130
def total_form_count(self):
        
        total_forms = super().total_form_count()
        if not self.data and not self.files and self.initial_form_count() > 0:
            total_forms -= self.extra
        return total_forms
980487
def _init_forms(self):
        
        super(BaseCRUDView, self)._init_forms()
        conv = GeneralModelConverter(self.datamodel)
        if not self.add_form:
            self.add_form = conv.create_form(
                self.label_columns,
                self.add_columns,
                self.description_columns,
                self.validators_columns,
                self.add_form_extra_fields,
                self.add_form_query_rel_fields,
            )
        if not self.edit_form:
            self.edit_form = conv.create_form(
                self.label_columns,
                self.edit_columns,
                self.description_columns,
                self.validators_columns,
                self.edit_form_extra_fields,
                self.edit_form_query_rel_fields,
            )
814064
def get_form_kwargs(self):
        
        kwargs = {"user": self.request.user, "initial": self.get_initial()}
        if self.request.method in ["POST", "PUT"]:
            kwargs.update({
                "data": self.request.POST,
                "files": self.request.FILES,
            })
        return kwargs
746581
def initial(self, request, *args, **kwargs):
        
        super(NodeRelationViewMixin, self).initial(request, *args, **kwargs)
        self.node = get_object_or_404(Node, **{'slug': self.kwargs['slug']})
        self.queryset = self.model.objects.filter(node_id=self.node.id)
1277855
protected function InitForm()
    {
        $this->submit = $this->LoadElement();
        
        $this->AddNameField();
        $this->AddValueField();
        
        $this->AddCssIDField();
        $this->AddCssClassField();
        $this->AddTemplateField();
        $this->AddSubmit();
    }
364207
def get_initial(self):
        """"""
        LOGGER.debug('termsandconditions.views.AcceptTermsView.get_initial')

        terms = self.get_terms(self.kwargs)
        return_to = self.request.GET.get('returnTo', '/')

        return {'terms': terms, 'returnTo': return_to}
603920
protected function initData()
    {
        if ($this->data !== null) {
            return;
        }

        if ($this->value !== null) {
            $this->data = $this->value;
            return;
        }

        if ($this->model instanceof Model) {
            $data = ($this->model->hasProperty($this->attribute) || isset($this->model->{$this->attribute}))
                ? ArrayHelper::getValue($this->model, $this->attribute, [])
                : [];

            if (!is_array($data) && empty($data)) {
                return;
            }

            if (!($data instanceof \Traversable)) {
                $data = (array) $data;
            }

            foreach ($data as $index => $value) {
                $this->data[$index] = $value;
            }
        }
    }
692634
protected function loadFormData()
    {
        parent::loadFormData();
        $this->loadMailer();

        if (isset($this->formData['gctt'])) {
            $multi = false;
            if (count($this->formData['gctt']) > 1) {
                $multi = true;
                $allLanguages = $this->util->getLocalized()->getLanguages();
            }

            $preview = $this->getPreview($this->formData['gctt']);

            $this->formData['preview_html'] = $preview['html'];
            $this->formData['preview_text'] = $preview['text'];
        }
        if (!isset($this->formData['to'])) {
            $organization = $this->mailer->getOrganization();
            $this->formData['to'] = $this->formData['from'] = $this->currentUser->getEmailAddress();
            if ($organization->getEmail()) {
                $this->formData['from'] = $organization->getEmail();
            } elseif ($this->project->getSiteEmail ()) {
                $this->formData['from'] = $this->project->getSiteEmail();
            }
        }

        $this->formData['available_fields'] = $this->mailElements->displayMailFields($this->mailer->getMailFields());
    }