Hello everybody
I'm trying to integrate a simple mail-Form, where users can check the E-Mail recipients by selecting the users with a checkbox.
What i was trying to do now, was to create a custom event, in which i want to check the value of the checkbox in the "on submit" event.
What i wrote in the custom event was the fallowing code:
I want to replace the echo-code with the mail-sending event after this code works.
But not even this code works. Not echo-line will be displayed at all. I made a dummy function with a simple text-output and no conditions. This output works, so the problem must be somewhere in the condition.
Is the function "document.getElementById" valid in the ustom code? Is there an fault in my code? Is there an easier way to check the values of the checkbox?
Thanks for your support and greetings from
hafisch
I'm trying to integrate a simple mail-Form, where users can check the E-Mail recipients by selecting the users with a checkbox.
What i was trying to do now, was to create a custom event, in which i want to check the value of the checkbox in the "on submit" event.
What i wrote in the custom event was the fallowing code:
<?php
if (document.getElementById("recipients").checked = true) {
echo "recipients checked";
}else{
echo "recipients not checked";
}
?>
I want to replace the echo-code with the mail-sending event after this code works.
But not even this code works. Not echo-line will be displayed at all. I made a dummy function with a simple text-output and no conditions. This output works, so the problem must be somewhere in the condition.
Is the function "document.getElementById" valid in the ustom code? Is there an fault in my code? Is there an easier way to check the values of the checkbox?
Thanks for your support and greetings from
hafisch
This topic is locked and no more replies can be posted.