Hi,
I want to fetch posted data. put I am using no form. the data is postet by a jquery script with method post and I would like to fetch it. I know how to fetch parameters
$id = $this->getRequest ()->getParam ( 'id', null );
and form values:
$message = $form->getValue ( 'message' );
however I want to access post data and not para...
I have a zend_form with a checkbox:
$horz = new Zend_Form_Element_Checkbox('horizontal');
$horz->setLabel('Display horizontally?');
$horz->setDecorators(array(array('ViewScript', array('viewScript' => 'partials/forms/checkbox.phtml'))));
My custom viewScript checkbox.phtml looks like this:
<?php
$name = $this->element->getName();
...
Hello !
I want to be able to add to Zend_Form many Zend_Form_Element_Select.
I've got some loop in My_Form_Selects extends Zend_Form with
$element = $this->createElement('Select', 'element[]');
$this->addElement($element);
but it creates only one select element (Zend_Form ignores [] in element's name).
How should I do this ?
...
I have an object that's an instance of a Zend_Form_Element_Radio. I'd like to customize how these radio buttons are displayed. The manual remarks
Radio elements allow you to specify several options, of which you need a single value returned. Zend_Form_Element_Radio extends the base Zend_Form_Element_Multi class, allowing you to spe...
Zend_Form action and method shows by default <form action="" method="post">
... My wish is not like that... Just be written <form> .. Is that possible ??
How can I do ???
...
Hi I'm using formRadio() to display two options with radio buttons. Example
<li><?php echo $this->formRadio('johnsmith', '1', array(), array('1' => 'Yes', '0' => 'No'), ' '); ?></li>
Getting HTML output
<li>
<label for="johnsmith-1">
<input type="radio" name="johnsmith" id="johnsmith-1" value="1" checked="checked">
Yes
...
Hello!
It's true I've seen a lot of examples on stackoverflow and many from Google search but apparently nobody showed the big picture of how things falls under one another, even from the manual itself.
I've just picked Zend Framework(1.10.8) and when creating forms I've finally found that the ViewScript for now is much easier for me...
I am using the next decorators for my input. I want to make this as table.
$this->setDecorators(array('ViewHelper','Errors',
array(array('data'=>'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'td')),
array(array('row'=>'HtmlTag'),array('tag'=>'tr'))
));
But after form validation Er...
I have tried all the combinations I can think off but this form:
class Form_Login Extends Zend_Form{
public function init(){
$this->setMethod('post');
$email = new Zend_Form_Element_Text('email');
$emailValidator = new Zend_Validate_EmailAddress();
$emailValidator->setMessage('Please use a valid em...
I'm using zend form in a non-zend project and I'm able to access Zend_Form fine from my custom class Custom_Form. Then in the file where I want to render my form, I create an instance of my form, but then I'm not sure how to render it.
$form = new Custom_Form();
//how to render the form here
var_dump($form); //var_dump looks busy so cou...
I'd like to load several form elements like Zend_Form_Element_Text with one statement. Is there a way to do this with a * wild card?
...
I'm using the following hash with a salt that says 'unique'. I'm not sure if 'unique' is a literal string or an internal zend keyword for Zend to actually generate a unique salt?
If it's just a random string I think it's better to change that, so does zend have a random string generation function that could be used to salt this sort of...
Hi,
I'm getting to grips with Zend_Form and can create a form to add/edit a single database record, but now I'm trying to create a form to edit multiple records on a single page. For example, if I had a table of sports teams, and another table of players assigned to them teams I would want to be able to click on a team on my site and ha...
All I want to do is make a form, in Zend Framework, that looks like this:
<p id="foo">
<form action="#" method="post">
<label>Start:</label>
<input id="start" type="text" name="start" />
<label>End:</label>
<input id="end" type="text" name="end" />
<input type="submit" name="submit" value="Submit" />
</form>
</p>
and I simply cann...
So the thing is I have a form in page A which is being submitted at page B.
After validating the form at page B, it should redirect back to page A and show the form with the possible errors that occurred.
What's the best way to achieve this? Is it smart to temporary put the whole form object in the session? Or is there a more elegant s...
I have tried setting up a zend site with the following directory structure :
application
-configs
-forms
-modules
-admin
-default
-controllers
-IndexController.php
-forms
-Testform.php
-layouts
-modules
-views
Then in my IndexController.php I have the follow...
Hi,
I decode my zend-form with htmlEntities. This works great, but I would like to decode the input back when I repopulate the form back to the user. Is there a way to reverse the setElementFilter in Zend?
Example:
User fills in input field with
You & me
Data placed in the database:
You & me
I get the data back from the data...
hi everyone,
I need to make the following html using Zend form and form decorators...
<ul>
<li id="containeruser1">
<label for="user1"><input type="checkbox" class="textbox" value="1" id="user1" name="users[]">User One</label>
</li>
<li id="containeruser2">
<label for="user2"><i...
If I have a form element that has multiple validators attached to it (3 in this example), how would I use addErrorMessage to create custom error messages when each unique validator fails. Is there a way to add a custom message for each validator?
$element = new Zend_Form_Element_Text()...
$element->....
->addValidator(...)
...
When I use the zend CLI to create a form, like this, a form gets generated and gets added to the forms folder.
zf create form MyForm
I have a custom class that I'd like to create a custom command for it in the same way and would like to look at the zf create form command for guidance. I suspected it to be in Zend_Framework/bin where t...