close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

cc email based on checkbox

Thread began 3/08/2015 6:23 pm by asnw0764437428 | Last modified 3/09/2015 2:40 pm by Jason Byrnes | 877 views | 7 replies |

asnw0764437428

cc email based on checkbox

The set up works as follows.
A user clicks on a banner that calls up specific details from a database and appends those details to a form (hidden) with additional fields for their name, email address to enter etc. etc.

At the bottom of the form is a checkbox which is binded with the email address thats pulled from the database.

The option is, if this checkbox is clicked the email address binded to the checkbox also receives a copy of the whole form including the appended details that were pulled from the database when submitted.

This final part is not working as for some reason regardless of whether the checkbox is checked a copy is still sent to that specific email address.

Any suggestions on how to fix this?

I've attached a stripped out page with current code minus the design etc.

Sign in to reply to this post

Jason ByrnesWebAssist

when you test what email address is in the value of the checkbox?

and please send a copy of the webassist/email/waue_apply_1.php file so i can see the code for the email settings.

Sign in to reply to this post

asnw0764437428

The email address for the checkbox value is dynamic as its pulled from the database and dependant on which banner is clicked in the first place. This all works ok. The problem seems to be with the checkbox itself. It sends a copy of the completed form regardless of whether the checkbox is ticked or not.
waue_apply_1.php attached

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

asnw0764437428

see pm

Sign in to reply to this post

Jason ByrnesWebAssist

so, the version of the apply.php page on your server is not the same as the one you sent me in your massage.

on the server, you are creating an array of the ccmail elements, one as a hidden element:

<input type="hidden" name="ccmail[]" value="<?php echo $row_pulllinkIn['bis_email']; ?>" id="ccmail_0" />

and then one as the checkbox.
<input type="checkbox" name="ccmail[]" value="" id="ccmail_1" />


the checkbox doesn't have a value, so it won't do anything. but the hidden element always a value.

the email is being sent the cc address because of the hidden element.

on your page i deleted the hidden element and edited the checkbox:
<input type="checkbox" name="ccmail" value="<?php echo $row_pulllinkIn['bis_email']; ?>" id="ccmail_1" />

i also had to remove the implode functions in the webassist/email/waue_apply_1.php file.

Sign in to reply to this post

asnw0764437428

pm

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...