moneytree Posted January 20, 2008 Share Posted January 20, 2008 Hi everyone , I am new to html code and tried to re-configure my existing webform on my site.It's a free web site for me from a company after I signed up its internet marketing course.The following is the html code which I had written and would like to insert and replace with my existing webform. My main objective for this webform is to collect opt-in data from those peoples who visited my site.The system should work in this manner...if a visitor filled in his/her name,email address and clicked the submit button,it will send out the opt-in data to my webmail account.Once the opt-in data had received,the system should reply to the visitor with a confirmation message with a free gifts down load link like : Thank you,click here.....for your freegifts. However,I have no idea on how to creat " a visitor confirmation message " for my webform. Please kindly advice the following : 1 ) Can I insert and replace my existing webform ( Get Instant Email Tips / which can be seen at the top-left of my site at www.moneymakeyourich.com ) with the following code ? My concern is my existing webform is designed in such a way eg,inside a box,can the new html code fix in this box ? <html> <body> <form METHOD="post" ENCTYPE="text/plain" ACTION="mailto:moneytree@moneymakeyourich.com"> <h3 align="center">Get your Free Gifts!<h3> First Name : <input type="text" name="FirstName" size="20"> <br> Last Name : <input type="text" name="LastName" size="20"> <br> Email Address : <input type="text" name="Emailaddress" size="20"> <br> <input type="Submit" value="submit"> </form> <p>Important:I will never share your informations with anyone ! And you can unsubscribe at any time</p> </body> </html> 2 ) What should I do in order to replace my existing webform with the new ones ? 3 ) What is the html code for " visitor confirmation message " ? Base on the above mentioned new html code ,where to place this code ? 4 ) Is there any better html code which can fulfil my main objective for the purpose of this webform issue ? I am open to any advice and assistance from you and look forward to hear from you soon. Thank you. Best regards Manicui Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/ Share on other sites More sharing options...
phpQuestioner Posted January 20, 2008 Share Posted January 20, 2008 1.) Not sure what you mean. 2.) Delete your existing code of your current form and replace it with your new code. 3.) You can do this clients side with javascript validation (to display a confirmation message in the page or use server side language to send them a confirmation email. 4.) Create server side form processing script and do away with the mailto:moneytree@moneymakeyourich.com (search google for "php form mail" - good way to start this off). Server side language, such as PHP, is the best way to use a form to send email. Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-444068 Share on other sites More sharing options...
moneytree Posted January 20, 2008 Author Share Posted January 20, 2008 Hi PhpQuestioner, I just wanted to say a BIG THANK YOU to you for the replied to my queries over webform issue. I am sorry for didn't get my message clear to you for question #1 as follow : 1 ) Can I insert and replace my existing webform ( Get Instant Email Tips / which can be seen at the top-left of my site at www.moneymakeyourich.com ) with the following code ? My concern is my existing webform is designed in such a way eg,inside a box,can the new html code fix in this box ? Clarification - If you take a look at my present webform,it already designed and display as what it is right now on my site...it is confined in this little table or box.My question is...I would like to display webform in this manner...about the same size of the table or box,will my new html code display the new webform in same manner ? Of course with the new text description. Regarding your advice on #3 as follow : 3.) You can do this clients side with javascript validation (to display a confirmation message in the page or use server side language to send them a confirmation email. Clarification - Are you saying with a javascript validation added to my new html code ? I wish I can write the javascript,however,I am new to programming and just started to learn html code,let alone writing a javascript,of course,I would like to learn it as it will benefit me in programming. But,for the moment,I would like to get it done asap in order to put my site up,running and start collecting opt-in data.May I have a request from you ? Is there any way for you to show me this javascript validation ? How to get it done ? ( Please take note,it is up tp you for this request,I think I am asking too much from you,but,I really need help to get my webform done and put my site up asap.) Anyway,many thanks for your reference of " php form mail ",it is very useful to any newbie like me. Thank you. Best regards Manicui Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-444147 Share on other sites More sharing options...
phpQuestioner Posted January 23, 2008 Share Posted January 23, 2008 well your current form has two text fields and your new one has 3 text fields, so it's going to take up a little more space. you need to seperate your form fields with either line breaks, divs, or table/tr/td or all of your form elements including the text are going to be horizontal instead of vertical(the way you have your current form on your site). as far as validating the form with javascript; I have posted a link below of a google search; you will be able to find examples/tutorials on how to do this there. if I write an entire script for you; you'll never learn how to do it on your own. http://www.google.com/search?hl=en&q=javascript+form+validation&btnG=Search good luck Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-446599 Share on other sites More sharing options...
moneytree Posted January 23, 2008 Author Share Posted January 23, 2008 Hi phpQuestioner, Good day to you. Referring to your advice to my webform issue posted on January 19, 2008, 10:25:31 PM as follow : ---------------------------------------------------------------------------------------------------- 2.) Delete your existing code of your current form and replace it with your new code. ---------------------------------------------------------------------------------------------------- I had drafted out the following and need your review,advice on it before I make the changes. A ) Regarding my exisitng webform on my site It is a free web site for me to jump-start my internet marketing from a company which I signed up its internet course.However,its webform is not configure to my email address and I can't receive any opt-in data.Therefore,I tried to write a new html code for my webform to replace it. My question is - Is it the correct way to delete the exisiting webform with the new ones as follow : Old webform code ( I had extracted it from my web site with html code before and after the form tag as a reference point for checking purpose ) ---------------------------------------------------------------------------------------------------- </div> <div class="sidebar"> <div id="formbox"> <h3>Get Instant Email Tips</h3> <script type="text/javascript" src="http://forms.aweber.com/form/25/953296625.js"></script> </div> <div id="infobox"> <h3>Why we choose the #1 Product</h3> ---------------------------------------------------------------------------------------------------- New webform code ( Please take note on where I insert the new code and which old code I had deleted ) ---------------------------------------------------------------------------------------------------- </div> <div class="sidebar"> <form METHOD="post" ENCTYPE="text/plain" ACTION="http://moneytree@moneymakeyourich.com/cgi-bin/formmail.pl"> <h3 align="center">Get your Free Gifts!<h3> <br> First Name : <input type="text" name="FirstName" size="20"> </br> Last Name : <input type="text" name="LastName" size="20"> </br> Email Address : <input type="text" name="Emailaddress" size="20"> </br> <input type="Submit" value="submit"> </form> <p>Important:I will never share your informations with anyone ! And you can unsubscribe at any time</p> </div> <div id="infobox"> <h3>Why we choose the #1 Product</h3> ---------------------------------------------------------------------------------------------------- B ) With this changes,does my new webform display in the same manner,same place within the table or rectangular box on my site ? It is alright if it is slightly bigger,as long as it is within the box. C ) How to carry out the test after the new changes on my site ? Many thanks for yout effort in helping me on this issue. Thank you. Manicui Note :phpQuestioner,I had posted some other webform issue included this ones,please ignore it. Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-446889 Share on other sites More sharing options...
phpQuestioner Posted January 24, 2008 Share Posted January 24, 2008 A.) Should be like this: </div> <div class="sidebar"> <div id="formbox"> <h3 align="center">Get your Free Gifts!<h3> <form METHOD="post" ENCTYPE="text/plain" ACTION="http://www.aweber.com/scripts/addlead.pl"> First Name : <input type="text" name="FirstName" size="20"> </br> Last Name : <input type="text" name="LastName" size="20"> </br> Email Address : <input type="text" name="Emailaddress" size="20"> </br> <input type="Submit" value="submit"> </form> <p>Important:I will never share your informations with anyone ! And you can unsubscribe at any time</p> </div> <div id="infobox"> <h3>Why we choose the #1 Product</h3> B.) It should; you just need to find the external javascript; which is: <script type="text/javascript" src="http://forms.aweber.com/form/25/953296625.js"></script> Delete it; and replace the empty space (where the external javascript that you just deleted was at) with your new html form. C.) You need to make sure your email address and other form variables are configured in your the perl script that processes you form. If they are not configured; you will not receive you email. And before you ask; I do not know how to configure a perl script; I know php, not perl and that is the server side language script that your original form has with it too process your form variables and send them to your email address. Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-448357 Share on other sites More sharing options...
phpQuestioner Posted January 25, 2008 Share Posted January 25, 2008 you can try this script I wrote; it's not a perfect science, but it will send form variables to a browser based email client via javascript. this is not the ideal way to handle/process form mail, but it may be just what your looking for. <script language="javascript"> var uremail="you@yourdomain.com"; // your email address here var sub="Opt-In"; // your email subject here // Do Not Alter Anything Beyond This Point function sendForm2WebMailClient() { var fname = document.getElementById('firstname').value; var lname = document.getElementById('lastname').value; var theiremail = document.getElementById('email').value; document.getElementById('emailsubject').value = sub; document.getElementById('emailcontent').value = 'FirstName:'+fname + '\r' + 'LastName:'+lname + '\r' + 'Email:'+theiremail; document.myform.action="mailto:"+uremail+""; document.myform.submit(); } </script> <form name="myform" method="get"> <!-- Do Not Remove Content Below --> <input type="hidden" name="subject" id="emailsubject"> <input type="hidden" name="body" id="emailcontent"> <!-- Do Not Remove Content Above --> First Name: <input type="text" name="FirstName" id="firstname"><br><br> Last Name: <input type="text" name="LastName" id="lastname"><br><br> Email: <input type="text" name="Email" id="email"><br><br> <input type="button" value="Submit" onclick="sendForm2WebMailClient()"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-448420 Share on other sites More sharing options...
moneytree Posted January 26, 2008 Author Share Posted January 26, 2008 Hi phpQuestioner, Good day to you. Many thanks for your advcie and assistance to me over my webform issue. I am trying to get it done with your advice and would post any question again if there is along the way. Thank you. Best regards Manicui Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-449376 Share on other sites More sharing options...
moneytree Posted January 26, 2008 Author Share Posted January 26, 2008 Hi phpQuestioner, Good day to you. Many thanks for your time and effort to help me on webform issue. I had tried the following script you wrote for webform,but,encountered problem. I tested it in notepad and view it in IE7 by filled up the first name,last name and email address,when I clicked on sumbit button,it seems like no respond at all. I had followed your advice and made the necessary changes as follow : ---------------------------------------------------------------------------------------------------- <html> <body> <script language="javascript"> var uremail="moneytree@moneymakeyourich.com"; // moneytree@moneymakeyourich.com var sub="Opt-In"; // Get Your Free Gifts ! function sendForm2WebMailClient() { var fname = document.getElementById('firstname').value; var lname = document.getElementById('lastname').value; var theiremail = document.getElementById('email').value; document.getElementById('emailsubject').value = sub; document.getElementById('emailcontent').value = 'FirstName:'+fname + '\r' + 'LastName:'+lname + '\r' + 'Email:'+theiremail; document.myform.action="mailto:"+uremail+""; document.myform.submit(); } </script> <form name="myform" method="get"> <!-- Do Not Remove Content Below --> <input type="hidden" name="subject" id="emailsubject"> <input type="hidden" name="body" id="emailcontent"> <!-- Do Not Remove Content Above --> First Name: <input type="text" name="FirstName" id="firstname"><br><br> Last Name: <input type="text" name="LastName" id="lastname"><br><br> Email: <input type="text" name="Email" id="email"><br><br> <input type="button" value="Submit" onclick="sendForm2WebMailClient()"> </form> </body> </html> ---------------------------------------------------------------------------------------------------- It may due to my misunderstanding of replacing some of the code. Please kindly advice and assist on the issue. Thank you. Best regards Manicui Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-449642 Share on other sites More sharing options...
bronzemonkey Posted January 26, 2008 Share Posted January 26, 2008 Just another thing. You form should be more in line with this kind of format. You should be using a fieldset and legend to denote different regions of the form, and labels for the inputs. If you are using an xhtml doctype you will also need to close the inputs properly. <form method="" action=""> <fieldset> <legend>Contact Information</legend> <div> <label for="firstName">First Name:</label> <input type="text" name="firstName" id="firstName"> </div> <div> <label for="lastName">Last Name:</label> <input type="text" name="lastName" id="lastName"> </div> <div> <label for="email">Email:</label> <input type="text" name="email" id="email"> </div> </fieldset> </form> If you decide to use a line break for for formatting parts of the form, it should look like this: <!-- in html doctypes --> <br> <!-- in xhtml doctypes --> <br /> Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-449678 Share on other sites More sharing options...
moneytree Posted January 26, 2008 Author Share Posted January 26, 2008 Hi Bronzemonkey, Many thanks for your advice over webform issue. However,I don't understand the code you posted to me as I am new and just started to learn html code. Is there anyway for you to explain to me from the newbie's point of view in order to get it done ? Thank you. Best regards Manicui Quote Link to comment https://forums.phpfreaks.com/topic/86857-webform-issuehow-to-get-it-done/#findComment-449703 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.