[fw-general] Zend Form/Setting id for multicheckbox fields

2013-07-08 Thread rversteeg
I use Zend Form to create a multicheckbox field. For the elements in the field I use an array $data Now,I would also like to set the "id" of each element with individual values. However, I am completely stuck with this. I tried to pass an array of ids (checkboxid0,checkboxid1 and so on) but tha

[fw-general] Zend/Form and Model Request VERSUS Model Request and html view form

2013-07-08 Thread Jose Manuel Velasco Martínez
Hello, I need to create a form, but the issue is fields are created from a database. A lot of checkboxes fields are created from a database table. Now I've created a Model, I query the database and get an array of data. This Model is called from the controller, and data are passed to the vie

Re: [fw-general] Zend\Form Collections with Doctrine

2013-05-15 Thread Ludwig Ruderstaller
Argh,... nevermind its 'target_element' => new Milestone($sm) instead of 'target_element' => array('type' => new Milestone($sm)) Am 14.05.2013 22:40, schrieb Ludwig Ruderstaller: -- Ludwig Ruderstaller http://www.cwd.at -- List: fw-general@lists.zend.com Info: http://framework.zend.com/arch

[fw-general] Zend\Form Collections with Doctrine

2013-05-14 Thread Ludwig Ruderstaller
Hi, I just cant get hydration of a one-to-many collection to work. I followed the doc at https://github.com/doctrine/DoctrineModule/blob/master/docs/hydrator.md I don't know what is wrong, and why the ServiceManager is involved. As soon as i remove the Collection from Event Fieldset, the rest of

[fw-general] Zend Form and composd objects

2013-05-13 Thread Jigal sanders
Hello Everyone, I am working on two entities: a product and a product group. In my Entities I have also put form annotations. But now I want to make sure that if I show my Product form, i will be able to select the brands with checkboxes (for example) So in my product entity I have /**

Re: [fw-general] Zend\Form\Element\DateTime problem with data format

2013-04-28 Thread David Muir
My guess is that it's because your value is outside the min/max range you've specified. 'value' would be today, 'min' would be 30 months ago, and 'max' is 18 months ago. You're subtracting 30 months from $date, then adding 1 year back to it again. You'll want to add 42 months back to it, or clon

[fw-general] Zend form isValid returns false and empty array is returned.

2013-04-03 Thread jamiemc25
Hi, I'm just wondering if someone can help me. I have a registration form like so which doesn't seem to wnt to work: setAttribute('method', 'post'); $this->add(array( 'type' => 'text', 'name' => 'title', 'options' => array(

[fw-general] Zend\Form\Element\DateTime problem with data format

2012-10-17 Thread miszyman
Hi, I'm currently migrating from ZF1 to ZF2, and I have some trouble in creating forms, one of them is I cannot properly set the date format for the DateTime element I am trying to do sth like this (i've changed it a few times but its just to get the idea) $date = new \DateTime();

[fw-general] Zend/Form/Element/Multi.php default separator

2011-10-27 Thread Mike Wright
Hi all, I have a question/observation about the default separator being set to . It seems to force radio (e.g.) buttons into a column. If the default were "" inline elements would align horizontally and in css they could be declared block and they would align vertically. This observation a

Re: [fw-general] Zend Form Element: prepend arbitrary HTML

2011-02-18 Thread Kaiuwe
Nice that the Note Element is being developed. Anyway, could you write the code WITH the DESCRIPTION DECORATOR in order to create that code? Where is the problem? // Form $form = new Zend_Form(); // Element $form->addElement( 'text', 'name', array( 'label' => 'Name',

Re: [fw-general] Zend Form Element: prepend arbitrary HTML

2011-02-18 Thread Kaiuwe
It is stupid that they don't have an easy way to prepend or append HTML code. Do you love the word "stupid"? ;) Let's say: why would I use a callback decorator OR View SCript Decorator, in order to prepend this: "[MY ELEMENT GOES HERE]href="URL">TEXT" You can use the description. Do you

Re: [fw-general] Zend Form Element: prepend arbitrary HTML

2011-02-18 Thread Andrei Iarus
ould I create a new function OR file in order add this code, and not simply say something like this:   $form->addElement('text', 'element-name', array('suffix'=>'MY-CODE-GOES-HERE'));   --- On Fri, 2/18/11, Frank DiRocco wrote: From: Frank DiRocco S

Re: [fw-general] Zend Form Element: prepend arbitrary HTML

2011-02-18 Thread Kaiuwe
Is there any SIMPLE way to add some HTML code after or before an element? What exactly do you want? For example, there is a description you can add. The description can include a link. If not, I find it stupid... simply because most developers need a standard decorator for that. Standard

Re: [fw-general] Zend Form Element: prepend arbitrary HTML

2011-02-18 Thread Frank DiRocco
On Feb 18, 2011, at 8:18 AM, Andrei Iarus wrote: > Is there any SIMPLE way to add some HTML code after or before an element? > If not, I find it stupid... simply because most developers need a standard > decorator for that. what is stupid about Zend_Form_Decorator? http://framework.zend.com/manua

[fw-general] Zend Form Element: prepend arbitrary HTML

2011-02-18 Thread Andrei Iarus
Hello,   I need to prepend some custom HTML code (an link +other things) to an element and find it difficult, because all exemples I've seen use a custom Zend_Form_Element (to create it by hand).   Is there any SIMPLE way to add some HTML code after or before an element? If not, I find it stupid.

[fw-general] Zend Form - Radio

2010-05-27 Thread Meroe Kush
I'm embarrassed to have to post this question, but I'm pulling my hair out trying to figure out how to set the stored value of a Zend form radio option. It works just fine for drop downs and fields, but the radio option is defaulting to the zend form default (last option in the array). Anyo

[fw-general] Zend form captcha element decorator problem

2010-04-19 Thread whisher
Hi, I’ve just a lot of troubles with a captcha element. The element is put to the top and the description to the end I don’t know which way to turn. Here the form class Form_Test extends Zend_Form { public function init() { $this->setMethod('post'); $this->setAttrib('enctype', 'applic

[fw-general] Zend Form adding and removing elements from controller

2010-03-15 Thread prado
I removed some elements in the controller that I created before with Zend Form object (whose class is sitting in application/forms folder). I am unable to add those elements back, seems it is not straightforward, as an example I can use $form->removeElement('active'); but can't do $form->addEleme

[fw-general] zend form

2010-02-25 Thread Apostol Victor
Hi, i have this piece of code $form_item = new Zend_Form_Element_File($item['form_name']); $form_item->setLabel($item['form_label']); $form_item->setRequired(true); $form_item->addValidator('Count', false, 1); $form_item->addValidator('Size', false, 1024000); $form_item->addValidator('Extension',

[fw-general] Zend Form Elements with name of form array[key]

2010-02-18 Thread Andrei Iarus
Hello all,   I am trying to find out, how to make ZForm to accept&to get correctly the values of a form with elements with the name of form guest[firstName], guest[lastName], guest[company].   The problem: when rendering, all elements have the name of form: guestfirstName, guestlastName, guestcomp

Re: [fw-general] Zend Form, validate/check whether extra elements have been added

2009-12-09 Thread Andrew Ballard
On Wed, Dec 9, 2009 at 6:19 AM, Andrei Iarus wrote: > > Hello, > > Is there any integrated solution (in ZF) to throw Exceptions (or simple > check), when some extra parameters have been passed to $form->validate( > $postParams ) ?? > > Should we rely on Zend Form that no extra parameters get to

[fw-general] Zend Form, validate/check whether extra elements have been added

2009-12-09 Thread Andrei Iarus
Hello,   Is there any integrated solution (in ZF) to throw Exceptions (or simple check), when some extra parameters have been passed to $form->validate( $postParams ) ??   Should we rely on Zend Form that no extra parameters get to our models?   Thanks.

Re: [fw-general] Zend Form populate method doesn't support FilteringSelect / ComboBoxes using a Dojo datastore.

2009-11-20 Thread Matthew Weier O'Phinney
-- Tridem wrote (on Friday, 20 November 2009, 04:01 AM -0800): > My problem is similar. The only solution I found so far is using Dojo with > the setUseDeclarative() method instead of the setUseProgrammatic(). > By this the Comobox or FilteringSelect starts loading the multiOptions from > the Stor

Re: [fw-general] Zend Form populate method doesn't support FilteringSelect / ComboBoxes using a Dojo datastore.

2009-11-20 Thread Tridem
My problem is similar. The only solution I found so far is using Dojo with the setUseDeclarative() method instead of the setUseProgrammatic(). By this the Comobox or FilteringSelect starts loading the multiOptions from the StoreUrl and populates it correctely. Still this isn't very pleasing. At l

Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-18 Thread Саша Стаменковић
Why do I get this dt's at all, how can I use them, they are alwayt empty? I set 'legend' => 'Something' in my display group and legend inside fieldset tag. What for do I need ? Regards, Saša Stamenković On Wed, Nov 18, 2009 at 9:04 AM, Саша Стаменковић wrote: > Aaargh, now I get invalid xhtml

Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-18 Thread Саша Стаменковић
Aaargh, now I get invalid xhtml. Will override DispalyGroup. Regards, Saša Stamenković On Wed, Nov 18, 2009 at 8:51 AM, Саша Стаменковић wrote: > Removing 'DtDdWrapper' did the job. > > Regards, > Saša Stamenković > > > > On Tue, Nov 17, 2009 at 7:53 PM, Саша Стаменковић wrote: > >> Hehum, afte

Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread Саша Стаменковић
Removing 'DtDdWrapper' did the job. Regards, Saša Stamenković On Tue, Nov 17, 2009 at 7:53 PM, Саша Стаменковић wrote: > Hehum, after this: > > ... > )->addDisplayGroup( > array( > 'brand', > 'model', > 'year_from', > '

Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread Саша Стаменковић
Hehum, after this: ... )->addDisplayGroup( array( 'brand', 'model', 'year_from', 'year_to', 'price_from', 'price_to', 'kilometer_from', 'kilometer_to'

Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread Саша Стаменковић
Naah, a little drag :) I didn't like factory methods at first, didn't like strings instead constants..., but now I just don't want to break the chain. Will do it like you said $group = $form->getDisplayGroup(' group1'); $group->removeDecorator('Label'); Thanks for the fast response! Regard

Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread Matthew Weier O'Phinney
-- umpirsky wrote (on Tuesday, 17 November 2009, 10:28 AM -0800): > I use factory method Zend_Form::addDisplayGroup() to add display group, and > it works great: > > ... > )->addDisplayGroup( > array( > 'el1', > 'el2', > ... >

[fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread umpirsky
Hi. I use factory method Zend_Form::addDisplayGroup() to add display group, and it works great: ... )->addDisplayGroup( array( 'el1', 'el2', ... 'eln' ), 'group1')... I want t

[fw-general] Zend Form Decorators - Adding id Attribute to Error output.

2009-11-17 Thread boxers999
Hi, I need to be able to hide Zend_Form errors dynamically if the user changes some options after a form fails validation. How do I inject an id attribute in to the error markup ? Some Error Message It would be good if I could specify the id when bulding the form element. I have tried things

[fw-general] zend form addError

2009-11-11 Thread Ralikwen
Hi, I am trying to add custom error to an element. The error is added fine, but its format is different from the errors that normally occure in the form. When an error occurs in the form $form->getMessages () returns an array with the error codes as the key: ["usr_passwd"] => array(3) { ["re

Re: [fw-general] Zend Form: Trying to add a Label Decorator to a DisplayGroup

2009-11-06 Thread Саша Стаменковић
Ah, wrong decorators - fixed! Regards, Saša Stamenković On Fri, Nov 6, 2009 at 9:20 AM, umpirsky wrote: > > Yes, or > > $this->addDisplayGroup( >array( >'e1', >'e2' >), >'name', >arr

Re: [fw-general] Zend Form: Trying to add a Label Decorator to a DisplayGroup

2009-11-06 Thread umpirsky
Yes, or $this->addDisplayGroup( array( 'e1', 'e2' ), 'name', array( 'displayGroupClass' => 'My_Form_DisplayGroup' ) But I get: Warning: Excepti

Re: [fw-general] zend form label column width

2009-10-07 Thread Hector Virgen
You would be better off using CSS for this. Add a class name of "label" to your td and include this style rule: form td.label{ width: 200px; } -- Hector On Wed, Oct 7, 2009 at 2:40 AM, Ralikwen wrote: > > Hi, > I can't find the way to set the columnwidht for the label when created like > t

[fw-general] zend form label column width

2009-10-07 Thread Ralikwen
Hi, I can't find the way to set the columnwidht for the label when created like this: elementDecorators.label.decorator = "Label" elementDecorators.label.decorator.tag = "td" I tried the following line, but it puts the attribute into the label tag instead of the td tag: elementDecorators.label.d

Re: [fw-general] Zend form performances

2009-09-30 Thread Саша Стаменковић
Thanks for the response Matt. My profiler says that lot of time is spent on fetching data and executing setMultiOptions on select elements. I guess caching can help. Only I'm thinking about caching strategy... Will get back after optimization... Regards, Saša Stamenković On Wed, Sep 30, 2009 a

Re: [fw-general] Zend form performances

2009-09-30 Thread Matthew Weier O'Phinney
-- umpirsky wrote (on Wednesday, 30 September 2009, 12:43 AM -0700): > I have this form: > During the form initialiation, I'm performing 2 queries to get options for > selects: > 0.00131SELECT `brand`.* FROM `brand` ORDER BY `title` ASC > 0.00082 SELECT `location`.* FROM `locatio

[fw-general] Zend form performances

2009-09-30 Thread umpirsky
Hi. I have this form: class Automobili_Form_Search extends Zend_Form { /** * Constructor. * * @param mixed $options */ public function __construct($options = null) { parent::__construct($options); // Add brand

Re: [fw-general] Zend Form Element PluginLoader for Validators

2009-09-24 Thread Matthew Weier O'Phinney
-- Benjamin Eberlei wrote (on Thursday, 24 September 2009, 04:37 PM +0200): > I want to use non-Zend validators for my elements and use the array options > notation to build my form, > where i realized that i can't really set the plugin loaders for the > validators of each field. > However while b

[fw-general] Zend Form Element PluginLoader for Validators

2009-09-24 Thread Benjamin Eberlei
Hello everyone, I want to use non-Zend validators for my elements and use the array options notation to build my form, where i realized that i can't really set the plugin loaders for the validators of each field. However while browsing through the code I saw that every element creates its own plu

Re: [fw-general] Zend Form Grouping Elements

2009-08-18 Thread skorp
have the same error message Message: Plugin by name 'DivWrapper' was not found in the registry; used paths: ZendX_JQuery_Form_Decorator_: ZendX/JQuery/Form/Decorator/ Zend_Form_Decorator_: Zend/Form/Decorator/ it's not searching in the direcotory which i add with addelementprefixpath. has anyo

[fw-general] Zend Form - Remove class="required" or class="optional" from label tag

2009-07-29 Thread holografix .
Hi When defining form elements as required or not, the output is something like this: Header Header Is it possible to remove the required or optional and set them with another values ? Cheers holo

Re: [fw-general] Zend Form: Trying to add a Label Decorator to a DisplayGroup

2009-07-27 Thread Tim Fletcher
It took me long time to work out that in order to subclass Zend_Form_DisplayGroup, you must set the class appropriately. If you're creating your form by subclassing Zend_Form you should use : $this->setDefaultDisplayGroupClass('App_Form_DisplayGroup'); -- View this message in context: http://w

[fw-general] Zend Form Dojo - DateBox default value current date

2009-07-21 Thread jigen7
Hi i have problem how to display the current date in a dojo-datebox , as it will change dynamically everyday. i tried setting it up like this but it does not display/blank anything $this->addElement( 'DateTextBox', 'startdate', array(

[fw-general] Zend Form SubForms difficulties

2009-07-19 Thread borgsquad
I hope some of you experts out there could help me out on this. I'm kind of new to Zend Form SubForm and have not been able to comprehend with the concept of this component. Tried googling and hasn't stumbled upon any helpful websites to improve my understanding over it. Here's what I'm trying t

Re: [fw-general] Zend Form - _forward() and submit questions

2009-07-17 Thread Bart McLeod
_getAllParams() ? magrytos1 schreef: Thanks Matthew, your answer helped me a lot. Although I have another question. When I'm passing an array in _forward(), how can I get this array in action, were forward sent me. Thx Matthew Weier O'Phinney-3 wrote: -- magrytos1 wrote (on Thursday, 1

Re: [fw-general] Zend Form - _forward() and submit questions

2009-07-17 Thread magrytos1
Thanks Matthew, your answer helped me a lot. Although I have another question. When I'm passing an array in _forward(), how can I get this array in action, were forward sent me. Thx Matthew Weier O'Phinney-3 wrote: > > -- magrytos1 wrote > (on Thursday, 16 July 2009, 02:19 AM -0700): >> I ha

[fw-general] zend form errors in new column

2009-07-16 Thread Ralikwen
Hi, I am struggling to put the error messages of a zend form into a new column - wrapping it in a td tag. I tried: elementDecorators.errors.decorator = "Errors" elementDecorators.errors.options.tag="td" but it creates this markup Value is empty, but a non-empty value is required '' was not foun

Re: [fw-general] Zend Form - _forward() and submit questions

2009-07-16 Thread Matthew Weier O'Phinney
-- magrytos1 wrote (on Thursday, 16 July 2009, 02:19 AM -0700): > I have an action like that: > > public function addAction() > { > $this->view->title = "Add Request"; > $this->view->headTitle($this->view->title, 'PREPEND'); > > $form = new Form_Add(); >

[fw-general] Zend Form - _forward() and submit questions

2009-07-16 Thread magrytos1
Hi! I have an action like that: public function addAction() { $this->view->title = "Add Request"; $this->view->headTitle($this->view->title, 'PREPEND'); $form = new Form_Add(); $this->view->form = $form; if ($this->getRequest()->isPost

Re: [fw-general] Zend Form - setAction()

2009-07-10 Thread magrytos1
OK, maybe it wasn't exactly what I was looking for. Now I have another problem. I made somehing like this: public function addAction() { $this->view->title = "Add Request"; $this->view->headTitle($this->view->title, 'PREPEND'); $form = new Form_Add();

Re: [fw-general] Zend Form - setAction()

2009-07-10 Thread magrytos1
This is exactly what I was looking for. thank you Bart McLeod wrote: > > are you looking for $this->_forward('critere'); after your submit action > has completed? > > -Bart > > magrytos1 schreef: >> Hi. >> >> I have action add and a form for this action. After click on submit >> button i >>

Re: [fw-general] Zend Form - setAction()

2009-07-10 Thread Bart McLeod
are you looking for $this->_forward('critere'); after your submit action has completed? -Bart magrytos1 schreef: Hi. I have action add and a form for this action. After click on submit button i want to add a data that I chose to my database and also I want to go to the next page of my form 'c

[fw-general] Zend Form - setAction()

2009-07-10 Thread magrytos1
Hi. I have action add and a form for this action. After click on submit button i want to add a data that I chose to my database and also I want to go to the next page of my form 'critere'. When i put setAction('critere'); in my form add form, after pushing submit button it goes to form criter

[fw-general] Zend Form Error Decorators

2009-06-22 Thread kwylez
I have my current form setup to use a table layout without any issues except for when I try to apply my Error decorators. Before the form is submitted the form should look like: 1. Your Email Address* We guarantee we won't spam you . if an error needs to be displ

Re: [fw-general] Zend Form, JQuery, File_Element and ViewScript decorator.

2009-06-16 Thread Thomas Weidner
hmała" To: "Zend Framework General" Sent: Tuesday, June 16, 2009 10:58 AM Subject: [fw-general] Zend Form, JQuery, File_Element and ViewScript decorator. Hi. Performance of Zend Form with 300 fileds it's very low, so I think to use viewscript decorator. How use it with

[fw-general] Zend Form, JQuery, File_Element and ViewScript decorator.

2009-06-16 Thread Paweł Chuchmała
Hi. Performance of Zend Form with 300 fileds it's very low, so I think to use viewscript decorator. How use it with jquery elements and File element? If i create view scripts like in documentation and apply to alle elements I have warnings: Warning: Cannot render jQuery form element without at le

[fw-general] Zend Form Validators and their options

2009-04-21 Thread J DeBord
In the code below I have added the EmailAddress validator. In the case of this validator and the others, where can I find out what options I am able to pass to them? For example 'validators' => array(array('EmailAddress', false, array('WHAT OPTIONS CAN I PUT HERE?))), $this->addElement('text', 'e

Re: [fw-general] Zend Form Performance

2009-04-09 Thread Matthew Weier O'Phinney
hit you. Stripping out the require_once calls and using autoloading, as recommended in the performance guide, can have dramatic effects on performance. Additionally ALWAYS use an opcode cache in production, as this will give you even better results. > --- On Thu, 4/9/09, Mon Zafra wrote: >

Re: [fw-general] Zend Form Performance

2009-04-09 Thread till
On Thu, Apr 9, 2009 at 4:27 PM, Andrei Iarus wrote: > (...) > I just dont understand: is autoloader faster that a lot of require_once? It all depends! require_once evaluates and double-checks that the file you are including has not been included before. In contrast to include_once, require_once

Re: [fw-general] Zend Form Performance

2009-04-09 Thread Andrei Iarus
autoloader faster that a lot of require_once? --- On Thu, 4/9/09, Mon Zafra wrote: From: Mon Zafra Subject: Re: [fw-general] Zend Form Performance To: fw-general@lists.zend.com Date: Thursday, April 9, 2009, 4:47 PM On Thu, Apr 9, 2009 at 6:06 PM, keith Pope wrote: Also read the perform

Re: [fw-general] Zend Form Performance

2009-04-09 Thread Mon Zafra
On Thu, Apr 9, 2009 at 6:06 PM, keith Pope wrote: > > Also read the performace guide see if there is anything in there that > might help you :) > -- > -- > [MuTe] >

Re: [fw-general] Zend Form Performance

2009-04-09 Thread keith Pope
2009/4/9 till : > On Thu, Apr 9, 2009 at 11:11 AM, Andrei Iarus wrote: >> Hello everyone, >> >> I have noticed that Zend Form part of Framework is being executed extremely >> slow. Comparing to the same form being implented with no framework, here are >> the results (the layout part load time is a

Re: [fw-general] Zend Form Performance

2009-04-09 Thread keith Pope
Hi, You may want to read this: http://ishouldbecoding.com/2008/11/05/scaling-zend_form http://ishouldbecoding.com/2009/04/03/zend_form-and-zend_loader_pluginloader-snafu Though this is really for large forms, I have similar forms to what you describe with no problems. 2009/4/9 Andrei Iarus : >

Re: [fw-general] Zend Form Performance

2009-04-09 Thread till
On Thu, Apr 9, 2009 at 11:11 AM, Andrei Iarus wrote: > Hello everyone, > > I have noticed that Zend Form part of Framework is being executed extremely > slow. Comparing to the same form being implented with no framework, here are > the results (the layout part load time is also included here, for

[fw-general] Zend Form Performance

2009-04-09 Thread Andrei Iarus
Hello everyone,   I have noticed that Zend Form part of Framework is being executed extremely slow. Comparing to the same form being implented with no framework, here are the results (the layout part load time is also included here, for both columns):   Just loading the form (no submit): with fr

Re: [fw-general] Zend Form - Non Form Field Element

2009-04-06 Thread Daryl Handley
Keith, I've been following that series closely. I'm hoping to do this without writing a custom decorator for an element as I'd like the option to omit the the form field this non form element might be related to. For example, if a user were allowed three attachments per node/form, the actual

Re: [fw-general] Zend Form - Non Form Field Element

2009-04-06 Thread keith Pope
What about a callback or viewHelper decorator? 2009/4/6 James Stuart : > Keith, > > I've been following that series closely.  I'm hoping to do this without > writing a custom decorator for an element as I'd like the option to omit the > the form field this non form element might be related to.  Fo

Re: [fw-general] Zend Form - Non Form Field Element

2009-04-06 Thread James Stuart
Keith, I've been following that series closely. I'm hoping to do this without writing a custom decorator for an element as I'd like the option to omit the the form field this non form element might be related to. For example, if a user were allowed three attachments per node/form, the actual fil

Re: [fw-general] Zend Form - Non Form Field Element

2009-04-06 Thread keith Pope
You may want to look at Matthews Zend_Form series on his blog, heres the latest: http://weierophinney.net/matthew/archives/213-From-the-inside-out-How-to-layer-decorators.html 2009/4/6 James Stuart : > Hi, > > Has anyone ever tried to insert a non form field element into Zend Form? > > I have a f

[fw-general] Zend Form - Non Form Field Element

2009-04-06 Thread James Stuart
Hi, Has anyone ever tried to insert a non form field element into Zend Form? I have a form that includes file uploads and I need to cause the uploaded files to be listed inside the form after they have been added, much like a webmail application. I can do that using Javascript by finding the pare

Re: [fw-general] Zend Form Element Regex problem?

2009-04-02 Thread Matthew Weier O'Phinney
-- Andrei Iarus wrote (on Thursday, 02 April 2009, 09:47 AM -0700): > Hello, > > After deploying ZF 1.7.8 (Minimal), and creating a form with a Form Element of > Regex type, I get the following error: > Fatal error: Cannot unset string offsets in > C:\wamp\www\my-project\library\Zend > \Form\El

Re: [fw-general] Zend Form Element Regex problem?

2009-04-02 Thread Andrei Iarus
I have noticed that, removing the required validator ('required' => true, ), it works. Anyway, is this a bug? --- On Thu, 4/2/09, Andrei Iarus wrote: From: Andrei Iarus Subject: [fw-general] Zend Form Element Regex problem? To: fw-general@lists.zend.com Date: Thursday, April 2,

[fw-general] Zend Form Element Regex problem?

2009-04-02 Thread Andrei Iarus
Hello,   After deploying ZF 1.7.8 (Minimal), and creating a form with a Form Element of Regex type, I get the following error: Fatal error: Cannot unset string offsets in C:\wamp\www\my-project\library\Zend\Form\Element.php on line 2004 I use this:   $email = $this->addElement('text', 'email', a

[fw-general] Zend Form Question

2009-03-18 Thread Thomas Shaw
In my ModuleEditForm.php I create a select by initializing a new Zend Table object like below. My problem is I need to narrow down my getModuleSelectData result by a given module_id. Is there an easy way to do this I've tried creating setters and getters for both objects to pass the module_id in so

Re: [fw-general] Zend Form Element Layout

2009-03-13 Thread Matthew Weier O'Phinney
-- GirishK wrote (on Thursday, 12 March 2009, 11:41 PM -0700): > I have to design a form in Zend. The form layout should be similar to this > > Login Details > username > password > confirm password > country state < STATE COMBO BOX> > ciy > > So as you can see, first 3 elements are 'one el

[fw-general] Zend Form Element Layout

2009-03-12 Thread GirishK
Hi all, I have to design a form in Zend. The form layout should be similar to this Login Details username password confirm password country state < STATE COMBO BOX> ciy So as you can see, first 3 elements are 'one element per row', next 2 elements are '2 elements per row' and then again 'on

Re: [fw-general] Zend Form and navigating away - data lost

2009-03-09 Thread Lucas Corbeaux
If you really want to prevent all users errors inside your forms (as it's not always a good idea, but we don't always have the choice to decide), I see two ways to solve the problem : - Avoid the external links on your forms if possible, or warning user that his data will be lost (not really s

[fw-general] Zend Form and navigating away - data lost

2009-03-08 Thread gibler
Is there a way of keeping unsaved data i.e not yet submitted for a zend form? I've discovered that users are navigating (by following links on the webpage that has the form) away and when they use the back button to get back to the form, they get a nice empty form showing. My controller logic is

Re: [fw-general] Zend Form - Setting element required based on a condition

2009-02-19 Thread jkendall
danielito24 wrote: > > . . . if you really implement the preValidation-method - I don't see any > reason left to implementing the CustomValidator 'FieldDepends' at all. > > You could implement the whole dependency-issue in the preValidation method > too, because the general usage is lost anyw

Re: [fw-general] Zend Form - Setting element required based on a condition

2009-02-19 Thread danielito24
jkendall wrote: > > I had some of the same reservations about adding a preValidation() call to > my controller, but in the end I decided the explicit call was the best way > to go. Hm. I really spend some time dealing with this issue and came to the conclusion, that - if you really implement th

Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-31 Thread Bertil Wergelius
This solved my (as yet unanswered) question: http://www.nabble.com/Zend_Form-validation-when-2-forms-td21747325.html Which actually was about radiobuttons and conditional required field validation. A heartfelt thank you Jeremey Kendall /Bertil Wergelius 2009/1/22 jkendall : > > > Martin Martinov-

Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread jkendall
Colin J wrote: > > I'm on a mission at the moment to keep the controller as clean as > possible, so I was trying to find a way of not having to call anything but > $form->isValid from the controller. If I could somehow hook your > $form->preValidation call into any calls that a form isValid t

Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread Colin J
jkendall wrote: > > I second Martin's suggestion. > > I wrote up how I dealt with this at > http://www.jeremykendall.net/2008/12/24/conditional-form-validation-with-zend_form/ > > Good luck. > > Jeremy, I read your post, it was very useful, thank you. I'm on a mission at the moment to keep

Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread Colin J
Martin Martinov-2 wrote: > > > I don't see anything wrong with your approach but I'm not an expert too > ;-) > However, I believe that the recommended way of doing this is by > creating a custom validator and utilizing the $context parameter. > Take a look at this page in the manual > http://fr

Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread jkendall
Martin Martinov-2 wrote: > > However, I believe that the recommended way of doing this is by > creating a custom validator and utilizing the $context parameter. > I second Martin's suggestion. I wrote up how I dealt with this at http://www.jeremykendall.net/2008/12/24/conditional-form-validat

Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread Martin Martinov
2009/1/22 Colin J : > > Hi > > Just wanted to check whether this was being done the 'right' way and welcome > any feedback. I would like to set a field to be required based on a certain > condition, for example, if a form has a 'How would you like to be > contacted?' dropdown (of Post or Email) an

[fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread Colin J
Hi Just wanted to check whether this was being done the 'right' way and welcome any feedback. I would like to set a field to be required based on a certain condition, for example, if a form has a 'How would you like to be contacted?' dropdown (of Post or Email) and the user selects 'Email' then

Re: [fw-general] Zend Form Order and Jira

2009-01-22 Thread Matthew Weier O'Phinney
-- Arthur M. Kang wrote (on Wednesday, 21 January 2009, 02:21 PM -0800): > Also, wouldn't it be a lot more flexible to have the "order" be a float rather > than an int? If you create a form with two elements (order 4, and order 5), > just to insert another element to be displayed between the two

Re: [fw-general] Zend Form Order and Jira

2009-01-21 Thread Giorgio Sironi
2009/1/21 Arthur M. Kang > I don't see any options to create issues or add comments in the issue > tracker. I do have a registered account, and I do remember being able to do > so in the past. Has something changed? > > Many user are having problems: Wil Sinclair has wrote in this mailing list

[fw-general] Zend Form Order and Jira

2009-01-21 Thread Arthur M. Kang
I don't see any options to create issues or add comments in the issue tracker. I do have a registered account, and I do remember being able to do so in the past. Has something changed? Also, wouldn't it be a lot more flexible to have the "order" be a float rather than an int? If you create

Re: [fw-general] Zend Form Helpers and configs

2009-01-16 Thread Matthew Weier O'Phinney
-- Bob O wrote (on Thursday, 15 January 2009, 01:24 PM -0800): > I was wondering if someone could point me in the right direction to pull > elements from a config file and plug them into form helpers.. > > Currently i have the form.ini file, and am able to pull from that file > through the contro

[fw-general] Zend Form Helpers and configs

2009-01-15 Thread Bob O
Hello, I was wondering if someone could point me in the right direction to pull elements from a config file and plug them into form helpers.. Currently i have the form.ini file, and am able to pull from that file through the controller and into the views. but I am putting them into standard tags

Re: [fw-general] zend form, sub forms and submit element

2009-01-14 Thread qba_rox
the problem is i dont want to use viewscript, because my jquery decorator wont be working I guess, any one can fix my approach? swilhelm wrote: > > Coincidentally, I was testing subforms on Monday. Here is a somewhat > contrived login form created from two subforms. > > I took a slightly diff

Re: [fw-general] zend form, sub forms and submit element

2009-01-14 Thread swilhelm
Coincidentally, I was testing subforms on Monday. Here is a somewhat contrived login form created from two subforms. I took a slightly different approach in that I wanted the form and subforms created by config files and I am using a form viewscript to render the form. Code fragments below. Ho

[fw-general] zend form, sub forms and submit element

2009-01-14 Thread qba_rox
HI I have one main form, and two sub forms, and I want to have a common submit button. But it really doesnt display that button after render action. got: $this->setDecorators(array( 'FormElements', array('TabContainer', array(

Re: [fw-general] Zend Form, Groups and decorators, how to ?

2009-01-11 Thread atay
thanks a lot, realy thanks, I modyfy Your decorators and I have my own :) I wanted to have all input forms in one so I modyfy Your decorators. If someone want to use it, here is: - public $_groupDecoratorLeft = array( 'ViewHelper',

Re: [fw-general] Zend Form, Groups and decorators, how to ?

2009-01-11 Thread PHPScriptor
I did some quick research and tests. It's not 100% but it gives you the structure you want. 1. Problem is that you can't use openOnly on the Label. It 'll always close the tag after the label. And that the label must have a tag. Why? Don't know. But that's why I setted it between 'div'. 2. I use

  1   2   >