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

contact form set default subject if none provided #391

Merged
merged 2 commits into from
Aug 10, 2023
Merged

contact form set default subject if none provided #391

merged 2 commits into from
Aug 10, 2023

Conversation

Jurj-Bogdan
Copy link
Member

@alexmerlin alexmerlin self-requested a review August 8, 2023 11:03
@alexmerlin alexmerlin linked an issue Aug 8, 2023 that may be closed by this pull request
@@ -104,11 +104,10 @@ public function formAction(): ResponseInterface
return new RedirectResponse($request->getUri(), 303);
}

$form->get('subject')->setValue('DotKernel Message ' . date('Y-m-d H:i:s'));
$data['subject'] = $data['subject'] ?: 'DotKernel Message ' . date('Y-m-d H:i:s');
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this field be set/overwritten only if the value submitted via the form was empty?
@arhimede please confirm

Copy link
Member

Choose a reason for hiding this comment

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

If the form subject field exists and is empty , only in this case will be used the default hardocoded one

Copy link
Member

@arhimede arhimede Aug 9, 2023

Choose a reason for hiding this comment

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

Please change
DotKernel Message
to
application->name Contact

@arhimede arhimede merged commit e3fc87b into 4.0 Aug 10, 2023
@alexmerlin alexmerlin deleted the issue-390 branch August 10, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

contact us form subject
3 participants