Hi,
(ich arbeite mit extbase 1.0.2 und fluid 1.0.2)
ich hab ein Formular fürs Frontend, welches unter anderem eine Checkbox enthält:
<h3>Edit Settings</h3>
<f:if condition="{customer}">
<f:then>
<f:form action="update" controller="Customer" method="post" name="customer" object="{customer}">
<label>Freischaltcode</label><br/>
<f:form.textbox property="activationcodeId"/>
<br/><br/>
<label>Newsletter</label>
<f:form.checkbox property="newsletter" checked="{customer.newsletter} == 1"/>
<br/><br/>
<f:form.submit value="Abschicken" name="submit"/>
</f:form>
</f:then>
</f:if>
updateAction Funktion im Controller sieht so aus:
<?php
/**
*
* Updates an existing customer
*
* @param Tx_MyExt_Domain_Model_Customer $customer
*
* @return void
*/
public function updateAction(Tx_VvsBonusbereich_Domain_Model_Customer $customer) {
if($this->accessControlService->hasLoggedInFrontendUser()) {
$this->customerRepository->update($customer);
}
$this->redirect('list');
}
?>
Während beim Speichern der Wert aus dem Textfeld "activationcodeId" brav gespeichert wird, wird der Wert der Checkbox nicht übernommen. Wieso nicht? 🙁
Danke für jeden Tipp!