zend-form Questions

7

Solved

I want know how to add custom attribute for option in a select field of Zend form. PHP: $option_values = array("multiOptions" => array( "US" => "United States", "CA" => "Canada", )); ...
Stannwood asked 23/3, 2011 at 6:1

3

Solved

There was a Zend_Form_Element_Multiselect in Zend Framework 1.12. How to achieve the same result in Zend Framework 2.0 ? I only see Zend\Form\Element\MultiCheckbox and Zend\Form\Element\Select
Perception asked 11/11, 2012 at 15:2

4

Solved

I am making an application using Zend Framework 2. I am validating input using it's InputFilter. Is it possible, to make some Inputs required conditionally? I mean I have code like that: $filter =...
Sickroom asked 17/11, 2012 at 17:37

4

Solved

I would like to be able to add a hidden form field using array notation to my form. I can do this with HTML like this: <input type="hidden" name="contacts[]" value="123" /> <input type="h...
Lateral asked 8/9, 2010 at 23:30

4

Solved

I have a zend form in which I have many elements. I use form on many places. I have an element of file and that is: $file= new Zend_Form_Element_File('merchantLogo'); $file->setDestination("ap...
Pyelonephritis asked 27/10, 2011 at 7:58

7

Solved

I'm trying to add a plain text node in a zend form - the purpose is to only dispay some static text. The problem is - im not aware of any such way to do it. I have used 'description' but that HA...
Gavette asked 4/3, 2010 at 17:4

1

Solved

I want to add multiple school locations in zend-form on click of anchor tag or button. So that zend form validation can be applied to all dynamically created fields Please see attached image.I want...
Trammel asked 25/9, 2018 at 4:11

8

Inside my form i define this file upload field: $this->setEnctype(Zend_Form::ENCTYPE_MULTIPART); $logo = $this->createElement('file', 'logo'); $logo->setLabel('Group logo') ->setMaxF...
Markusmarl asked 23/6, 2011 at 7:12

4

I'm trying to add a CSS class to a Zend_Form_Element_Select option, but I just can't find a way to do it. The desired output would be something like this: <select name="hey" id="hey"> <...
Turbinal asked 7/2, 2010 at 18:3

4

Solved

In the Zend view helper, there is the function url() for outputting a URL based on the routing tables eg $this->url(array('controller' => 'comments', 'action' => 'add') How can I do the...
Saker asked 5/11, 2009 at 14:13

2

Solved

I have followed an example and would like to pass the Database adapter to a fieldset to create a drop down menu. The code below is how i call the fieldset. How can i access the database adapter i...
Bechuana asked 21/1, 2017 at 17:41

2

Solved

I need a little help clearing something up with Zend_Form and adding filters to an element. Now I was under the impression that when you add a filter to the form that, when the form is posted that ...
Bemis asked 13/7, 2009 at 19:41

7

Solved

I've got a Form where the user can check a checkbox "create new address" and can then fill out the fields for this new address in the same form. Now I want to validate the fields of this new addre...
Collins asked 16/9, 2009 at 9:25

1

Solved

I need this markup for file input: <label class="col-sm-12">File upload</label> <div class="col-sm-12"> <div class="fileinput fileinput-new input-group" data-provides="filein...
Adebayo asked 6/11, 2016 at 11:27

9

Solved

I want to display a Zend Form with one of the elements shown as disabled. I'm setting the value so the user can see it, but I want to disable it so the user can't edit it. This may also involve som...
Domiciliate asked 18/11, 2009 at 20:52

6

Solved

Just wondering how it works and how to handle the information. Let's say I have a form like this: $multi = new Zend_Form_Element_Multiselect('users'); $multi->setMultiOptions(array( //'option...
Disincline asked 11/12, 2009 at 20:30

6

Solved

I'm trying to use the "exclude" option for a Db_NoRecordExists validator, cause when I'm "editing" the element it always return me back a "duplicated" error, as usual. What I aim to is to tell to ...
Gregor asked 21/3, 2011 at 14:15

7

Solved

I am adding a select element to a Zend_Form instance as follows: $user = $form->createElement('select','user')->setLabel('User: ')->setRequired(true); foreach($users as $u) { if($sele...
Cytokinesis asked 19/10, 2009 at 11:55

0

I have a pretty complex form with several nested Fieldsets and Collections. Some parts of the form are constant, other parts are variable: BasicSettings EndpointBasicSource (constant part) Endpo...

2

In my current ZF2 project I have a complex Form with multiple levels of nested Fieldsets, that reflect the structure of objects to be saved in the background. Currently the data is sent directly to...
Athletics asked 5/5, 2016 at 16:3

1

Solved

Currently, I have article and tag tables. I am trying to auto populate the "Tag" form element as a select box on the article form. What is the best way to go about setting the Value Options of the ...
Tunicate asked 16/12, 2015 at 19:56

2

Solved

Is it possible to disable individual options in a Zend_Form_Element_Radio? That is, I'd like to add disabled="disabled" to certain input tags. Does the Zend Framework include this functionality? O...
Methodism asked 8/2, 2010 at 12:43

5

Solved

By default Zend Form Text elements don't have a width specified. Textarea elements have a default of rows="24" and cols="80". But when I set a different value... $body = new Zen...
Bunche asked 22/12, 2009 at 19:37

10

Solved

Im looking for a simple bit of code that will let me add the following html into my zend form: <div id="wmd-button-bar" class="wmd-panel"></div> Thats it, it needs to be above my 'met...
Cerebrate asked 2/4, 2010 at 11:43

2

Solved

I have a moneyFieldset with 2 fields, amount and currency. class MoneyFieldset ... { public function __construct($name = null, $options = array()) { parent::__construct($name, $options); $this-...
Backdate asked 25/12, 2015 at 9:31

© 2022 - 2024 — McMap. All rights reserved.