Skip to content

Conversation

jekuaitk
Copy link
Contributor

@jekuaitk jekuaitk commented Jul 4, 2025

Handles #186 by ensuring submissions are not saved twice.

Important

This PR is currently aimed at the master branch since the develop branch is many features ahead and a potential patch version should be without these features.

@ds-bellcom ds-bellcom added the Incl. in the next release This issue/PR is incl. in the next release label Oct 7, 2025
@ds-bellcom ds-bellcom linked an issue Oct 7, 2025 that may be closed by this pull request
// Only manipulate element on submission create form.
if (!$webformSubmission->isCompleted()) {
if ($cprLookupResult && $cprLookupResult->isNameAddressProtected()) {
// @todo What is this used for?
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comes from this requirement in BKDK-550:
https://os2web.atlassian.net/browse/BKDK-550?focusedCommentId=64745

The address field needed to have a hint that it's protected/beskyttet

I see that this key is most likely custom one: #info_message i also don't see any theme using it. For me, it's same to delete this line

If that answers the questions, please remove todo comment from the code 🙂

else {
$form['actions']['submit']['#submit'][] = 'os2forms_nemid_submission_set_address_protected';
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

i could not reproduce the behaviour of a handler being executed twice, but can see that it must be done before the normal submit, otherwise it does not work.

So it's a good change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Incl. in the next release This issue/PR is incl. in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Name- and address protection multiple submission saves issue

3 participants