Details
-
Bug
-
Resolution: Fixed
-
High
-
3.3.35, 4.5.3
-
Ibexa Experience
-
Yes
Description
If converter depends on parameters provided for form field configuration it will always take parameters from the first field of the same type, which is wrong.
Steps to reproduce:
- Create a custom Form field like shown in the documentation https://doc.ibexa.co/en/3.3/guide/form_builder/create_custom_form_field/.
with minor change:ez_platform_form_builder: fields: country: name: Country category: Custom form fields thumbnail: '/bundles/ibexaplatformicons/img/all-icons.svg#places' attributes: parameter: type: integer name: Parameter label: name: Display label type: string validators: not_blank: message: You must provide a label for the field help: name: Help text type: string validators: required: ~
(adding parameter attribute).
- Create a Form with two newly created fields and set parameter values to 1 and 2 respectively and one submit button.
- In vendor/ezsystems/ezplatform-form-builder/src/lib/FormSubmission/FormSubmissionService.php file on line 78 add the following:
$parameter = $field->getAttribute('parameter'); dump($parameter);
- Submit the form and observe the dump results.
Result:
The parameter values is always 1.
Expected result:
The parameter values should be 1 and 2 respectively.