BOARDS

planetluc.com discussion board

all about the planetlu.com scripts

You are not logged in.

Announcement

I had to clean the boards due to massive spam. Actually i deleted everything /-one after 1st Oct 2008. It was the only way to get this spam out of the boards. So i'm sorry for all serious users who registered/posted meanwhile.

#1 03-04-2008 23:10:08

dreamlex
New member
Registered: 03-04-2008
Posts: 7

Contact Form not sending to the user

I checked the forum for solution but I don't think there is one.

I tested by sending the form as a user - the user received the form notification, but the user wouldn't know whether the owner got the form submission -- no email was sent to the owner.

I wonder if I need to modify code for the owner to be able to get email once the form is sent? $targetAddress="owner's email address" - I assume that it is for "from email" to be seen in the email.

Help will be appreciated.

thanks

Last edited by dreamlex (03-04-2008 23:22:03)

Offline

 

#2 04-04-2008 19:28:09

sidtheduck
Moderator
From: down by the water
Registered: 14-07-2006
Posts: 515
Website

Re: Contact Form not sending to the user

dreamlex,

Just to clarify your question:
1. Webmaster sets up ContactForm
2. User fills out ContactForm
3. Webmaster gets email
4. User gets "Thank you" message

Correct?

Now, if I am reading your question right, you want:
5. User gets copy of sent email.

Is this what you are asking for?


If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands.                ~Douglas Adams~

Offline

 

#3 04-04-2008 21:03:52

dreamlex
New member
Registered: 03-04-2008
Posts: 7

Re: Contact Form not sending to the user

yes you are right. I want the user to get the copy of the email :)

Offline

 

#4 04-04-2008 21:18:44

sidtheduck
Moderator
From: down by the water
Registered: 14-07-2006
Posts: 515
Website

Re: Contact Form not sending to the user

This *should* work.  Find the following code and edit in the bold:

if ($field[3] == "email"){
  $message .= "mailto:".$_REQUEST[$field[1]];
  $fromAddress = "From: ".$_REQUEST[$field[1]];
  $fromAddress.= "CC: ".$_REQUEST[$field[1]];
}else if ($field[2] == "checkbox" || $field[2] == "multiselect"){


If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands.                ~Douglas Adams~

Offline

 

#5 16-04-2008 20:15:12

dreamlex
New member
Registered: 03-04-2008
Posts: 7

Re: Contact Form not sending to the user

thanks for the solution. I am sorry that I checked the forum late.

One more thing - I would like to have the user click the submit button ("print") and the new window will pop up with the data that the user fills the form out so that the user could print it out.

is it possible?

Offline

 

#6 16-04-2008 21:13:46

sidtheduck
Moderator
From: down by the water
Registered: 14-07-2006
Posts: 515
Website

Re: Contact Form not sending to the user

dreamlex,

Did you want the "print" popup to appear when they submit the email?  Or would you rather have them submit, the "Thank You" message appear with what they emailed and a "Print" button on this page that pops up a clean version for printing?

Just curious.  Let me know.


If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands.                ~Douglas Adams~

Offline

 

#7 16-04-2008 21:23:49

dreamlex
New member
Registered: 03-04-2008
Posts: 7

Re: Contact Form not sending to the user

The latter is what I want.

But - the former one -
I wonder if the "print" popup appear when they submit the email - will the user and owner still receive the emails? I think this version is short and better?

All the users need is to submit the form and the page in new window should have the data from what they input in the form and they print.

Is it possible to make one?

Last edited by dreamlex (16-04-2008 23:21:31)

Offline

 

#8 17-04-2008 02:04:56

dreamlex
New member
Registered: 03-04-2008
Posts: 7

Re: Contact Form not sending to the user

or it is not possible?

Offline

 

#9 17-04-2008 02:28:25

sidtheduck
Moderator
From: down by the water
Registered: 14-07-2006
Posts: 515
Website

Re: Contact Form not sending to the user

dreamlex,

It is possible.  I would recommend the latter.  That way, the user doesn't accidentally send the email multiple times if the popup gets blocked and they don't notice.

It'll take me just a little bit to code up what you want (it will probably take a separate file called '/forum/print.html' to do what you would like it to do).

I'll let you know what I come up with.


If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands.                ~Douglas Adams~

Offline

 

#10 17-04-2008 03:31:30

dreamlex
New member
Registered: 03-04-2008
Posts: 7

Re: Contact Form not sending to the user

ok, thank you and i'll be waiting for your news :)

thank you for your help!

Offline

 

#11 17-04-2008 19:10:06

dreamlex
New member
Registered: 03-04-2008
Posts: 7

Re: Contact Form not sending to the user

just wonder how it is going? Is it going to be completed soon? I am looking forward to have it work with print.php.

Offline

 

#12 24-04-2008 18:45:28

sidtheduck
Moderator
From: down by the water
Registered: 14-07-2006
Posts: 515
Website

Re: Contact Form not sending to the user

dreamlex,

Sorry, I've been swamped lately.  I'll try to get to this soon (unless you wanted to try it yourself).  Basically, just create a hidden input with the $message variable, have a submit button to open in a new window pointing to print.php.  Then print.php echos the submitted form post variables with a javascript window.onload to force an automatic print.


If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands.                ~Douglas Adams~

Offline

 

#13 15-05-2008 21:39:11

sidtheduck
Moderator
From: down by the water
Registered: 14-07-2006
Posts: 515
Website

Re: Contact Form not sending to the user

dreamlex,

I finally was able to scrape together some time to get this coded for you.

In '/forum/contact_1.5.html' add the following code below the echo $txtThankyou; code:

Code:

echo $txtThankyou;
echo "\n<br/>\n<strong>You Wrote:</strong><br/>\n-----------------------------------<br/>\n".nl2br(stripslashes($message))."<br/>\n-----------------------------------<br/>\n";
echo "\n<form name=\"contact_print\" action=\"print.php\" method=\"post\" target=\"_blank\">\n";
echo "<input type=\"hidden\" name=\"contact_message\" value=\"".urlencode($message)."\" />\n";
echo "<input type=\"submit\" name=\"print_button\" value=\"Print\" />\n";
echo "</form>";

Then, create a new file called '/forum/print.html' and place the following code in that file:

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Contact Form Print</title>
</head>
<body onload="window.print();">
<a href="print.php" onclick="window.print();return false;">Print this</a>
<hr/><br/>
<?php echo nl2br(stripslashes(urldecode($_POST['contact_message']))); ?>
<br/><br/><hr/>
</body>
</html>

That should do it for you!


If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands.                ~Douglas Adams~

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

 
 
© 2003-2010 by planetluc.com · Bachtelstrasse 104 · CH-8400 Winterthur | Support | Login |