Closed ghost closed 10 years ago
You can just leave that field in the original entity and add it as a regular field to the form. Example:
$formBuilder
->add('translations', 'a2lix_translations', array(
'fields' => array(
'name' => array(),
'description' => array(),
),
// ... label, etc.
)
->add('price', 'number', array(
// ... label, etc.
)
;
That's right.. Thanks.
You're welcome. Let me know if you run into any other issues.
Is it possible to have a field which would be the same for all locales (= non-translatable)? I have an entity where only fields name and description should be translated, but price should be the same for all. However, it doesn't seem that leaving it in the original entity class would work. I tried putting in setter and getter for the price field in translation entity, but it still checks for existing property. Btw, I'm using a2lixtranslations and the form code to display the fields: