[Zend1.x] Forms - IN - Session

For programming and general questions on Zend Framework

[Zend1.x] Forms - IN - Session

Postby yass8250 on Mon May 22, 2017 1:58 pm

Hi,

I'm new on Zend development, I'm working on Zend 1.x
I try to store in the session my form to get redirected if the user have errors..
I just do :
Code: Select all
/ Save form in session namespace
$formSession = new \Zend_Session_Namespace(get_class($this));
$formSession->form = $form;


And when I get my form I have this return value from my Zend_Form_Decorator_FormElements:
Code: Select all
string(2316) "<form enctype="application/x-www-form-urlencoded" action="/mocontroller/process" method="post"></form>
<div><li class="hidden"></li>
<input type="hidden" name="__redirect_invalid" value="/module/controller/add" id="__redirect_invalid"></div>
<div><li class="hidden"></li>
<input type="hidden" name="__validation_type" value="add" id="__validation_type"></div>
<div><label for="monmodel" class="desc optional">Model</label>
<li></li>
<div><label for="description" class="desc optional">Description</label>
<li></li>
<input type="text" name="description" id="description" value="" class="field text full"></div>
<div><li class="hidden"></li>
<input type="hidden" name="id" value="" id="id"></div>
<div><label for="port" class="desc optional"> Address</label>
<li></li>
<input type="text" name="ip" id="ip" value="" class="field text full"></div>
<div><label for="name" class="desc required">Name *</label>
<div><li class="buttons"></li>
<input type="submit" name="submit" id="submit" value="Save" class="ui-state-default ui-corner-all float-right ui-button"></div>
<div><label for="type" class="desc required">Type *</label>




Thanks for you watching.
yass8250
 
Posts: 2
Joined: Mon May 22, 2017 1:52 pm

Re: [Zend1.x] Forms - IN - Session

Postby yass8250 on Mon May 22, 2017 3:36 pm

My question is ..

I need to serialize and unserialize my form

I just want to redirect the user with error in the form and also populate it..
yass8250
 
Posts: 2
Joined: Mon May 22, 2017 1:52 pm


Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 2 guests