GET /contact_forms/new
 GET /contact_forms/new.xml
167674
def new
      @contact_form = Cmtool::ContactForm.new

      respond_to do |format|
        format.html # new.html.erb
        format.xml  { render xml: @contact_form }
      end
    end
1335273
public function getContactEvents($contactId, $search = '', $start = 0, $limit = 0, $orderBy = '', $orderByDir = 'ASC')
    {
        $parameters = array(
            'search'        => $search,
            'start'         => $start,
            'limit'         => $limit,
            'orderBy'       => $orderBy,
            'orderByDir'    => $orderByDir,
        );

        $parameters = array_filter($parameters);

        return $this->makeRequest($this->endpoint.'/contact/'.$contactId, $parameters);
    }
79269
def newDoc(version):
    
    ret = libxml2mod.xmlNewDoc(version)
    if ret is None:raise treeError('xmlNewDoc() failed')
    return xmlDoc(_obj=ret)
317440
def create
      @question_sheet = QuestionSheet.new_with_page
      
      respond_to do |format|
        if @question_sheet.save
          format.html { redirect_to admin_question_sheet_path(@question_sheet) }
          format.xml  { head :created, :location => admin_question_sheet_path(@question_sheet) }
        else
          format.html { render :action => "new" }
          format.xml  { render :xml => @question_sheet.errors.to_xml }
        end
      end
    end
520902
def new(self, request):
        """"""
        form = (self.form or generate_form(self.model))()

        return self._render(
            request = request,
            template = 'new',
            context = {
                'form': form
            },
            status = 200
        )
590847
protected function formUserInfo()
	{
		$form = new XmlFormCollection($this->_context, $this->_url, $this->_myWords->Value("UPDATETITLE"));
		$this->_paragraph->addXmlnukeObject($form);		
		
		$hidden = new XmlInputHidden("action", "update");
		$form->addXmlnukeObject($hidden);
		
		$labelField = new XmlInputLabelField($this->_myWords->Value("LABEL_LOGIN"), $this->_user->getField($this->_users->getUserTable()->username));
		$form->addXmlnukeObject($labelField);
		
		$textBox = new XmlInputTextBox($this->_myWords->Value("LABEL_NAME"), "name",$this->_user->getField($this->_users->getUserTable()->name));
		$form->addXmlnukeObject($textBox);
		
		$textBox = new XmlInputTextBox($this->_myWords->Value("LABEL_EMAIL"), "email", $this->_user->getField($this->_users->getUserTable()->email));
		$form->addXmlnukeObject($textBox);
		
		$button = new XmlInputButtons();
		$button->addSubmit($this->_myWords->Value("TXT_UPDATE"),"");
		$form->addXmlnukeObject($button);
	}
798809
public function newAction() {
        $entity = new Block();
        $form = $this->createCreateForm($entity);

        return array(
            'entity' => $entity,
            'form' => $form->createView(),
        );
    }
1216326
private function dispatchContextCreate()
    {
        $event = new ContactLedgerContextEvent(
            $this->campaign, $this->contactSource, $this->status, 'New contact is being created', $this->contact
        );
        $this->dispatcher->dispatch(
            'mautic.contactledger.context_create',
            $event
        );
    }
1184893
public function newAction()
    {
        $productitemfield = new ProductItemField();
        $form = $this->createForm($this->get("amulen.shop.form.product.item.field"), $productitemfield);

        return array(
            'productitemfield' => $productitemfield,
            'form' => $form->createView(),
        );
    }
752796
def create_contact(self, *args, **kwargs):
        """"""
        url = 'contacts.json'
        contact_data = {
            'active': True,
            'helpdesk_agent': False,
            'description': 'Freshdesk Contact'
        }
        contact_data.update(kwargs)
        payload = {
            'user': contact_data
        }

        return Contact(**self._api._post(url, data=payload)['user'])
708299
def rest_xml
      doc = REXML::Document.new # JSS::APIConnection::XML_HEADER
      obj = doc.add_element RSRC_OBJECT_KEY.to_s

      obj.add_element('name').text = name
      obj.add_element('name_id').text = name_id
      obj.add_element('source_id').text = source_id

      notifs = obj.add_element 'notifications'
      notifs.add_element('web_notification').text = web_notification?.to_s
      notifs.add_element('email_notification').text = email_notification?.to_s

      add_changed_pkg_xml obj unless @changed_pkgs.empty?

      add_category_to_xml doc
      add_site_to_xml doc

      doc.to_s
    end
1041965
def index
      @contacts = Contact.all
  
      respond_to do |format|
        format.html # index.html.erb
        format.json { render json: @contacts }
      end
    end
1354611
def file_new(input_params={}, always_retry=True, **kwargs):
    
    input_params_cp = Nonce.update_nonce(input_params)
    return DXHTTPRequest('/file/new', input_params_cp, always_retry=always_retry, **kwargs)
761762
def new
      @page = ::Page.new

      respond_to do |format|
        format.html # new.html.erb
        format.xml  { render :xml => @page }
      end
    end
795372
public function AddForm() {
		$classes = ClassInfo::subclassesFor(self::$tree_class);
		array_shift($classes);

		foreach ($classes as $key => $class) {
			if (!singleton($class)->canCreate())
				unset($classes[$key]);
			$classes[$key] = FormField::name_to_label($class);
		}

		$fields = new FieldList(
			new HiddenField("ParentID"),
			new HiddenField("Locale", 'Locale', i18n::get_locale()),
			$type = new DropdownField("ProviderType", "", $classes)
		);
		$type->setAttribute('style', 'width:150px');

		$actions = new FieldList(
			FormAction::create("addprovider", _t('ExternalContent.CREATE', "Create"))
				->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept')
				->setUseButtonTag(true)
		);

		$form = new Form($this, "AddForm", $fields, $actions);

		$form->addExtraClass('cms-edit-form ' . $this->BaseCSSClasses());
		$this->extend('updateEditForm', $form);

		return $form;
	}
900267
public function newAction()
    {
        $entity = new Menu();
        $form = $this->createCreateForm($entity);

        return array(
            'entity' => $entity,
            'form' => $form->createView(),
        );
    }
452685
public function newAction()
    {
        $entity = new Tag();
        $form   = $this->createForm(new TagType(), $entity);

        return array(
            'entity' => $entity,
            'form'   => $form->createView(),
        );
    }