Re: [fw-general] Zendx Jquery Datepicker custom viewscript
OK, Thanks Benjamin. Ill try and find a different way to wrap it with a div. I wanted to use the phtml because it is just a bit more obvious whats going on than passing arrays of arrays of decorators. Like you say, this isn't really a datepicker issue, its a form element layout issue. beberlei wrote: i dont know about the layout and phtml file, this is not a topic of the datepicker. -- View this message in context: http://www.nabble.com/Zendx-Jquery-Datepicker--custom-viewscript-tp20713703p20726550.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zendx Jquery Datepicker custom viewscript
aSecondWill wrote: Ill try and find a different way to wrap it with a div. OK, seem to be a bit cleverer this morning. informed by mats post : http://www.nabble.com/addDecorator-and-dijit-element-td19860515.html mats post i did this: $dateEventEnd-addDecorator(array('analias'='HtmlTag'), array('tag'='div','id'='date_event_end_div')); previously i was trying to do this sort of thing: $dateEventEnd-setDecorators($inputDecorators); but that removes the datepicker decorators, and i wasn't quite sure how to add them back in manually. We have a few teams working on the same site here, and would like to find a way to keep markup of forms in the control of the design / front end team rather than having the backed team programing them, whilst still using the good bits of zend_form. -- View this message in context: http://www.nabble.com/Zendx-Jquery-Datepicker--custom-viewscript-tp20713703p20727069.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zendx Jquery Datepicker custom viewscript
when you want to seperate design and programming with zend form you can remove all markup decorators from the elements and just place them with ?= $form- element1; ? i think (or was it ?= $form-getElement('element1'); ?). designers can then build the markup while the programmers just build forms that dont have markup decorators (like htmltag, label, dd/dt). On Friday 28 November 2008 00:37:46 aSecondWill wrote: aSecondWill wrote: Ill try and find a different way to wrap it with a div. OK, seem to be a bit cleverer this morning. informed by mats post : http://www.nabble.com/addDecorator-and-dijit-element-td19860515.html mats post i did this: $dateEventEnd-addDecorator(array('analias'='HtmlTag'), array('tag'='div','id'='date_event_end_div')); previously i was trying to do this sort of thing: $dateEventEnd-setDecorators($inputDecorators); but that removes the datepicker decorators, and i wasn't quite sure how to add them back in manually. We have a few teams working on the same site here, and would like to find a way to keep markup of forms in the control of the design / front end team rather than having the backed team programing them, whilst still using the good bits of zend_form. -- Benjamin Eberlei http://www.beberlei.de
Re: [fw-general] Zendx Jquery Datepicker custom viewscript
datepicker needs the UiWidgetElement Decorator, NOT the ViewHelper decorator. On Thursday 27 November 2008 07:03:25 aSecondWill wrote: Hi, I had a jquery datepicker working with my options set like this: $time_event_end = new ZendX_JQuery_Form_Element_DatePicker( 'time_event_end', array('jQueryParams' = array( 'showOn' = both , 'buttonImage' = /images/jquery/calendar.gif, 'dateFormat' = 'yy-mm-dd', 'buttonImageOnly' = 'true')) ); But i wanted to add a div around the whole element, dt label dd input, everything. so i set my custom viewscript like this: $time_event_end-setDecorators(array(array('ViewScript', array( 'viewScript' = '_element.phtml', 'id' = 'time_event_end_div' ; and then made a element.phtml that looked like this: div id=?= $this-id ? dt ?= $this-formLabel($this-element-getName(), $this-element-getLabel()) ? /dt dd ?= $this-{$this-element-helper}( $this-element-getName(), $this-element-getValue(), $this-element-getAttribs() ) ? /dd ?= $this-formErrors($this-element-getMessages()) ? div class=hint?= $this-element-getDescription() ?/div /div now my datepicker dosn't have any options set because the onload function for it as changed from $(#time_event_end).datepicker({showOn:both,buttonImage:\/images\/j query\/calendar.gif,dateFormat:yy-mm-dd,buttonImageOnly:true}); to $(#time_event_end).datepicker({helper:datePicker,jQueryParams:{sho wOn:both,buttonImage:\/images\/jquery\/calendar.gif,dateFormat:yy- mm-dd,buttonImageOnly:true},options:[]}); What have i done wrong? i don't think its in the .phtm file right? its the way ive used setDecorators? Any and all help gratefully recieved! Will -- Benjamin Eberlei http://www.beberlei.de
Re: [fw-general] Zendx Jquery Datepicker custom viewscript
hmm, ok. thanks. so can't i specify a phtml file to manage the layout with that? beberlei wrote: datepicker needs the UiWidgetElement Decorator, NOT the ViewHelper decorator. -- View this message in context: http://www.nabble.com/Zendx-Jquery-Datepicker--custom-viewscript-tp20713703p20714583.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zendx Jquery Datepicker custom viewscript
i dont know about the layout and phtml file, this is not a topic of the datepicker. what i said is, you have to change your setDecorators call to: $time_event_end-setDecorators(array(array('UiWidgetElement', array( 'viewScript' = '_element.phtml', 'id' = 'time_event_end_div' ; DatePicker does not work with ViewHelper but with UiWidgetElement helper. On Thursday 27 November 2008 08:19:56 aSecondWill wrote: hmm, ok. thanks. so can't i specify a phtml file to manage the layout with that? beberlei wrote: datepicker needs the UiWidgetElement Decorator, NOT the ViewHelper decorator. -- Benjamin Eberlei http://www.beberlei.de