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

[FEATURE] Add condition for saving hidden fields or not #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PhilippKuhlmay
Copy link

This code includes a condition in the finisher, with wich you can switch between "saving hidden fields" or "don't save hidden fields".
If selected, all hidden form values will be ignored while saving the form in the frontend.

Copy link
Member

@mbrodala mbrodala left a comment

Choose a reason for hiding this comment

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

Sorry for the very late response. The change itself sounds useful, can you rebase to the latest state? Notice that we require TYPO3v10+ by now.

@@ -23,6 +24,7 @@ class LoggerFinisher extends AbstractFinisher
*/
protected $defaultOptions = [
'finisherVariables' => [],
'saveHiddenElements' => true,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'saveHiddenElements' => true,
'includeHiddenElements' => true,

Comment on lines +117 to +123
isset($renderingOptions['_isHiddenFormElement'])
&& $renderingOptions['_isHiddenFormElement'] === true
)
|| (
isset($renderingOptions['_isReadOnlyFormElement'])
&& $renderingOptions['_isReadOnlyFormElement'] === true
)
Copy link
Member

Choose a reason for hiding this comment

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

These two are gone with TYPO3v10 which is the minimum TYPO3 version by now.

*
* @return array
*/
protected function getFormValues(): array
Copy link
Member

Choose a reason for hiding this comment

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

A method with this name has been added in the meantime, can you integrate your changes there?

@mbrodala mbrodala added the enhancement New feature or request label Feb 4, 2022
@mbrodala
Copy link
Member

Would you like to update your PR as suggested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants