How can I set up the form of “Email with attachments” so that the data of checkbox and radio inputs are displayed again in case of a refresh?
I have tried the following code that didn’t work:
For radio inputs:
<div class="form-element">
<?php $value = $form->$data['fuehrerschein'] ?? null ?>
<label><?= $page->labelfuehrerschein() ?>
<input type="radio" name="fuehrerschein" value="ja"<?php if($value == 'ja'): ?> checked<?php endif ?> /><?= $page->labelfuehrerschein1() ?>
</label>
<label>
<input type="radio" name="fuehrerschein" value="nein"<?php if($value == 'nein'): ?> checked<?php endif ?> /><?= $page->labelfuehrerschein2() ?>
</label>
</div>
and for the checkbox:
<div class="form-element">
<?php $value = $form->$data['datenschutz'] ?? null ?>
<div class="datenschutztext"><?= $page->labeldatenschutztxt()->blocks() ?> </div>
<label class="custom-control fill-checkbox">
<input type="checkbox" id="datenschutz" name="datenschutz" class="fill-control-input" value="true"<?php if($value == 'true'): ?> checked<?php endif ?> >
<span class="fill-control-indicator"></span>
</label>
</div>
How do I code this to make it work?