Skip to main content
added 56 characters in body
Source Link
VAShhh
  • 3.5k
  • 2
  • 26
  • 40

I think you must use the isValid() before accessing the values of a submitted form, because it's right there that the values are checked and valorized

public function submitformAction() {

public function submitformAction() { $form = new Form_MyForm();  $request = $this->getRequest();   if ( $request->isPost() ) {   if ($form->isValid( $request->getPost() )) {   $values = $form->getValues();   print_r($values);die();   }   } else {   echo 'Invalid Form';   } } 

}

I think you must use the isValid() before accessing the values of a submitted form, because it's right there that the values are checked and valorized

public function submitformAction() {

$form = new Form_MyForm(); $request = $this->getRequest(); if ( $request->isPost() ) { if ($form->isValid( $request->getPost() )) { $values = $form->getValues(); print_r($values);die(); } } else { echo 'Invalid Form'; } 

}

I think you must use the isValid() before accessing the values of a submitted form, because it's right there that the values are checked and valorized

public function submitformAction() { $form = new Form_MyForm();  $request = $this->getRequest();   if ( $request->isPost() ) {   if ($form->isValid( $request->getPost() )) {   $values = $form->getValues();   print_r($values);die();   }   } else {   echo 'Invalid Form';   } } 

I think you must use the isValid() before accessing the values of a submitted form, because it's right there that the values are checked and valorized

public function submitformAction() {

$form = new Form_MyForm(); $request = $this->getRequest(); if ( $request->isPost() ) { if ($form->isValid($_POST $request->getPost() )) { $values = $form->getValues(); print_r($values);die(); } } else { echo 'Invalid Form'; } 

}

I think you must use the isValid() before accessing the values of a submitted form, because it's right there that the values are checked and valorized

public function submitformAction() {

$form = new Form_MyForm(); $request = $this->getRequest(); if ( $request->isPost() ) { if ($form->isValid($_POST)) { $values = $form->getValues(); print_r($values);die(); } } else { echo 'Invalid Form'; } 

}

I think you must use the isValid() before accessing the values of a submitted form, because it's right there that the values are checked and valorized

public function submitformAction() {

$form = new Form_MyForm(); $request = $this->getRequest(); if ( $request->isPost() ) { if ($form->isValid( $request->getPost() )) { $values = $form->getValues(); print_r($values);die(); } } else { echo 'Invalid Form'; } 

}

Post Undeleted by VAShhh
added 272 characters in body
Source Link
VAShhh
  • 3.5k
  • 2
  • 26
  • 40

You dont have to do a new Form_MyForm(); but ratherI think you must use the getFormisValid() methodbefore accessing the values of a submitted form, because it's right there that the values are checked and valorized

public function submitformAction() {

//Inside$form your= submitformActionnew Form_MyForm(); $form$request = $this->getForm>getRequest(); if ( $request->isPost() ) {  if ($form->isValid($_POST)) { //form is valid and valorized $values = $form->getValues();  print_r($values);die(); }   } else { echo 'Invalid Form'; } 

}

You dont have to do a new Form_MyForm(); but rather use the getForm() method

//Inside your submitformAction $form = $this->getForm(); if ($form->isValid($_POST)) { //form is valid and valorized } 

I think you must use the isValid() before accessing the values of a submitted form, because it's right there that the values are checked and valorized

public function submitformAction() {

$form = new Form_MyForm(); $request = $this->getRequest(); if ( $request->isPost() ) {  if ($form->isValid($_POST)) {  $values = $form->getValues();  print_r($values);die(); }   } else { echo 'Invalid Form'; } 

}

Post Deleted by VAShhh
Source Link
VAShhh
  • 3.5k
  • 2
  • 26
  • 40
Loading