-
Notifications
You must be signed in to change notification settings - Fork 81
Fix FormSubmissionServiceInterface::create usage #2511
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
Conversation
| $content = $this->contentService->loadContent(143); | ||
| $contentInfo = $content->contentInfo; | ||
|
|
||
| $formValue = $content->getFieldValue('form', 'eng-GB')->getFormValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
foreach ($formValue->getFields() as $field) {dump($field->getId(), $field->getIdentifier(), $field->getName());} showed me what to use while testing this command for real.
code_samples/ change report
|
mnocon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
My first chance to use the diff report in a real PR - it's definitely useful ❤️
* FormSubmissionCommand.php: both identifier & id are needed * phpstan-baseline.neon: rm FormSubmissionCommandInterface::create ignore (cherry picked from commit 0b4f8c2)
* FormSubmissionCommand.php: both identifier & id are needed * phpstan-baseline.neon: rm FormSubmissionCommandInterface::create ignore (cherry picked from commit 0b4f8c2)
FormSubmissionService::createalso need the field'sid(see https://github.com/ibexa/form-builder/blob/v4.6.12/src/lib/FormSubmission/FormSubmissionService.php#L72-L80 and https://github.com/ezsystems/ezplatform-form-builder/blob/v2.3.19/src/lib/FormSubmission/FormSubmissionService.php#L74-L82 for the needed keys).
Preview: https://ez-systems-developer-documentation--2511.com.readthedocs.build/en/2511/content_management/forms/form_api/#creating-form-submissions
Checklist