English 中文(简体)
Zend Form Submission not work
原标题:Zend Form Submission not working

我正试图提交一个zen。 当我点击纽子提交表格时,表格就没有做任何事情(它也没有更新网页)。 我的网页如下:

<?php
class Form_CreateEvent extends Form_DisplayEvent
{
    public function init()
    {
     require_once( createEventInformation.php );
     require_once( createCategoryDetail.php );
     require_once( createEventDetail.php );
     require_once( createFeeDetail.php );
        require_once( createQuestionDetail.php );
     require_once( createWaiverDetail.php );

     //parent::init();
        Zend_Dojo::enableForm($this);

     $this->setDecorators(array(
      FormElements ,
     array( TabContainer , array(
      id  =>  tabContainer ,
      style  =>  width: 100%;  ,
      dijitParams  => array(
      tabPosition  =>  left ,
      doLayout  => false
     ),
     )),
      DijitForm ,
     ));        

        $this->setName( createEventForm );
        $this->setAction( /admin/createevent/ )
                     ->setMethod( post ); 
               // Create and Add Submit Button for Full Form
        $final_submit = new Zend_Dojo_Form_Element_SubmitButton( final_submit );
        $final_submit->setLabel( Save Event );
        $this->addElement($final_submit);


  //$subForm3 = new Zend_Dojo_Form_SubForm();
  $subFormEventInformation = new Form_CreateEventInformation(); // extends Zend_Form

  $subFormEventInformation->setAttribs(array(
   name    =>  eventInformation ,
   legend  =>  Event Information ,
   style  =>  height: 100% ,
   dijitParams  => array(
   title  =>  Event Information ,
  ),
  ));

  $subFormEventDetail = new Form_CreateEventDetail(); // extends Zend_Form

  $subFormEventDetail->setAttribs(array(
   name    =>  eventDetail ,
   legend  =>  Event Detail ,
   dijitParams  => array(
   title  =>  Event Detail ,
  ),
  ));

  $subFormCategoryDetail = new Form_CreateCategoryDetail(); // extends Zend_Form

  $subFormCategoryDetail->setAttribs(array(
   name    =>  categoryDetail ,
   legend  =>  Category Detail ,
   dijitParams  => array(
   title  =>  Category Detail ,
  ),
  ));

  $subFormFeeDetail = new Form_CreateFeeDetail(); // extends Zend_Form

  $subFormFeeDetail->setAttribs(array(
   name    =>  feeDetail ,
   legend  =>  Fee Detail ,
   dijitParams  => array(
   title  =>  Fee Detail ,
  ),
  ));

  $subFormQuestionDetail = new Form_CreateQuestionDetail(); // extends Zend_Form

  $subFormQuestionDetail->setAttribs(array(
   name    =>  questionDetail ,
   legend  =>  Question Detail ,
   dijitParams  => array(
   title  =>  Question Detail ,
  ),
  ));

  $subFormWaiverDetail = new Form_CreateWaiverDetail(); // extends Zend_Form

  $subFormWaiverDetail->setAttribs(array(
   name    =>  waiverDetail ,
   legend  =>  Waiver Detail ,
   dijitParams  => array(
   title  =>  Waiver Detail ,
  ),
  ));  

     $this->addSubForm($subFormEventDetail,  eventDetail )
       ->addSubForm($subFormEventInformation,  eventInformation )
       ->addSubForm($subFormCategoryDetail,  categoryDetail )
       ->addSubForm($subFormFeeDetail,  feeDetail )
       ->addSubForm($subFormQuestionDetail,  questionDetail )
       ->addSubForm($subFormWaiverDetail,  waiverDetail ); 
    }
}
?>

我有以下行政主计长:

<?php

class AdminController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function createeventAction()
    {
        $this->view->page =  createEvent ;     
     $this->view->title = "Early Signup Administration";
     $this->view->headTitle($this->view->title,  PREPEND );

     $createEventForm = new Form_CreateEvent();
      $request = $this->getRequest();   
     if ($request->isPost()) 
     {

   if( !$form->isValid($request->getPost() ) )
   {
       $this->view->form = $createEventForm;
       // renders view script
       return;
   }
   else
   {
    echo  submitted2 ;
   }
  }
  else
  {
      $this->view->form = $createEventForm;
  }
        /*if ($this->_request->isPost()) {
            $formData = $this->_request->getPost();
            if ($formData->isValid($formData)) {
                echo  success ;
                exit;
            } else {
                $createEventForm->populate($formData);
            }
        }
        else
        {
                  $this->view->form = $createEventForm;
        }     */



    }

    public function createeventinformationAction()
    {
        $this->view->page =  createEventInformation ;     
     $this->view->title = "Add Event Information";
     $this->view->headTitle($this->view->title,  PREPEND );

     $createEventInformationForm = new Form_CreateEventInformation();
  $this->view->form = $createEventInformationForm;        
    }

    public function createquestiondetailAction()
    {
        $this->view->page =  createquestiondetail ;     
     $this->view->title = "Add Question Detail";
     $this->view->headTitle($this->view->title,  PREPEND );

     $createQuestionDetailForm = new Form_CreateQuestionDetail();
     $this->view->form = $createQuestionDetailForm;        
    }

    public function createwaiverdetailAction()
    {
        $this->view->page =  createwaiverdetail ;     
     $this->view->title = "Add Waiver Detail";
     $this->view->headTitle($this->view->title,  PREPEND );

     $createWaiverDetailForm = new Form_CreateWaiverDetail();
     $this->view->form = $createWaiverDetailForm;        
    }

        public function createcategorydetailAction()
    {
        $this->view->page =  createCategoryDetail ;     
     $this->view->title = "Add Category Detail";
     $this->view->headTitle($this->view->title,  PREPEND );

     $createCategoryDetailForm = new Form_CreateCategoryDetail();
     $this->view->form = $createCategoryDetailForm;        
    }

        public function createfeedetailAction()
    {
        $this->view->page =  createFeeDetail ;     
     $this->view->title = "Add Fee Detail";
     $this->view->headTitle($this->view->title,  PREPEND );

     $createFeeDetailForm = new Form_CreateFeeDetail();
     $this->view->form = $createFeeDetailForm;        
    }

    public function createuserAction()
    {
        $this->view->page =  createUser ;     
     $this->view->title = "Add User";
     $this->view->headTitle($this->view->title,  PREPEND );

     $createUserForm = new Form_CreateUser();
     $this->view->form = $createUserForm;        
    }

 public function neweventinformationAction() 
 {
    $ajaxContext = $this->_helper->getHelper( AjaxContext );
     $ajaxContext->addActionContext( neweventinformation ,  html )->initContext();

    $idEventInformationPassed = $this->_getParam( idEventInformationPassed , null);
    $idEventInformationPassed++;
    $Form_CreateEventInformation = new Form_CreateEventInformation();
    $this->view->form = $Form_CreateEventInformation->buildBlock(array( idEventInformationPassed  => $idEventInformationPassed));
 }

}
最佳回答

表格通常为缺失或正式开标的症状:形形形;形形形;。

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签