Closed lyrixx closed 11 years ago
IIRC, I didn't know the form component well enough when I wrote this class, and couldn't find an example on how to generate/test this case.
I'm planning on creating a package/repository only for this class, I'll probably take the time to fix this at that time
To reproduce:
$formBuilder->add('text', 'collection', array('type' => 'text', 'allow_add' => true));
Note: I did not test. But the allow_add will add the form prototype to the view.
Ok, no more exit/var_dump :p.
The code is at https://github.com/adrienbrault/form-serializer .
The test https://github.com/adrienbrault/form-serializer/blob/master/tests/AdrienBrault/FormSerializer/Tests/XmlFormViewSerializerTest.php#L394-L396 . But I realize now that this isn't correct when there is data.
Do you actually need the data-prototype attribute, or have you just noticed the exit/var_dump issue?
I don't need it. And i experienced the issue ;-)
https://github.com/TheFootballSocialClub/FSCHateoasBundle/blob/master/Serializer/XmlFormViewSerializer.php#L482-L488
This does not work at all ;)