-1

I have this zend form element :

$form->getElement('my_element')->addMultiOptions(array('option1' => 'option1', 'option2' => 'option2', 'option3' => 'option3', 'option4' => 'option4'));

So I get :

( ) option 1

( ) option 2

( ) option 3

( ) option 4

Now let's say I want to add a input (type = text) right after option 3 .. so something like this :

( ) option 1

( ) option 2

( ) option 3 [input]

( ) option 4

Is this possible? I'm kinde lost here

2 Answers2

0

I think it's possible, but you'll need to create your own element and add this functionality.

But if you don't know very much the framework, I sugest you to use view scripts and build your form manually.

See:

https://stackoverflow.com/questions/3414137/how-can-i-easily-add-a-link-to-a-form-in-zend-framework/3415541#3415541

Recommended Path For Zend Form Element View Scripts

http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/zend-forms-w-view-script-1061.html

Community
  • 1
  • 1
Keyne Viana
  • 6,194
  • 2
  • 24
  • 55
0

I had exactly the same problem, check here for the quick solution http://paveldubinin.com/2011/04/zend-form-radio-buttons/ using custom element.

Pavel Dubinin
  • 2,410
  • 1
  • 24
  • 28