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

Support for fieldname-prefixed values on sample header submit #2364

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

xispa
Copy link
Member

@xispa xispa commented Aug 24, 2023

Description of the issue/feature this PR addresses

Some widgets use more than one form value on submit, not only the one retrieved by the field name. For instance, the field TemporaryIdentifierWidget expects to recieve multiple values on it's process_form function (see https://github.com/senaite/senaite.patient/blob/master/src/senaite/patient/browser/widgets/temporaryidentifier.py#L30).

This Pull Request simply takes into account prefixed values from the form with same fieldname when calling the processform function from the widget.

Current behavior before PR

The information for some fields is not saved properly in sample header form

Desired behavior after PR is merged

The information for all fields is saved properly in sample header form

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

Some widgets use more than one form value on submit, not only the
one retrieved by the field name
@xispa xispa changed the title Support for legacy widgets sumbit on sample header Support for fieldname-prefixed values on sample header submit Aug 24, 2023
Copy link
Contributor

@ramonski ramonski left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this tricky one!

@ramonski ramonski merged commit b7a2dde into 2.x Aug 24, 2023
2 checks passed
@ramonski ramonski deleted the suport-legacy-widgets-form branch August 24, 2023 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants