-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Sensitive form widget does not function correctly inside a repeater #1321
Comments
This made me laugh harder than it should've 😂. Looking into a fix now. |
@bennothommo it's possibly because of the use of
|
@LukeTowers I replaced the code with this and it resolves the issue: diff --git a/modules/backend/formwidgets/Repeater.php b/modules/backend/formwidgets/Repeater.php
index 4e834c8c3..c26ec1e0f 100644
--- a/modules/backend/formwidgets/Repeater.php
+++ b/modules/backend/formwidgets/Repeater.php
@@ -258,9 +258,7 @@ protected function processSaveValue($value)
*/
protected function processItems()
{
- $currentValue = ($this->loaded === true)
- ? post($this->formField->getName())
- : $this->getLoadValue();
+ $currentValue = $this->getLoadValue();
// Detect when a child widget is trying to run an AJAX handler
// outside of the form element that contains all the repeater Do you know why the value needs to be fetched from the post in the current code ? |
@mjauvin my guess would be for widgets & fields that are using dependsOn, or anything that uses AJAX to populate values, like dropdown options or something. |
Any idea on a fix then? |
I'll have to play around with it, hopefully this Wednesday. |
Winter CMS Build
dev-develop
PHP Version
8.3
Database engine
MySQL/MariaDB
Plugins installed
Lots :)
Issue description
When using
sensitive
in a repeater the value gets replaced by the placeholder on save / on view hidden.Steps to replicate
Make a form with the following:
Workaround
Use
text
:(The text was updated successfully, but these errors were encountered: