Re: [fw-general] Zend_Form textarea quoting issue

2012-11-19 Thread Alayn Gortazar
- Mensaje original - I have a form that only has one textarea and one submit button (no filters and no validators). So far I haven't added any functionality to it but as I was trying it I noticed that quotes get added incrementally with every submit on the rendered textarea's

Re: [fw-general] Zend_Form textarea quoting issue

2012-11-19 Thread Julian Vidal
Hi, Alayn, Yep, they're off. :( On Mon, Nov 19, 2012 at 5:09 AM, Alayn Gortazar al...@irontec.com wrote: - Mensaje original - I have a form that only has one textarea and one submit button (no filters and no validators). So far I haven't added any functionality to it but as I

[fw-general] Zend_Form textarea quoting issue

2012-11-18 Thread Julian Vidal
I have a form that only has one textarea and one submit button (no filters and no validators). So far I haven't added any functionality to it but as I was trying it I noticed that quotes get added incrementally with every submit on the rendered textarea's content. If I enter a single quote, the

[fw-general] Zend_Form + subforms and setBelongsTo(x)

2011-11-24 Thread Fernando Andre
Hello, I'm having a problem with Zend_Form trying to set up a group of Text boxs + combo box I whant to set a group like Service[0] [typeofservice] = XXX; Service[0] [numberofservice] = XXX; Service[0] [typeofservice2] = XXX; Service[0] [numberofservice2] = XXX; Service[1] [typeofservice]

Re: [fw-general] Zend_Form and getValidValues

2011-09-19 Thread Konr Ness
I don't think getValidValues() is the right method for your needs. When you call isValid($data) on a form, the form elements are populated and validated. getValidValues() is expecting a parameter of $data as well, but in looking through the code it looks like it passes on values that don't exist

RE: [fw-general] Zend_Form and getValidValues

2011-09-19 Thread Sergio Rinaudo
you cannot see it. However, thank you for your answer, is always good to have some good advice from a friend! Regards Sergio Rinaudo Date: Mon, 19 Sep 2011 14:11:14 -0500 Subject: Re: [fw-general] Zend_Form and getValidValues From: konrn...@gmail.com To: kaiohken1...@hotmail.com CC

[fw-general] Zend_Form and getValidValues

2011-09-15 Thread Sergio Rinaudo
Hello Everyone, I am a bit confused with the getValidValues method of Zend_Form. I am using ZF 1.11.10. I'll explain my problem: I'm trying to get all the valid values of the $data array. $isValid = $form-isValid( $data ); if( $isValid ) { $validValues =

Re: [fw-general] Zend_Form: adding css class attrib to select option elements

2011-07-25 Thread David Muir
On Sat 23 Jul 2011 04:27:16 AM EST, Bart McLeod wrote: Op 22-07-11 17:06, David Mintz schreef: On Thu, Jul 21, 2011 at 5:19 PM, Bart McLeodmcl...@spaceweb.nl wrote: My wild guess is that you should override addMultiOptions in a custom select element so that you can add the class attribs.

[fw-general] Zend_Form: adding css class attrib to select option elements

2011-07-22 Thread David Mintz
On Thu, Jul 21, 2011 at 5:19 PM, Bart McLeod mcl...@spaceweb.nl wrote: My wild guess is that you should override addMultiOptions in a custom select element so that you can add the class attribs. -Bart Op 21-07-11 21:49, David Mintz schreef: From my googling I see that this has been

Re: [fw-general] Zend_Form: adding css class attrib to select option elements

2011-07-22 Thread Kaiuwe
Am 22.07.2011, 17:06 Uhr, schrieb David Mintz da...@davidmintz.org: I noticed that $helper is a public property of Zend_Form_Element_Select, so rather than extending it, I have started working on a custom view helper instead, whose method signature is the same as that of formSelect in

Re: [fw-general] Zend_Form: adding css class attrib to select option elements

2011-07-22 Thread David Mintz
On Fri, Jul 22, 2011 at 11:22 AM, Kaiuwe dr.kai...@googlemail.com wrote: Am 22.07.2011, 17:06 Uhr, schrieb David Mintz da...@davidmintz.org: I noticed that $helper is a public property of Zend_Form_Element_Select, so rather than extending it, I have started working on a custom view helper

Re: [fw-general] Zend_Form: adding css class attrib to select option elements

2011-07-22 Thread Kaiuwe
Am 22.07.2011, 17:43 Uhr, schrieb David Mintz da...@davidmintz.org The proposal in the issue tracker, if I understand it correctly, presumes you want all your options to have the same class… Sorry, wrong! It is for one option element. There is a difference between: addMultiOption and

Re: [fw-general] Zend_Form: adding css class attrib to select option elements

2011-07-22 Thread Bart McLeod
Op 22-07-11 17:06, David Mintz schreef: On Thu, Jul 21, 2011 at 5:19 PM, Bart McLeodmcl...@spaceweb.nl wrote: My wild guess is that you should override addMultiOptions in a custom select element so that you can add the class attribs. -Bart Op 21-07-11 21:49, David Mintz schreef: From

[fw-general] Zend_Form: adding css class attrib to select option elements

2011-07-21 Thread David Mintz
From my googling I see that this has been asked, and there's no really easy answer, and none of the few answers I found work for my case. Basically, you have a label, a value and a category signified by the css class. I want the output to be something like option label=apple class=fruit

Re: [fw-general] Zend_Form: adding css class attrib to select option elements

2011-07-21 Thread Bart McLeod
My wild guess is that you should override addMultiOptions in a custom select element so that you can add the class attribs. -Bart Op 21-07-11 21:49, David Mintz schreef: From my googling I see that this has been asked, and there's no really easy answer, and none of the few answers I found

[fw-general] Zend_Form-errors: inconsistent behavior

2011-04-27 Thread Denis Brumann
Hi, I noticed that the result returned by Zend_Form-getErrors() can not be used as argument for Zend_Form-addErrors(), as the array-formats do not match: getErrors() array(__ELEMENT_NAME__ = array(__ERROR_MESSAGE__)); addErrors() array(__ERROR_MESSAGE__); How could I go about having

Re: [fw-general] Zend_Form, shifting validation off the element onto the form object..

2011-04-11 Thread Matthew Weier O'Phinney
-- leedavis leedavi...@gmail.com wrote (on Friday, 08 April 2011, 07:15 AM -0700): The thing I cant get my head around, is, if forms can be in an error state using methods such as setError(s), addErrorMessage(s) etc. Then why cant we attach validators to a form object? Why are these limited

[fw-general] Zend_Form, shifting validation off the element onto the form object..

2011-04-08 Thread leedavis
Validating your data from a zend form object. In most cases validation would typically be attributed directly to the form element in question, for example validating an email address may use the EmailAddress validator shipped with ZF or you may want to create your own to ensure the email address

[fw-general] Zend_Form Radio-Button Decorator

2011-01-20 Thread dennisnowack
Hi! Sorry for my non-perfect english ^^ After creating an own browser-game with php (without Zend) I am now trying to learn Zend ... This time I am developing a web-community with some people. For this we use the Zend-Framework. All I didn't knew yet I was able to let google and documentations

[fw-general] Zend_Form and Custom Error Messages

2010-11-10 Thread Hector Virgen
Hello, What is the most straight-forward way to mark an element as invalid and display a custom error message *without using validators*? For example, we are using a web service to process data submitted via a web form. I have set up validators in my form for the basic things like required

Re: [fw-general] Zend_Form, and Translation of Zend_Validator messages

2010-10-29 Thread AmirBehzad Eslami
Very nice, Thanks Christian. How can I participate to add my own languages (Persian, ir) to the resources? Kind regards, -behzad

[fw-general] Zend_Form, and Translation of Zend_Validator messages

2010-10-28 Thread AmirBehzad Eslami
Hi, The error-messages of Zend_Validator_*** classes are located in different files, making it difficult to localize them at once. Are you aware of any .po file, containing a list of error messages, to ease the l10n? Please let me know. Thank you in advance, -b

Re: [fw-general] Zend_Form, and Translation of Zend_Validator messages

2010-10-28 Thread Christian Riesen
Download the full package of the zend framework files. There is a folder called resources\languages and inside are folders for different languages. Inside those is each a Zend_Validate.php which contains all the strings of each validator and it's translation in those languages already, in the

Re: [fw-general] Zend_Form - Unable to translate error messages post-validation

2010-10-25 Thread Hector Virgen
Thanks for the clarification, Thomas. I'll be sure to add translations prior to validating. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com

AW: [fw-general] Zend_Form - Unable to translate error messages post-validation

2010-10-23 Thread Thomas Weidner
Betreff: [fw-general] Zend_Form - Unable to translate error messages post-validation Hello, I've been following Matthew Weier O'Phinney's blog post Using Zend_Form In Your Modelshttp://weierophinney.net/matthew/archives/200-Using-Zend_Form-in-Your -Models.htmland so far it has been working great

[fw-general] Zend_Form - Unable to translate error messages post-validation

2010-10-22 Thread Hector Virgen
Hello, I've been following Matthew Weier O'Phinney's blog post Using Zend_Form In Your Modelshttp://weierophinney.net/matthew/archives/200-Using-Zend_Form-in-Your-Models.htmland so far it has been working great -- except for translation. We are currently not using Zend_Translate -- our solution

Re: [fw-general] Zend_Form has a problem with swedis h characters (å,ä and ö)

2010-09-06 Thread Chris Riesen
Hi Your problem lies in layout.phtml (application/layout/scripts) and there on line 4: meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / The charset you have there does not work so well with mixed characters. My advice is, use UTF-8 instead: meta http-equiv=Content-Type

[fw-general] Zend_Form has a problem with swedish characters (å,ä and ö)

2010-09-05 Thread bananabreeze
Hi! Zend_Form has trouble working with swedish characters å,ä and ö. -Zend_Form_Element: Using setLabel(), labels containing these chars will be set to ! -The same will happen to the default data when applying Zend_Form()-populate($values) . This makes it very annoying to work with non

[fw-general] [Zend_Form] Filtering or validating a composite element's array of values

2010-08-30 Thread Ryan Lange
I have a composite element (MultiCheckbox for pre-defined values + Text for custom values; all having the same name) that is having validation problems. The field is required (at the very least, one of the checkboxes must be checked *or* there must be a value in the text field). The problem is

[fw-general] zend_form for dummies: force-feeding a datum to a form

2010-08-27 Thread David Mintz
Long story, but I would like to add a form element -- it might as well be ' hidden' -- set its value and manually mark it as valid before calling validate so that this element name/value will be in the $context that a validator requires. I would rather not render this element along with the rest

[fw-general] Zend_Form | Using file form elements in subforms

2010-08-16 Thread Sven Kretschmann
Hello there, I'm currently trying to setup a Form including a SubForm (as described in http://framework.zend.com/manual/en/zend.form.advanced.html) to achieve a form with following inputs: input type=file name=avatar[file] / input type=hidden name=avatar[id] / The id is the one of the avatar

[fw-general] Zend_Form elements validating

2010-07-26 Thread sabri sahin can
Hi, I'm very new in zend framework and web developing. I'm currently writing a zend_form for a registration page of a web site. Here is my code for adding a text element for email address: http://pastie.org/1060337 In this email field i want to put EmailAddress validator, however there are many

Re: [fw-general] Zend_Form and custom validation workaround

2010-07-22 Thread Peter Warnock
Create subforms to take advantage of array notation and have the validator compare the pair by naming convention. - pw On Thu, Jul 1, 2010 at 10:00 AM, milesap mile...@gmail.com wrote: I have a problem that I cannot seem to wrap my head around. 3 text fields on my form are start dates, and

[fw-general] Zend_Form and custom validation workaround

2010-07-01 Thread milesap
I have a problem that I cannot seem to wrap my head around. 3 text fields on my form are start dates, and another 3 text fields are end dates. I need to validate the end dates to their corresponding starting dates to ensure they are later than the start dates. I created a custom validator for

[fw-general] Zend_Form isValidPartial always returns false

2010-05-31 Thread Sergio Rinaudo
Hi All, I have a form sent automatically every X seconds using ajax to store temporarily in a session all valid element values, and I want to use $myForm-isValidPartial server side to do this. Unfortunatelly it always returns false, and I have elements that actually should pass validation

[fw-general] Zend_Form Array Notation values being re-indexed

2010-05-01 Thread SiCo
Hi, I have just upgraded to ZF 1.10.4 and this has caused a lot of problems with by array notation forms. I notice there have been a lot of changes but I can't find the answer to my problem! I used to add elements to sub forms for adjusting quantities, the name of the element would be the id of

Re: [fw-general] Zend_Form composite time element

2010-04-26 Thread Hector Virgen
I followed his tutorial to create my own date composite element, but I wanted to use selects instead of text fields. I added 3 new methods to the element that returns the multiOptions for each of the selects: My_Form_Element_Date#getMonthMultiOptions() My_Form_Element_Date#getDayMultiOptions()

[fw-general] Zend_Form composite time element

2010-04-25 Thread Jigal sanders
Hello everyone, I have been busy implementing my own custom time form element. And I asume that I am not doing anything which is rocket science. Namely I am trying to create a custom form element which I can use to enter times. It shoul look like two dropdown boxes of which i can select the

[fw-general] Zend_Form not rendering - Plugin Loader not configured??

2010-04-24 Thread Josh Team
In summary, I have a basic ZF stack with a shell of Zend_Form: class Form extends Zend_Form { } when I try to echo/render the Form I get this error: Zend_Loader_PluginLoader_Exception: Plugin by name 'FormElements' was not found in the registry; used paths: in

[fw-general] Zend_Form odd problem

2010-04-12 Thread milesap
Is it possible for $form-getMessages() to be empty yet $form-getErrors() to contain an error? Here's the issue, I'm validating a ReCaptcha field which is working fine in my Zend_Form. If I forget to enter a value into the ReCaptcha field or if I get it wrong, the error message displays in

[fw-general] Zend_Form (get populated values)

2010-04-05 Thread eduardocury
Hello, is there any way to get the values inside the form after populate it ? e.g: $myForm= new Default_Form_MyForm; $myForm-populate(array(my_data_here)); And then inside the form to retrieve these values was populated? class Default_Form_MyForm extends Zend_Form { // here i want to

Re: [fw-general] Zend_Form (get populated values)

2010-04-05 Thread Саша Стаменковић
$this-getValue() and $this-getValues() should do the job. Regards, Saša Stamenković On Mon, Apr 5, 2010 at 11:47 PM, eduardocury l...@eduardocury.net wrote: Hello, is there any way to get the values inside the form after populate it ? e.g: $myForm= new Default_Form_MyForm;

[fw-general] Zend_Form text element is always null

2010-03-30 Thread Ethan Gruber
Hi, I have a form that successfully uploads a file to the server. I want to improve the form by having a text input. The input is defined as follows in the code that describes the form: $form-addElement('text', 'filterstring'); $textElement=$form-getElement('filterstring');

[fw-general] Zend_Form upload file

2010-03-16 Thread Jacky Chen
Hi, i have found that Zend_Form_Element_File ignore no file option would not work if the form that submited is missing that file element. let's say,there is a form that upload a file to the server, form enctype=multipart/form-data action=/demo/upload method=post any text:input type=text

Re: [fw-general] Zend_Form + JQuery + tabs

2010-03-15 Thread David Mintz
On Fri, Mar 12, 2010 at 4:45 PM, Mike Wright mike.wri...@mailinator.comwrote: David Mintz wrote: On Fri, Mar 12, 2010 at 1:34 PM, scs sasc...@gmail.com wrote: Hi, I would validate each step's data and save it in session. However, if any previous tab is clicked and there was an attempt to

[fw-general] Zend_Form + JQuery + tabs

2010-03-12 Thread David Mintz
Embarking on my first ajaxified Zend Form with a JQuery UI-tabbed interface, I am wondering what sort of practices people recommend. Say we have tabs 1, 2 and 3, left to right. Tab 1 is displayed first. They click tab 2. We use a JQuery tabsselect callback to submit only the data from tab 1 for

Re: [fw-general] Zend_Form + JQuery + tabs

2010-03-12 Thread David Mintz
On Fri, Mar 12, 2010 at 1:34 PM, scs sasc...@gmail.com wrote: Hi, I would validate each step's data and save it in session. However, if any previous tab is clicked and there was an attempt to change any validated input, then I would validate that input again. In other words, click 2nd

Re: [fw-general] Zend_Form + JQuery + tabs

2010-03-12 Thread Mike Wright
David Mintz wrote: On Fri, Mar 12, 2010 at 1:34 PM, scs sasc...@gmail.com wrote: Hi, I would validate each step's data and save it in session. However, if any previous tab is clicked and there was an attempt to change any validated input, then I would validate that input again. In other

[fw-general] Zend_Form Question

2010-03-02 Thread Arthur M. Kang
Is there a way to render different parts of the form at a time? I want to render different display groups around a page, so I need to somehow render the forms opening tags, render the display groups around the page with ?= $this-form-getDisplayGroup('part-xx') ?, and then somehow need to

[fw-general] Zend_Form + error weirdness

2010-03-02 Thread Colin Guthrie
Hi, I'm a bit confused here. Say I have a form: $form = new Zend_Form(); then I set an error on it. $form-addError(It's broken); But when I try and retrieve that error it doesn't work. $form-getErrors(); // returns array(); but: $form-isErrors(); // true. Looking at the code, I

[fw-general] Zend_Form displayGroup render problem

2010-02-15 Thread rpsimao
In Controller: class IndexController extends Zend_Controller_Action { public function init() { $this-form = new RPS_Forms_Build_Ocorrencias(); } public function indexAction() { //Zend Form Elements $values = $this-form-buildForm(); $form =

Re: [fw-general] zend_form escape help

2010-01-03 Thread monk.e.boy
monk.e.boy wrote: I fear i am being thick, but could someone help me with this code: OK, I was escaping the label, but not the description, so this fixes it: $goods_in_transit-getDecorator('Description')-setOption('escape', false); monk.e.boy -- View this message in context:

[fw-general] zend_form escape help

2010-01-02 Thread monk.e.boy
I fear i am being thick, but could someone help me with this code: $goods_in_transit = new Zend_Form_Element_Text('goods_in_transit'); $label = $goods_in_transit-getDecorator('label'); print_r( $label-getOptions() ); // this prints :: Array ( [tag] = dt ) $label-setOption('escape',

[fw-general] Zend_Form suggestion about setElementDecorators()

2009-12-28 Thread umpirsky
Hi. I have the following use case: I have a form which I use to override default decorators, element decorators, add prefixes...all forms in the app are extending it. The problem occurs when I try to set decorators on some specific element in concrete form like: ...)-addElement(

Re: [fw-general] Zend_Form Int filter

2009-12-25 Thread umpirsky
Fixed with -addElement( 'text', 'name', array( 'label' = 'Lab:', 'filters' = array('Int', 'Null'), 'required' = true

[fw-general] Zend_Form Int filter

2009-12-22 Thread umpirsky
Hi. I have several fields of int type which I have in my form. I want to get integer when I get values from form after submission. So, I attached int filter like: -addElement( 'text', 'name', array(

RE: [fw-general] Zend_Form decorators webinar tomorrow

2009-12-16 Thread Terre Porter
-...@lists.zend.com Cc: fw-general@lists.zend.com Subject: [fw-general] Zend_Form decorators webinar tomorrow Hey, all -- I'm giving a webinar on Zend_Form decorators tomorrow at 12pm EST: http://short.ie/62entq I'll be covering a variety of techniques, from writing a simple one-off

Re: [fw-general] Zend_Form - Viewscript

2009-12-15 Thread strick
The problem with this is that you still can't add information inbetween each input. For instance: label for=Mine:/labelinput type=radio / Reference label for=Mine:/labelinput type=radio / Reference label for=Mine:/labelinput type=radio / Reference To accomplish this you still have to

Re: [fw-general] Zend_Form - Viewscript

2009-12-15 Thread strick
I'm wrong, something like this would work: $selectOptions = $this-element-getMultiOptions(); $custom = array(); foreach($selectOptions as $value = $label){ ? div class=radioinput type=radio value=?=$value? /?=$label?/div ?}? The only problem with this is that you have to re write all

[fw-general] Zend_Form decorators webinar tomorrow

2009-12-15 Thread Matthew Weier O'Phinney
Hey, all -- I'm giving a webinar on Zend_Form decorators tomorrow at 12pm EST: http://short.ie/62entq I'll be covering a variety of techniques, from writing a simple one-off decorator, to combining decorators to achieve composite markup, to creating an element and decorator that create

[fw-general] Zend_Form translate messages

2009-12-12 Thread umpirsky
Hi. If anyone have po file with all error messages http://framework.zend.com/manual/en/zend.validate.messages.html it would be nice to share ;) Othervise, I'll make one and share. PS Dont ask me which language I need :) Regards, Saša Stamenković. -- View this message in context:

Re: [fw-general] Zend_Form without MVC problem

2009-12-04 Thread pablofmorales
So easy... $form = new Forms_YouForm(); $view = new Zend_View(); $form-setView( $view ); echo $form; -- View this message in context: http://n4.nabble.com/Zend-Form-without-MVC-problem-tp657457p948679.html Sent from the Zend Framework mailing list archive at Nabble.com.

[fw-general] Zend_Form initial values

2009-11-26 Thread umpirsky
Hi zf gurus. I have one quick seach form (GET method) in the sidebar. On submit I fix url to be zend style /key/val/key2/val2/ with window.location = this.attr('action') + '/' + this.serialize().replace(//g, '/').replace(/=/g, '/'); After submit form use to set default value with values from

Re: [fw-general] Zend_Form initial values

2009-11-26 Thread Jigal sanders
Why don't you use post? This way a person can easy change the values you have set in the form by changing the url manualy. On Thu, Nov 26, 2009 at 9:16 AM, umpirsky umpir...@gmail.com wrote: Hi zf gurus. I have one quick seach form (GET method) in the sidebar. On submit I fix url to be

Re: [fw-general] Zend_Form initial values

2009-11-26 Thread Саша Стаменковић
Thats what I want. Reasons: - SEO - Pagination - Back button - ... Example http://www.mobile.de/ quick search. Regards, Saša Stamenković On Thu, Nov 26, 2009 at 9:23 AM, Jigal sanders jigalroe...@gmail.comwrote: Why don't you use post? This way a person can easy change the

[fw-general] Zend_Form and fields metacommand doesn't work

2009-11-25 Thread Dennis Becker
Hi all, yesterday I have found metacommands in manual at http://framework.zend.com/manual/en/zend.filter.input.html#zend.filter.input.metacommands.fields I want to compare to password fields with the Identical validator. So I build my form shown at http://paste2.org/p/532112 When I use this to

Re: [fw-general] Zend_Form: possible to disable some multi options in radio button

2009-11-15 Thread Ralf Eggert
Hi Gerard, thanks, that pointed me in the right direction. Works like expected. Now I still have the little problem, that I want to grey out the label around the disabled radio button. From the code I guess its impossible to add a special css class for these label tags without hacking the code

Re: [fw-general] Zend_Form: possible to disable some multi options in radio button

2009-11-15 Thread drm
Hi Ralf, thanks, that pointed me in the right direction. Works like expected. You're welcome of course :-) Now I still have the little problem, that I want to grey out the label around the disabled radio button. From the code I guess its impossible to add a special css class for these

[fw-general] Zend_Form: possible to disable some multi options in radio button

2009-11-14 Thread Ralf Eggert
Hi, I have a radio button element with several options. I would like to disable some of them. They should be shown but they should not be able to be activated. With this I can only disable all radio buttons together: $form-getElement('selection')-setAttrib('disable', 'disable'); Any chance to

Re: [fw-general] Zend_Form: possible to disable some multi options in radio button

2009-11-14 Thread drm
Hi Ralf, I have a radio button element with several options. I would like to disable some of them. They should be shown but they should not be able to be activated. With this I can only disable all radio buttons together: $form-getElement('selection')-setAttrib('disable', 'disable'); By

[fw-general] Zend_Form label decorator duplicated id

2009-11-09 Thread umpirsky
I have element decorators array( 'ViewHelper', array(array('td' = 'HtmlTag'), array('tag' = 'td', 'style' = 'width: 360px;')), array('Label', array('tag' = 'td', 'requiredSuffix' = ' *')),

Re: [fw-general] Zend_Form and arrays

2009-10-24 Thread Peter Warnock
2009/10/22 Krzysztof Szatanik z...@gazeta.ie As you can see even if i get form values in request as i wanted, they aren't recognized by Zend_Form. Output of $form-getValues() is different from expected, and even fields aren't recognized, so i can use Zend_Form only to generate HTML form but

Re: [fw-general] Zend_Form and arrays

2009-10-24 Thread Shaun Farrell
Your Zend_Form is a POST method. You can also do it this way in your controller. $form = new Default_Form_FormName(); // instantiate the form $this-view-form = $form; // form for the view //after submitting the form if($this-getRequest()-isPost()) { // if the form is a post $formData =

[fw-general] Zend_Form and arrays

2009-10-22 Thread Krzysztof Szatanik
Hi I have some issues with Zend_Form and getting values as arrays. For example - i have 2 elements - e1 and e2 and i want them as array (arr): Something like this: [arr] = Array ( [e1] = val1 [e2] = val2 ) Closest form design i can get is

Re: [fw-general] Zend_Form and arrays

2009-10-22 Thread Jules Piccotti
I think you need to add this to your form: $form-setIsArray(true); If you then access (that's what I do) the form values in a controller like that: $this-getRequest()-getPost('arr') ...you should get the expected array. Just take care that you have to set the form name to match the expected

Re: [fw-general] Zend_Form - select - option bgcolour

2009-09-19 Thread zloty
Hi, I dont use php for that. In my project a nned to set background color as value of options so just after generated form i write some jquery code: $(document).ready(function(){ $('#select option').each(function(i) { $(this).css('background-color',

[fw-general] Zend_Form using Zend_Config

2009-09-16 Thread Koph Digital
Hi, I'm trying to create a form using Zend_Form and Zend_Config_Ini, however, I'm having trouble creating a select list. How do you add options to the select list using the the config file format? elements.test.type = select elements.test.options.label = Test

Re: [fw-general] Zend_Form using Zend_Config

2009-09-16 Thread Matthew Weier O'Phinney
-- Koph Digital ad...@koph.co.uk wrote (on Tuesday, 15 September 2009, 11:38 PM +0100): I’m trying to create a form using Zend_Form and Zend_Config_Ini, however, I’m having trouble creating a select list. How do you add options to the select list using the the config file format?

Re: [fw-general] Zend_Form Patch (ZF-5412 and ZF-4915)

2009-09-13 Thread Matthew Weier O'Phinney
-- Tobias Petry tobias_pe...@hotmail.com wrote (on Friday, 11 September 2009, 04:25 PM -0700): just wanted to announce a new patch for ZF-5412. Could somebody with comit priveleges take care of it? It is unit tested and breaks no other test. I saw the patch come in today, and flagged it for

Re: [fw-general] Zend_Form Patch (ZF-5412 and ZF-4915)

2009-09-13 Thread Tobias Petry
I have signed an CLA long ago and have been successfully processed. Anything not correct? Then i'll resend the CLA. -- View this message in context: http://www.nabble.com/Zend_Form-Patch-%28ZF-5412-and-ZF-4915%29-tp25409842p25425583.html Sent from the Zend Framework mailing list archive at

[fw-general] Zend_Form Patch (ZF-5412 and ZF-4915)

2009-09-11 Thread Tobias Petry
Hi, just wanted to announce a new patch for ZF-5412. Could somebody with comit priveleges take care of it? It is unit tested and breaks no other test. Tobias Petry -- View this message in context: http://www.nabble.com/Zend_Form-Patch-%28ZF-5412-and-ZF-4915%29-tp25409842p25409842.html Sent

[fw-general] Zend_Form File Element / Decorator - Extremely Confuzzled

2009-09-09 Thread Jayawi
Hi there~ I'm relatively new to ZF but have enjoyed using it so far. The main issue I've had with ZF is with it's Form and Decorator aspects. After going through God knows how many articles/blogs/posts and what not, I thought I finally had a grasp of it. Things were working okay. I created a

Re: [fw-general] Zend_Form File Element / Decorator - Extremely Confuzzled

2009-09-09 Thread Daniel Latter
2009/9/9 Daniel Latter dan.lat...@gmail.com Hi, Have a look at this: http://www.slideshare.net/NickBelhomme/zend-framework-form-mastering-decorators Also regarding your code, the HtmlTag decorator is being applied so you can try and set that, also you can try and clear the default

Re: [fw-general] Zend_Form File Element / Decorator - Extremely Confuzzled

2009-09-09 Thread Thomas Weidner
To: fw-general@lists.zend.com Sent: Wednesday, September 09, 2009 4:03 PM Subject: [fw-general] Zend_Form File Element / Decorator - Extremely Confuzzled Hi there~ I'm relatively new to ZF but have enjoyed using it so far. The main issue I've had with ZF is with it's Form and Decorator aspects

Re: [fw-general] Zend_Form clearErrorMessages vs. clone the object

2009-09-09 Thread Chris Murray
What exactly is the feature request? For batch form operations, a new Zend_Form method named something like clearAndPrepForRePopulate(). It would recursively clearAllMessages(), including those in all elements and subForms, as well as set _errorsExist to FALSE. So it would like: $form =

Re: [fw-general] Zend_Form File Element / Decorator - Extremely Confuzzled

2009-09-09 Thread Jayawi
Thanks heaps Daniel and Thomas. I had actually visited that particular FAQ page before, but I thought it a dead-end or login-required page when in fact I now realise that it was due to the horrible internet connection that I have here that the FAQ questions failed to render as a link. In any

Re: [fw-general] Zend_Form clearErrorMessages vs. clone the object

2009-09-06 Thread Ralph Schindler
Is there a better way? If not, is this a reasonable feature request, that is, to _really_ clear all messages so the object can be reused for batch ops. What exactly is the feature request? If you check out Zend_Form, it has been designed such that when its cloned, it will actually enforce

[fw-general] Zend_Form clearErrorMessages vs. clone the object

2009-09-03 Thread Chris Murray
When importing data, say, from a CSV, I'd like to avoid rebuilding my form object every time (it is built up from a somewhat complex config). clearErrorMessages() looks like what I need, except that it doesn't appear to clear all messages from all elements and subforms, and it doesn't set

Re: [fw-general] Zend_Form save to ini

2009-08-15 Thread Graham Anderson
On Saturday 15 August 2009 07:31:37 UpNow wrote: now is the edit form, so i should give the form elements their values read from db. which method use? $form-??? Help me! Thanks.:-D $form-getElement('elementName') -setValue('foo'); or $form-populate($data); Also,

[fw-general] Zend_Form save to ini

2009-08-14 Thread admirau
Any chance to convert Zend_Form object to .ini format? How to achieve this? -- regards takeshin -- View this message in context: http://www.nabble.com/Zend_Form-save-to-ini-tp24979523p24979523.html Sent from the Zend Framework mailing list archive at Nabble.com.

Re: [fw-general] Zend_Form save to ini

2009-08-14 Thread Graham Anderson
On Saturday 15 August 2009 00:21:06 admirau wrote: Any chance to convert Zend_Form object to .ini format? How to achieve this? http://framework.zend.com/manual/en/zend.form.quickstart.html#zend.form.quickstart.config

Re: [fw-general] Zend_Form save to ini

2009-08-14 Thread UpNow
What method should i use if i want to give input values to the element of the form(which is configed by .ini) my code: $config = new Zend_Config_Ini($place, $groupname); $form = new Zend_Form($config-user-edit); now is the edit form, so i should give the form elements their values read from db.

Re: [fw-general] Zend_Form - Adding CSS classnames to multiCheckbox inputs

2009-08-13 Thread Peter Warnock
On Tue, Aug 11, 2009 at 11:07 AM, Hector Virgen djvir...@gmail.com wrote: I am building a form that uses the multiCheckbox form element. I need to add class names to specific checkboxes for javascript purposes. Is there a way to do that? -- Hector Why not navigate the dom with

Re: [fw-general] Zend_Form - Adding CSS classnames to multiCheckbox inputs

2009-08-13 Thread Hector Virgen
Thanks for the reply, Peter. I could walk the dom, and in fact I'm using jQuery, but I'm shooting more for a pattern-based approach to accomplishing this task. Here's a little more background as to why I need (er, want) CSS class names. I am building a search form that contains a multiCheckbox

[fw-general] Zend_Form - Adding CSS classnames to multiCheckbox inputs

2009-08-11 Thread Hector Virgen
Hello, I am building a form that uses the multiCheckbox form element. I need to add class names to specific checkboxes for javascript purposes. Is there a way to do that? I tried this, but it ended up adding the class name foo to all of the checkboxes: $this-addElement('multiCheckbox',

Re: [fw-general] Zend_Form and square brackets in elements' name

2009-08-07 Thread Ian Lewis
Julien Huang wrote: If obtain this : input name=question42[] value=0 / While I want this : input name=question[42][] value=0 / -- Julien Huang It is very useful to be able to use this syntax I agree. There are areas where Zend Framework is over engineered and unfortunately

[fw-general] Zend_Form: Adding elements to an existing display group

2009-07-30 Thread Hector Virgen
Hello, I am having some trouble with Zend_Form and display groups (ZF 1.8.2). I want to add an existing form element to an existing display group within the same form, but when I call $displayGroup-addElement($element), the element is re-added to the form, causing it to be rendered twice (once in

[fw-general] Zend_Form with elements having array names

2009-07-29 Thread Mike Wright
Hi all, I'm up against something that has me stumped (not too hard to do ;) In html it is possible to name form elements with array names. For example, if I wanted a collection of an arbitrary number of elements such as favorite colors I could create elements like: input

Re: [fw-general] Zend_Form with elements having array names

2009-07-29 Thread Hector Virgen
Do you need multiple text inputs that post as an array? You could create a multiText form element that extends Zend_Form_Element_Multi. Take a look at Zend_Form_Element_MultiRadio to see how it works. Yesterday I had to create a series of checkboxes that were built to look like a navigation tree

Re: [fw-general] Zend_Form and Date validator

2009-07-28 Thread markbelanger1985
Try extending the validation class and override the $_messageTemplate variable. class My_Validate_NotEmpty extends Zend_Validate_NotEmpty { protected $_messageTemplates = array( parent::IS_EMPTY = It can't be empty!, ); } Then add the class prefix and path to the form so the

  1   2   3   4   5   6   7   8   9   >