It seems like it’s impossible to render a button element automatically using the FormCollection view helper without label.
Whenever possible, I render forms this way:
<?php echo $this->form()->openTag($this->form); ?>
<?php echo $this->formCollection($this->form); ?>
<?php echo $this->form()->closeTag($this->form); ?>
However, the FormButton view helper, that is invoked by FormCollection, awaits the button’s content as second param to the render() method — or a label option. If I set the label, the button renders correctly, but, you guess it, with label.
I tried to figure out a workaround for this by browsing through the code, but I can’t see one.
Note: FormButton renders <button>...</button> elements. I could also live with a <input type="button" /> element.
Am I missing something here? Thanks in advance!
Write your own formCollection ViewHelper that uses your very own formButton ViewHelper.