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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Values from select menu and checkboxs wont pass to email?

Thread began 8/09/2010 8:53 pm by blackweldermhe400113 | Last modified 11/07/2011 4:40 pm by Jason Byrnes | 1128 views | 9 replies |

blackweldermhe400113

Values from select menu and checkboxs wont pass to email?

I'm having a problem with the select menu values and the checkbox values passing to my email. The code is as follows. Can anyone tell me what I'm doing wrong?
Thanks

<html><head>
<style type="text/css">
.name {
margin: 0 0 8px 0;
padding: 0;
font: 14px Georgia,"Trebuchet MS", Arial, Helvetica, sans-serif;
color: #ddb557;
}
.email {
margin: 0 0 8px 0;
padding: 0;
font: 12px Georgia,"Trebuchet MS", Arial, Helvetica, sans-serif;
color: #838383;
}
.phone {
margin: 0 0 8px 0;
padding: 0;
font: 12px Georgia,"Trebuchet MS", Arial, Helvetica, sans-serif;
color: #838383;
}
.bestDayTime {
margin: 0 0 8px 0;
padding: 0;
font: 12px Georgia,"Trebuchet MS", Arial, Helvetica, sans-serif;
color: #838383;
}
.confirmBy {
margin: 0 0 8px 0;
padding: 0;
font: 12px Georgia,"Trebuchet MS", Arial, Helvetica, sans-serif;
color: #838383;
}
</style>
</head>
<body>

<p class="name"><?php echo ((isset($_POST["Appointment_request_group_Title"]))?$_POST["Appointment_request_group_Title"]:"")?> <?php echo ((isset($_POST["Appointment_request_group_First_name"]))?$_POST["Appointment_request_group_First_name"]:"")?> <?php echo ((isset($_POST["Appointment_request_group_Last_name"]))?$_POST["Appointment_request_group_Last_name"]:"")?></p>
<p class="email"><em><?php echo ((isset($_POST["Appointment_request_group_Email"]))?$_POST["Appointment_request_group_Email"]:"")?></em></p>
<p class="phone"><?php echo ((isset($_POST["Appointment_request_group_Phone"]))?$_POST["Appointment_request_group_Phone"]:"")?></p>
<p class="bestDayTime"><?php echo ((isset($_POST["Appointment_request_group_Best_day"]))?$_POST["Appointment_request_group_Best_day"]:"")?> <?php echo ((isset($_POST["Appointment_request_group_Best_times[]"]))?$_POST["Appointment_request_group_Best_times[]"]:"")?></p>
<p class="confirmBy"><?php echo ((isset($_POST["Appointment_request_group_Confirm_by[]"]))?$_POST["Appointment_request_group_Confirm_by[]"]:"")?></p>
<p class="confirmBy"><?php echo ((isset($_POST["Appointment_request_group_Confirm_by[]"]))?$_POST["Appointment_request_group_Confirm_by[]"]:"")?></p>

</body>
</html>

Sign in to reply to this post

Jason ByrnesWebAssist

when using multi check boxes, or multi select lists, you need top edit the code to use the implode function to convert the array to a comma seperated list.

For example, change:

php:
<?php echo ((isset($_POST["Appointment_request_group_Best_times[]"]))?$_POST["Appointment_request_group_Best_times[]"]:"")?>



to:

php:
<?php echo ((isset($_POST["Appointment_request_group_Best_times"]))?implode(", "$_POST["Appointment_request_group_Best_times"]):"")?>
Sign in to reply to this post

blackweldermhe400113

I'll try that.

Thanks Jason!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

MikeyT

similar problem to above

Jason, I'm having a similar problem in that I can't seem to pass two checkbox values to the email that Universal Email creates. Attached is the code block for the group of checkboxes. The user should be able to check both boxes if they'd like. Basically, one is for a newsletter sign-up and the other is to request another piece of company literature.

I tried swapping $_POST with implode like you've mentioned, but get syntax errors if I don't include $_ before it. It didn't seem to work anyway. I'm not sure what the heck I should be doing honestly. Thanks.

Attached Files
checkbox_group.txt
Sign in to reply to this post

Jason ByrnesWebAssist

you will need to use the implode function like my previous examples.

you say:
I tried swapping $_POST with implode like you've mentioned, but get syntax errors if I don't include $_ before it.

where are you putting this code?

what exactly is the code you are using?

if you are getting syntax errors, it;s because you are not implementing the code correctly, I wont be able to what the issue is without seeing the code you are using.

also, what version of universal email?

Sign in to reply to this post

MikeyT

Isn't the code attached to my last post? I'm using whatever version of Universal Email ships with the latest Form Builder build. I'm sorry for sounding vague, but if I'm not asking the right questions its because I might not be able to properly articulate the symptoms surrounding the issue I'm having. I added implode to the string of php code surrounding the checkboxes. I don't believe the code that I attached to my last post includes the implode function anymore.

Sign in to reply to this post

Jason ByrnesWebAssist

the code attached to your post does not include the implode function.


send a copy of the page please and a copy of the webassist/email folder. Copy those to a zip archive and attach the zip file to your replay, with your files I will be able to tell you what needs to be changed

Sign in to reply to this post

MikeyT

source files attached

Thanks for the quick response and your patience.

Attached Files
source.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post
loading

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...