OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions alter properties in custom entity field

This topic contains 4 replies, has 3 voices, and was last updated by  dnahrebecki 6 years, 5 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #29427

    fred33
    Participant

    Hi,
    I added a field with migration to OroCalendarBundle, my problem is that initially it is not a required field but now this decision causes some problems and I would like to make this field mandatory. the problem is that it’s an enum_field (foreign keys). Can I change the field’s property in a migrationBundle and what is the syntax

    Thank’s for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #29428

    mmiasnikov
    Participant

    Hi, Fred33.

    Please, provide your migration code (where you added the field in OroCalendarBundle, as you said). It lets understand what, actually, entity did you mean, etc.

    Thank you.

    #29429

    fred33
    Participant

    here,

    #29430

    fred33
    Participant

    I think i have found a solution. Add this code

    to function builForm in CalendarEventType.php form. I tested it in the original bundle but how to extend this form

    Thanks

    #29431

    dnahrebecki
    Moderator

    Hello fred33,
    there are couple of ways of how you can extend Form functionality depending on your needs and existing codebase. Please have a look at:

    https://symfony.com/doc/2.8/form/create_form_type_extension.html
    https://symfony.com/doc/2.8/form/create_custom_field_type.html
    https://symfony.com/doc/2.8/form/dynamic_form_modification.html

    Regards,
    Daniel Nahrebecki

Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.

Back to top