[fw-general] Re: Extend Zend\Form\Form to output a div or article instead of input type text

2012-10-15 Thread samsonasik
You can create your custom FormRow, for ex :

namespace Application\View\Helper;

use Zend\Form\ElementInterface;
use Zend\Form\View\Helper\FormRow as BaseFormRow;

class FormRow extends BaseFormRow
   {
public function render(ElementInterface $element)
   {
$markup = parent::render($element);
return sprintf('%s', $markup);
   }
   }

and register it at module.config.php

'view_helpers' => array(
'invokables' => array(
'formrow' => 'Application\View\Helper\FormRow',
),
),



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Extend-Zend-Form-Form-to-output-a-div-or-article-instead-of-input-type-text-tp4657572p4657593.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Re: Extend Zend\Form\Form to output a div or article instead of input type text

2012-10-14 Thread luk
fwahlqvist wrote
> Thank you for getting back to me.
> 
> I am aware that I can edit the .phtml file, the reason i want to change
> the type is because i would like to make the div an editable region with a
> jquery script and then save with the form features

In this case you would need to create your own
Zend\Form\Element\YourCustomElement class and a view helper for it.



-
Cheers,
--
Luke Mierzwa
--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Extend-Zend-Form-Form-to-output-a-div-or-article-instead-of-input-type-text-tp4657572p4657580.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Re: Extend Zend\Form\Form to output a div or article instead of input type text

2012-10-13 Thread fwahlqvist
Thank you for getting back to me.

I am aware that I can edit the .phtml file, the reason i want to change the
type is because i would like to make the div an editable region with a
jquery script and then save with the form features



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Extend-Zend-Form-Form-to-output-a-div-or-article-instead-of-input-type-text-tp4657572p4657578.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Re: Extend Zend\Form\Form to output a div or article instead of input type text

2012-10-13 Thread luk
fwahlqvist wrote
> Hi All,
> 
> I want to change the behaviour of Zend\Form\Form to change the output type
> to be a 
> 
>  or an article instead. I am currently using the album tutorial as a
> training ground and planing to have a look to use a editable region
> instead to save the data. 
> All help and guidence re welcome.

You don't need to change behaviour of the Form element. Just go to your view
for ie.view/album/album/edit.phtml and put your div tags anywhere you like.
You can render form elements separately and they don't have any html
containers markups.



-
Cheers,
--
Luke Mierzwa
--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Extend-Zend-Form-Form-to-output-a-div-or-article-instead-of-input-type-text-tp4657572p4657576.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com