Skip to content

Add condition for saving hidden fields or not#33

Draft
PhilippKuhlmay wants to merge 1 commit intopagemachine:masterfrom
dkd:ignore_hidden_fields_while_saving
Draft

Add condition for saving hidden fields or not#33
PhilippKuhlmay wants to merge 1 commit intopagemachine:masterfrom
dkd:ignore_hidden_fields_while_saving

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.

@PhilippKuhlmay PhilippKuhlmay force-pushed the ignore_hidden_fields_while_saving branch from 2e219be to d414979 Compare February 17, 2020 15:59
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.

*/
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?

@johfeu
Copy link

johfeu commented Sep 4, 2024

pushed a new and updated pull request #229

@mbrodala mbrodala changed the title [FEATURE] Add condition for saving hidden fields or not Add condition for saving hidden fields or not Sep 11, 2024
@mbrodala mbrodala marked this pull request as draft September 11, 2024 09:54
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.

3 participants