This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

add new checkbox / pass mail to own db
#1

Reply
#2

Reply
#3

Ok, the whole thing is now working fine Smile wrote a function and used it after //add new subscriber in the includes\app\processor.php

so if no errors occure and the submit button is pressed i insert the mail in a seperate DB. Last problem - how can i set the checkbox-status per default to checked?

this is the code i have:

PHP Code:
<?php global $cmtx_default_newsletter; ?>
<div class="cmtx_label">&nbsp;</div>
<?php if ($cmtx_default_newsletter) { ?>
<input name="cmtx_newsletter" type="checkbox" class="cmtx_checkbox_field" checked="checked" />
<?php } else { ?>
<input name="cmtx_newsletter" type="checkbox" class="cmtx_checkbox_field" />
<?php } ?>
<span class="cmtx_notify_text">get the Newsletter</span>
Reply
#4

This should work:

PHP Code:
<div class="cmtx_label">&nbsp;</div>
<?
php if ($_SERVER['REQUEST_METHOD'] == 'POST' && !isset($_POST['cmtx_newsletter'])) { ?>
<input name="cmtx_newsletter" type="checkbox" class="cmtx_checkbox_field">
<?php } else { ?>
<input name="cmtx_newsletter" type="checkbox" class="cmtx_checkbox_field" checked>
<?php } ?>
<span class="cmtx_notify_text">get the Newsletter</span>

Have you completed the interview?
Reply
#5

thanks a lot! that worked great Smile
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
23-Feb-2014, 01:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)