Closed ghost closed 11 years ago
The label is found by the entity's __toString()
method: https://github.com/kbond/ZenstruckFormBundle/blob/master/Form/DataTransformer/AjaxEntityTransformer.php#L33
Do you have that setup correctly?
Ah, i forgot i had added this to my entity. Thanks a lot!
<?php public function __toString() { return strval($this->getId()); } ?>
No problem, thanks for the feedback.
I have added a note about __toString()
in the docs
Hi,
I have a question regarding the value of a zenstruck_ajax_entity field after saving. When i search for a value, i see this:
The label is a combination of a teamName and seasonName, fetched via the URL option. After saving, it shows the ID.
Is it possible to alter the label?