[Components] UserInput Component - how to define a checkbox

2009-05-04 Thread Hilary Boyce
I'm using eZ components for the first time and am trying to get to grips with the UserInput component. I have read the tutorials and the api fairly thoroughly. I have a checkbox on my form which returns a short string if checked. I have defined in in the $definitions as 'administrator' => new ez

Re: [Components] [userinput] definition: required vs. optional

2008-12-16 Thread Derick Rethans
On Fri, 12 Dec 2008, Piotrek Karas wrote: > Just looking at the UserInput component for the first time, I completed > the tutorial sample code, seems to run fine, but I seem to have found > some inconsistencies: > > With definition: > > $definition = array( > 'firstName' => new ezcInputFo

[Components] [userinput] definition: required vs. optional

2008-12-12 Thread Piotrek Karas
Hi, Just looking at the UserInput component for the first time, I completed the tutorial sample code, seems to run fine, but I seem to have found some inconsistencies: With definition: $definition = array( 'firstName' => new ezcInputFormDefinitionElement( ezcInputFormDefinitionElement::R

Re: [Components] UserInput

2008-05-09 Thread Andreas Schamberger
Hi, maybe I shouldn't have used the existing issue for my problem... But it seems to be about the same problem: the input filter extension processes an empty string as valid, but in a required form field this should not be the case. The empty check is not about weather the field is set or not

Re: [Components] UserInput

2008-05-09 Thread Andreas Schamberger
Derick Rethans schrieb: >> I also like to have "require_string" as a filter_type: >> In my eyes it does not make sense to add callbacks for this but instead >> only strip the 'require_' part of the filter name and check the result >> afterwards: >> >> $checkEmpty = false; >> $filterName = $input

Re: [Components] UserInput

2008-05-09 Thread Derick Rethans
On Fri, 9 May 2008, Derick Rethans wrote: > On Wed, 7 May 2008, Andreas Schamberger wrote: > > > #011394: UserInput::emptyValue > > http://issues.ez.no/IssueView.php?Id=11394&activeItem=2 Just wondering about this one, why can't you just mark them as OPTIONAL instead of REQUIRED? regards, Deri

Re: [Components] UserInput

2008-05-09 Thread Derick Rethans
On Wed, 7 May 2008, Andreas Schamberger wrote: > today I started to convert some of my forms to use UserInput. Generally > this is a great component. But there are two major show stoppers in my > eyes that force a programmer to write a lot of unnecessary duplicate > code. And surprisingly there

[Components] UserInput

2008-05-07 Thread Andreas Schamberger
Hi, today I started to convert some of my forms to use UserInput. Generally this is a great component. But there are two major show stoppers in my eyes that force a programmer to write a lot of unnecessary duplicate code. And surprisingly there are already two issues for them: #012345: ezcInpu

Re: [Components] [UserInput] private/protected

2007-11-26 Thread Derick Rethans
On Tue, 20 Nov 2007, Thomas Koch wrote: > Unfortunately, $propertyValues is private, so that I have to iterate about > getValidProperties() and call parent::__get() for all of them. > > Couldn't you make them protected? Please! Is sweare I'll not do anything bad > with the variables! Could you

[Components] [UserInput] private/protected

2007-11-19 Thread Thomas Koch
Good morning, I want to extend the ezcInputForm to represent more complicate forms in my application. The extended class does additional validation (Is departure date before destination date, Is the date in the future...) and knows about those validation errors. If the validation is OK, I can

[Components] UserInput example

2007-09-03 Thread Kevin Waterson
Hi all, I have been looking at the userInput example at http://ez.no/doc/components/view/latest/(file)/introduction_UserInput.html#class-overview I have run the code, and it submits etc fine. However.. the firstName and lastName fields if left blank do not generate an error, yet, are marked as