Skip over navigation
Documentation
You are currently viewing documentation for version 3.0 which is not a long-term support release. The latest long-term support release is version 1.6

Frequently Asked Questions (FAQs)

This section is aimed to provide answers to common questions and help Oro developers find the right solution for the recurring issues they face when customizing the Oro application.

How to fix the UI label of a column?

Q: How to fix the UI label of the column that was added to an entity in a migration script. It shows the Oro.Sales.Lead.<myColumnName>.Label instead of myColumnName.

A: The labels for the extended entity’s fields are translatable strings with predefined translation keys (oro.sales.lead.<myColumnName>.label). You need to create the Resources/translations/messages.en.yml file in your bundle and provide a proper translation for this key to display the desired UI label name. For example, Collector instead of Oro.Sales.Lead.Collector.Label:

1
2
3
4
5
oro:
    sales:
        lead:
            collector:
                label: Collector

After that, perform the following console command:

1
php bin/console oro:translation:load --rebuild-cache --timeout=900

The oro.sales.lead.collector.label string acquires the translation provided and is now displayed as Collector.

To update the translation, navigate to System > Localization > Translations in the management console of your Oro application.

For more detailed information on how to translate the UI system elements and content to the target language, refer to the related System Localization and Translations documentation.

How to change a form type (selection, checkbox, etc) for the values in a column?

Q: How to change a form type (selection, checkbox, etc) for the values in a column that was added to an entity in a migration script?

A: The form type for a field can be changed in the oro_options array of a particular migration file. Here is an example of a migration script with a checkbox value provided for the form type field:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class AddCollectorToLead implements Migration
{
    public function up(Schema $schema, QueryBag $queries)
    {
        $table = $schema->getTable('orocrm_sales_lead');
        $table->addColumn(
            'collector',
            'boolean',
            [
                'oro_options' => [
                    'extend'    => ['is_extend' => true, 'owner' => ExtendScope::OWNER_CUSTOM],
                    'datagrid'  => ['is_visible' => false],
                    'form' => [
                        'is_enabled' => true,
                        'form_type' => 'checkbox',
                        'form_options' => [
                            'tooltip' => 'some tooltip'
                        ]
                    ],
                ],
            ]
        );
    }
}
Browse maintained versions:3.01.6

You will be redirected to [title]. Would you like to continue?

Yes No
sso for www.magecore.comsso for oroinc.desso for oroinc.fr
Back to top