Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 07-22-2009, 12:36 PM   #1
Active Warrior
 
Join Date: Jun 2009
Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
Default Need help with form set up!

Hi all

I have a bit of trouble to get my form working. I am building my site with Joomla and use FCKeditor to create articles. When I edit my form properties I have to choose a method - either get or post. Now the problem is I don't know where to specify the address to which the information must be sent, or will it be saved somewhere in a directory?

Do I need to add code, maybe a module or extension? Please help!

Regards
Cruiser is offline   Reply With Quote
Old 07-22-2009, 01:01 PM   #2
Advanced Warrior
War Room Member
 
Join Date: Feb 2008
Location: Escondido, CA. Becase San Marcos just wasn't hot enough.
Posts: 510
Thanks: 35
Thanked 56 Times in 55 Posts
Default Re: Need help with form set up!

Cruiser,
The Action= tag in your form code tells the computer what to do with the info typed into the fields. That tag will point to a file. Some kind of script file that contains within it the instructions on where to send the info.
Aronya is offline   Reply With Quote
Old 07-22-2009, 01:10 PM   #3
Active Warrior
 
Join Date: Jun 2009
Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
Default Re: Need help with form set up!

Thanks, can you please help me to configure this? I don't know coding and just want the easiest way for this to work. Let's say I want to send the info to contacts-at-mysite-dot-com, how will the code look and where exactly must I put it. I have seen the CSS editor in FCKeditor and know I must put it there somewhere. I thought action meant the page to which the user is redirected after submition, or does this also have to be included in the code?
Cruiser is offline   Reply With Quote
Old 07-22-2009, 01:38 PM   #4
Advanced Warrior
War Room Member
 
Join Date: Feb 2008
Location: Escondido, CA. Becase San Marcos just wasn't hot enough.
Posts: 510
Thanks: 35
Thanked 56 Times in 55 Posts
Default Re: Need help with form set up!

Everything has to be included in the code, or it just doesn't happen.

Here's the basic concept:
You have visitors to a website. On that site you have a form that asks for information from the visitor. Let's say you ask for name & email address. The visitor fills in those 2 fields & clicks Submit.

When the Submit button is clicked, your form is instructed to call a file into action. That file can send the info from those 2 fields to an email address, write it to a text file, or it can send it to a database somewhere. It's up to you, but you have to have the script set up for the form to call. Then, the script does the work.

I'm not a programmer, so I look for what's easy to implement. I've been happy with having the info sent to me via email, using a script called 'mailer.php'. Not sure anymore where I found it, except that it was written by a guy named Ryan on a forum I used to hang out on. Do a search for 'mailer.php' & you'll come up with a ton of options. Or post in the programming forum here, asking for a script to do what you want.

Good luck.
Aronya is offline   Reply With Quote
Old 07-22-2009, 02:03 PM   #5
Active Warrior
 
Join Date: Jun 2009
Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
Default Re: Need help with form set up!

Thanks, I now understand a lot more! I'm sure I will be able to find the script somewhere! Thanks again!
Cruiser is offline   Reply With Quote
Old 07-22-2009, 03:14 PM   #6
Active Warrior
 
Join Date: Jul 2009
Posts: 31
Thanks: 18
Thanked 4 Times in 4 Posts
Default Re: Need help with form set up!

I might be able to help you out with this. Can you post the code used to generate your form?
scriptnique is offline   Reply With Quote
Old 07-23-2009, 03:12 AM   #7
Active Warrior
 
Join Date: Jun 2009
Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
Default Re: Need help with form set up!

That would be great!! Here is it...

<p style="text-align: center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</p>
<form action="*don't know*" method="post" name="Form">
<p>&nbsp;</p>
<p style="text-align: center"><input name="Name" type="text" /></p>
<p style="text-align: center"><input name="E-mail" type="text" /></p>
<p style="text-align: center">&nbsp;</p>
<p style="text-align: center"><input type="submit" name="Submit Button" value="Send" /></p>
</form>
<p>&nbsp;</p>

I don't know if my method should be get or post. I would like to have the info sent to me in an e-mail as well as stored in a text file. Where will this text file be stored?

I have an additional question and I think you might help. If I have a pdf file to download, say like an information document, how must the link look like? I am using Joomla and I think I need to save the pdf in a folder in the media manager, and then create a link to it somehow?

Thank you very much for your time and effort!!

Regards
Cruiser is offline   Reply With Quote
Old 07-23-2009, 05:22 AM   #8
Active Warrior
 
Join Date: Jun 2009
Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
Default Re: Need help with form set up!

I soved the problem to create a link to download a pdf document, was really easy! Now it's just my form I must get right!
Cruiser is offline   Reply With Quote
Old 07-23-2009, 10:11 AM   #9
Active Warrior
 
Join Date: Jul 2009
Posts: 31
Thanks: 18
Thanked 4 Times in 4 Posts
Default Re: Need help with form set up!

Hey there. I put together some code for sending the email and listed it below. You'll want to change the value for the variable youremail to the email address you want the info sent to. You can change the subject as well. I commented those variables inside Begin value changes. You'll want to replace the entire form with the code below.

PHP Code:
<?php
if (strlen($_POST["Name"]) > 0)
{
// Begin value changes
$youremail "YOUREMAILADDRESSHERE@YOURADDRESS.COM";
$subject "Your Subject For Email";
// End value changes

$status TRUE;
$regexp "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";
if (!
eregi($regexp$_POST["Email"]))
{
$status FALSE;
$message .= "<p>Email Address is invalid. Please enter another email address.</p>";
}
if (!
preg_match('/^[a-zA-Z0-9 _]{1,140}$/',$_POST["Name"]))
{
$status FALSE;
$message .= "<p>Name entered is invalid. Please enter another Name.</p>";
}
if(
$status != FALSE)
{
$headers "From: " $_POST["Email"] . "\r\n";
$headers .= "X-Identification: ECS-Mk1-B\r\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
$headers .= "Content-Transfer-Encoding: 7bit\n\n";
$sendemail mail($youremail$subject"Name: " $_POST["Name"] . "\n" "Email Address: " $_POST["Email"] . "\n\n"$headers);
$message .= "<p>Message has been sent.</p>";
}
echo 
$message;
}
?>
HTML Code:
<p style="text-align: center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<form action="*don't know*" method="post" name="Form">
<p>&nbsp;</p>
<p style="text-align: center"><input name="Name" type="text" /></p>
<p style="text-align: center"><input name="Email" type="text" /></p>
<p style="text-align: center">&nbsp;</p>
<p style="text-align: center"><input type="submit" name="Submit Button" value="Send" /></p>
</form>
<p>&nbsp;</p>
Now mind you, i've only had one cup of coffee this morning so if there are any errors please let me know.
scriptnique is offline   Reply With Quote
Old 07-23-2009, 10:16 AM   #10
Active Warrior
 
Join Date: Jul 2009
Posts: 31
Thanks: 18
Thanked 4 Times in 4 Posts
Default Re: Need help with form set up!

Sorry forgot the form action. You'll want the form action to be:

<form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post" name="Form">
scriptnique is offline   Reply With Quote
Old 07-23-2009, 12:26 PM   #11
Web Goddess
War Room Member
 
LADWebDesign's Avatar
 
Join Date: Jan 2007
Location: Central Florida, USA
Posts: 355
Blog Entries: 1
Thanks: 11
Thanked 23 Times in 21 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile 
Contact Info
Send a message via Yahoo to LADWebDesign
Default Re: Need help with form set up!

I use the RS Form extension for Joomla - makes it very easy to set up a form, and great support. Joomla! Form (not an affiliate link)

LAD Web Design

Follow me on Twitter
LADWebDesign is offline   Reply With Quote
Old 07-23-2009, 01:38 PM   #12
Active Warrior
War Room Member
 
newbyr's Avatar
 
Join Date: Aug 2006
Location: Atlanta, Georgia
Posts: 39
Thanks: 2
Thanked 1 Time in 1 Post
Contact Info
Send a message via ICQ to newbyr Send a message via AIM to newbyr Send a message via MSN to newbyr Send a message via Yahoo to newbyr
Default Re: Need help with form set up!

I agree with LADWebDesign. This component is relatively cheap, and does the job very well.

Quote:
Originally Posted by LADWebDesign View Post
I use the RS Form extension for Joomla - makes it very easy to set up a form, and great support. Joomla! Form (not an affiliate link)
newbyr is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design

Tags
form, set

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 03:25 PM.