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

Update ContactRequestController.php #1

Closed
wants to merge 1 commit into from

Conversation

mrfroasty
Copy link

Migrate to service id instead

Migrate to service id instead
@@ -34,7 +34,7 @@ public function createAction(Request $request)
$contactRequest = new ContactRequest();

$form = $this->createForm(
ContactRequestType::class,
$this->get('oro_contact_us_bridge.contact_request_type'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrfroasty, any reason to have service instead of basic approach?
If you need to customize that form, please read https://symfony.com/doc/current/form/create_form_type_extension.html topic.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manowark
Sorry for the late reply. At the time I wanted to make a field "organizationName" to have required set to true, but via controller its the same core form that is being loaded. Probably you are right that there are other ways to achieve this than overriding this \Oro\Bridge\ContactUs\Form\Type\ContactRequestType.

@manowark
Copy link
Contributor

manowark commented Dec 6, 2017

I'm now closing this PR. Please, feel free to reopen it if you have any objections.

@manowark manowark closed this Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants