looking for a form module

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   looking for a form module
budweis
CZ Super Newbie
 Codezwiz Site Donator
budweis has been a member for over 20 year's 20 Year Member
usa.gif missouri.gif
Status: Offline
Joined: Nov 21, 2004
0.01 posts per day
Posts: 63
Points: 4,344
   
im looking for a form module that can send the form values to a specified email address, anybody have anything like this? using nuke 7.4 patched



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
You could use a feedback module and change the form values to what you want.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   help with a form module
budweis
CZ Super Newbie
 Codezwiz Site Donator
budweis has been a member for over 20 year's 20 Year Member
usa.gif missouri.gif
Status: Offline
Joined: Nov 21, 2004
0.01 posts per day
Posts: 63
Points: 4,344
   
yeah i tried making one for a week out of the feedback one then out of the recommend to friend one but just couldnt get to work. my form uses like 30 fields and want to go to any email i want where the feedback one only goes to email set in nuke panel ,ive only made cgi forms before and been a while, my php knowledge isnt the greatest:) . i just figured if i seen a working one i could figure out mine and what im doing wrong. the prob is that fields dont show on the email it sends, why cant i get company name field to show in the email it sends in one below? it sends mail but doesnt include company name field but sends all the rest, if i figure this out form will be a snap.


<?php

if (!eregi("modules.php", $PHP_SELF)) {
   die ("You can't access this file directly...");
    }

$index = 0;
$myemail = "myemail";
$mysite = "sitename";
$nukesite = "www.site.com";
$formname = "Label Quote Sheet";
///////////////////////////////////////////////////////

include("header.php");

$form_block = "
<center>
<P><h2><strong>$formname</strong><br></h2>
<p><br><h4>Please use the form below to submit a Label Quote request.</h4></p>

<FORM METHOD=\"post\" ACTION=\"modules.php?op=modload&amp;name=Feedback&amp;file=index\">

<P><strong>Company Name:</strong><br>
<INPUT type=\"text\" NAME=\"company_name\" VALUE=\"$company_name\" SIZE=30></p>

<P><strong>Sender Name:</strong><br>
<INPUT type=\"text\" NAME=\"sender_name\" VALUE=\"$sender_name\" SIZE=30></p>

<P><strong>Your E-Mail Address:</strong><br>
<INPUT type=\"text\" NAME=\"sender_email\"  VALUE=\"$sender_email\" SIZE=30></p>

<P><strong>How will the Label be used? (include Exposure Conditions)</strong><br>
<TEXTAREA NAME=\"message\" COLS=50 ROWS=8 WRAP=virtual>$message</TEXTAREA></p>

<INPUT type=\"hidden\" name=\"opi\" value=\"ds\">

<P><INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"Send This Form\"></p>

</FORM><br><br>";

if ($opi != "ds") {

   echo "$form_block";
   
} else if ($opi == "ds") {
   
   if ($sender_name == "") {
      $name_err = "<center><font color=red>Please enter your name!</font></center><br>";
      $send = "no";
   }
   
   if ($sender_email == "") {
      $email_err = "<center><font color=red>Please enter your e-mail address!</font></center><br>";
      $send = "no";
   }
   
   if ($send != "no") {
   
      // it's ok to send!
      $msg = "$mysite\n";
      $msg .= "Company Name:     $company_name\n";
      $msg .= "Sender's Name:    $sender_name\n";
      $msg .= "Sender's E-Mail:  $sender_email\n";
      $msg .= "Message:          $message\n\n";
   
      $to = $myemail;
      $subject = "Label Quote Request";
      $mailheaders = "From: $nukesite <> \n";
      $mailheaders .= "Reply-To: $sender_email\n\n";

      mail($to, $subject, $msg, $company_name, $mailheaders);
      echo "<P><center>Mail has been sent!</center></p>";
      echo "<P><center>Thank you for contacting us</center></p>";
         // echo "<P><center>we will respond as soon as possible</center></p>";

   } else if ($send == "no") {
   
      echo "$name_err";
      echo "$email_err";
      echo "$message_err";
      echo "$form_block"; 
         
   }
   
}

   
    include("footer.php");

?>



Back to top Reply with quote
#4   re: looking for a form module
budweis
CZ Super Newbie
 Codezwiz Site Donator
budweis has been a member for over 20 year's 20 Year Member
usa.gif missouri.gif
Status: Offline
Joined: Nov 21, 2004
0.01 posts per day
Posts: 63
Points: 4,344
   
anyone got any hints or things i could try to get company field to show in this form when it emails it? everything works but it just doesnt show the company field.



Back to top Reply with quote
#5   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Try this one:



<?php

if (!eregi("modules.php", $PHP_SELF)) {
   die ("You can't access this file directly...");
    }

$index = 0;
$myemail = "myemail";
$mysite = "sitename";
$nukesite = "www.site.com";
$formname = "Label Quote Sheet";
///////////////////////////////////////////////////////

include("header.php");

$form_block = "
<center>
<P><h2><strong>$formname</strong><br></h2>
<p><br><h4>Please use the form below to submit a Label Quote request.</h4></p>

<FORM METHOD=\"post\" ACTION=\"modules.php?op=modload&amp;name=Feedback&amp;file=index\">

<P><strong>Company Name:</strong><br>
<INPUT type=\"text\" NAME=\"company_name\" VALUE=\"$company_name\" SIZE=30></p>

<P><strong>Sender Name:</strong><br>
<INPUT type=\"text\" NAME=\"sender_name\" VALUE=\"$sender_name\" SIZE=30></p>

<P><strong>Your E-Mail Address:</strong><br>
<INPUT type=\"text\" NAME=\"sender_email\"  VALUE=\"$sender_email\" SIZE=30></p>

<P><strong>How will the Label be used? (include Exposure Conditions)</strong><br>
<TEXTAREA NAME=\"message\" COLS=50 ROWS=8 WRAP=virtual>$message</TEXTAREA></p>

<INPUT type=\"hidden\" name=\"opi\" value=\"ds\">

<P><INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"Send This Form\"></p>

</FORM><br><br>";

if ($opi != "ds") {

   echo "$form_block";
   
} else if ($opi == "ds") {
   
   if ($sender_name == "") {
      $name_err = "<center><font color=red>Please enter your name!</font></center><br>";
      $send = "no";
   }
   
   if ($sender_email == "") {
      $email_err = "<center><font color=red>Please enter your e-mail address!</font></center><br>";
      $send = "no";
   }
   
   if ($send != "no") {
   
      // it's ok to send!
      $msg = "$mysite\n";
      $msg .= "Company Name:     $company_name\n";
      $msg .= "Sender's Name:    $sender_name\n";
      $msg .= "Sender's E-Mail:  $sender_email\n";
      $msg .= "Message:          $message\n\n";
   
      $to = $myemail;
      $subject = "Label Quote Request";
      $mailheaders = "From: $nukesite <> \n";
      $mailheaders .= "Reply-To: $sender_email\n\n";

      mail($to, $subject, $msg, $mailheaders);
      echo "<P><center>Mail has been sent!</center></p>";
      echo "<P><center>Thank you for contacting us</center></p>";
         // echo "<P><center>we will respond as soon as possible</center></p>";

   } else if ($send == "no") {
   
      echo "$name_err";
      echo "$email_err";
      echo "$message_err";
      echo "$form_block"; 
         
   }
   
}

   
    include("footer.php");

?>




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#6   re: looking for a form module
budweis
CZ Super Newbie
 Codezwiz Site Donator
budweis has been a member for over 20 year's 20 Year Member
usa.gif missouri.gif
Status: Offline
Joined: Nov 21, 2004
0.01 posts per day
Posts: 63
Points: 4,344
   
thanks yes it works now, appreciate the help:)



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum