![]() | | ||||||||
| | #1 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
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 |
| | |
| | #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
|
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. |
| | |
| | #3 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
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?
|
| | |
| | #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
|
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. |
| | |
| | #5 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
Thanks, I now understand a lot more! I'm sure I will be able to find the script somewhere! Thanks again!
|
| | |
| | #6 |
| Active Warrior Join Date: Jul 2009
Posts: 31
Thanks: 18
Thanked 4 Times in 4 Posts
|
I might be able to help you out with this. Can you post the code used to generate your form?
|
| | |
| | #7 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
That would be great!! Here is it... <p style="text-align: center"> </p> <form action="*don't know*" method="post" name="Form"> <p> </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"> </p> <p style="text-align: center"><input type="submit" name="Submit Button" value="Send" /></p> </form> <p> </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 |
| | |
| | #8 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
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!
|
| | |
| | #9 |
| Active Warrior Join Date: Jul 2009
Posts: 31
Thanks: 18
Thanked 4 Times in 4 Posts
|
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: HTML Code: <p style="text-align: center"> </p> <form action="*don't know*" method="post" name="Form"> <p> </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"> </p> <p style="text-align: center"><input type="submit" name="Submit Button" value="Send" /></p> </form> <p> </p> |
| | |
| | #10 |
| Active Warrior Join Date: Jul 2009
Posts: 31
Thanks: 18
Thanked 4 Times in 4 Posts
|
Sorry forgot the form action. You'll want the form action to be: <form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post" name="Form"> |
| | |
| | #11 |
| Web Goddess War Room Member Join Date: Jan 2007 Location: Central Florida, USA
Posts: 355
Blog Entries: 1 Thanks: 11
Thanked 23 Times in 21 Posts
|
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)
|
| | |
| | |
| | #12 | |
| Active Warrior War Room Member Join Date: Aug 2006 Location: Atlanta, Georgia
Posts: 39
Thanks: 2
Thanked 1 Time in 1 Post
|
I agree with LADWebDesign. This component is relatively cheap, and does the job very well. Quote:
| |
| | |
![]() |
|
| Tags |
| form, set |
| Thread Tools | |
| |
![]() |