Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label cannot be used #12

Open
CoreAptics opened this issue Mar 1, 2018 · 2 comments
Open

Label cannot be used #12

CoreAptics opened this issue Mar 1, 2018 · 2 comments

Comments

@CoreAptics
Copy link

Hi,

I have an issue, i can't edit label from your AbstractTranslatableType. The label is overwritten by a null value.

For example:

class MachineType extends AbstractTranslatableType
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $this
            ->createTranslatableMapper($builder, $options)
            ->add('name', TranslatableTextType::class)
            ->add('subTitle', TranslatableTextType::class, array(
                'required'=>false,
                'label'=>'Sub-Title'
            ))

Thanks,

@romain3w
Copy link

+1

@stevro
Copy link

stevro commented Sep 5, 2019

The simplest way is to overwrite it from the template when rendering the form.
The other way around is to fork this bundle and modify the DataMapper class in the add() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants