how to add an additional checkbox outside the model for controll purpose

Hi,

for my user managemnet i want to add an additional checkbox to _form.php so the user can send an e-mail with his unser account data or not.




<div class="row">

		<label>Send user data?</label>		

		<input name="emailSend" id="emailSend" value="1" type="checkbox" />			

</div>



when the checkbox is not activated, there is an error (Undefined index: emailSend) from the controller. I didn’t found anything in the forum or the wiki how to handel additional form elements to use later in the controller, but not in the model. do i have to build this on my own?

In the model you add a variable like:


public $emailSend

Add the validation rule for this…

To use


$model->emailSend