I currently have a Zend form where you add data into a number field. But I want to add 2 buttons where you can increase or decrease the value then Submit the data.
Current code :
randomPoint()
Is it possible to edit that code, or would I need to find another solution?
EDIT: My mistake, not radio buttons.
答案 0 :(得分:0)
The best way to achieve that is to create your own Form Element helper extends the Zend\Form\View\Helper\FormNumber helper.
You can modify the render, and add your +/- buttons (with javascript action to increase or decrease your element value) to erase the render() method.