We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1db24de commit 5f6b0afCopy full SHA for 5f6b0af
formwidgets/Blocks.php
@@ -72,7 +72,7 @@ public function render()
72
protected function processSaveValue($value)
73
{
74
if (!is_array($value) || !$value) {
75
- return $value;
+ return null;
76
}
77
78
$count = count($value);
formwidgets/blocks/partials/_block.php
@@ -12,6 +12,10 @@
12
data-sortable-handle=".<?= $this->getId('items') ?>-handle"
13
<?php endif; ?>
14
>
15
+ <?php if (!$this->previewMode): ?>
16
+ <input type="hidden" name="<?= $this->getFieldName(); ?>">
17
+ <?php endif ?>
18
+
19
<ul id="<?= $this->getId('items') ?>" class="field-repeater-items">
20
<?php foreach ($formWidgets as $index => $widget) : ?>
21
<?= $this->makePartial('block_item', [
0 commit comments