ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

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 dnahrebecki 8 months, 2 weeks ago.

  • Creator
    Topic
  • #58342

    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
  • #58343

    mmiasnikov
    Moderator

    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.

    #58344

    fred33
    Participant

    here,

    #58345

    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

    #58346
    dnahrebecki
    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)

You must be logged in to reply to this topic.

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

Yes No
ssossossosso