473,563 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript Form - Gathering/consolidating field input issue

1 New Member
In this emal form, I'm trying to consolidate all the input into the TEXTAREA portion and then have it emailed to a specific person. I've tried the onClick and onBlur commands but only one field's input shows at a given time in the TEXTAREA box. Then, then when I move to the next field and input text, it just erases the choice from the first field in the TEXTAREA box below.

Basically, I want the data to consolidate in the TEXTAREA box and then when I click Submit, it will be emailed to me. The text should look like this in the TEXTAREA box and in the final email body:

Bob Smith
bob.smith@compa ny.com
USA
Foxtrot, Samba


Thanks everyone,
Joe


Here is the code:

Expand|Select|Wrap|Line Numbers
  1. <form enctype="application/x-www-form-urlencoded" name="mailform" action="%SCRIPTURL{sendemail}%/%WEB%/%TOPIC%" method="POST">
  2.  
  3. <h1><a name="Registration"></a> Dance Class Registration </h1>
  4.  
  5. <table border="0" cellpadding="0" cellspacing="12">
  6.  
  7. <td></td>
  8.   <td>Fields marked <code><font color='red'>**</font></code> are required</td>
  9. </tr>
  10.  
  11. <tr>
  12.   <td align="right"> Name: </td>
  13.   <td><input type="text" name="Name" size="40" class="twikiInputField" value="" /><code><font color="red">**</font></code> </td>
  14. </tr>
  15.  
  16. <tr>
  17.   <td align="right"> E-mail address: </td>
  18.   <td><input type="text" name="Email" size="40" class="twikiInputField" value="" /> <code><font color="red">**</font></code> </td>
  19. </tr>
  20.  
  21. </tr><tr>
  22.   <td align="right"> Country: </td>
  23.   <td>
  24.   <select name="Country" size="1" />
  25.   <option selected value="">Select...</option>
  26.   <option>USA</option>
  27.   <option>Albania</option>
  28.   <option>Algeria</option>
  29.   <option>Andorra</option>
  30.   <option>Angola</option>
  31.   <option>Argentina</option>
  32.   <option>Armenia</option>
  33.   <option>Aruba</option>
  34.   <option>Australia</option>
  35.   <option>Austria</option>
  36.   <option>Azerbaijan</option>
  37.   <option>Bahrain</option>
  38.   <option>Bangladesh</option>
  39.   <option>Belarus</option>
  40.   <option>Belgium</option>
  41.   <option>Belize</option>
  42.   <option>Benin</option>
  43.   <option>Bhutan</option>
  44.   <option>Bolivia</option>
  45.   <option>Bosnia and Hercegovina</option>
  46.   <option>Brazil</option>
  47.   <option>Bulgaria</option>
  48.   <option>Burundi</option>
  49.   <option>Cambodia</option>
  50.   <option>Cameroon</option>
  51.   <option>Canada</option>
  52.   <option>Central African Republic</option>
  53.   <option>Chile</option>
  54.   <option>China</option>
  55.   <option>Colombia</option>
  56.   <option>Congo</option>
  57.   <option>Costa Rica</option>
  58.   <option>Croatia</option>
  59.   <option>Cuba</option>
  60.   <option>Cyprus</option>
  61.   <option>Czech Republic</option>
  62.   <option>Denmark</option>
  63.   <option>Ecuador</option>
  64.   <option>Egypt</option>
  65.   <option>El Salvador</option>
  66.   <option>Estonia</option>
  67.   <option>Ethiopia</option>
  68.   <option>Fiji</option>
  69.   <option>Finland</option>
  70.   <option>France</option>
  71.   <option>Georgia</option>
  72.   <option>Germany</option>
  73.   <option>Gibraltar</option>
  74.   <option>Greece</option>
  75.   <option>Guam</option>
  76.   <option>Guatemala</option>
  77.   <option>Haiti</option>
  78.   <option>Hong Kong</option>
  79.   <option>Hungary</option>
  80.   <option>Iceland</option>
  81.   <option>India</option>
  82.   <option>Indonesia</option>
  83.   <option>Iran</option>
  84.   <option>Iraq</option>
  85.   <option>Ireland</option>
  86.   <option>Israel</option>
  87.   <option>Italy</option>
  88.   <option>Jamaica</option>
  89.   <option>Japan</option>
  90.   <option>Jordan</option>
  91.   <option>Kazakstan</option>
  92.   <option>Kenya</option>
  93.   <option>Korea</option>
  94.   <option>Kuwait</option>
  95.   <option>Kyrgyz Rebublic</option>
  96.   <option>Laos</option>
  97.   <option>Latvia</option>
  98.   <option>Lebanon</option>
  99.   <option>Liberia</option>
  100.   <option>Liechtenstein</option>
  101.   <option>Lithuania</option>
  102.   <option>Luxembourg</option>
  103.   <option>Libya</option>
  104.   <option>Macao</option>
  105.   <option>Macedonia</option>
  106.   <option>Malaysia</option>
  107.   <option>Malawi</option>
  108.   <option>Malta</option>
  109.   <option>Mauritius</option>
  110.   <option>Mexico</option>
  111.   <option>Moldova</option>
  112.   <option>Monaco</option>
  113.   <option>Morocco</option>
  114.   <option>Mozambique</option>
  115.   <option>Namibia</option>
  116.   <option>Nepal</option>
  117.   <option>Netherlands</option>
  118.   <option>New Zealand</option>
  119.   <option>Nicaragua</option>
  120.   <option>Nigeria</option>
  121.   <option>Norway</option>
  122.   <option>Oman</option>
  123.   <option>Pakistan</option>
  124.   <option>Panama</option>
  125.   <option>Paraguay</option>
  126.   <option>Peru</option>
  127.   <option>Philippines</option>
  128.   <option>Poland</option>
  129.   <option>Portugal</option>
  130.   <option>Romania</option>
  131.   <option>Russia</option>
  132.   <option>Saudi Arabia</option>
  133.   <option>Senegal</option>
  134.   <option>Singapore</option>
  135.   <option>Slovakia</option>
  136.   <option>Slovenia</option>
  137.   <option>South Africa</option>
  138.   <option>Spain</option>
  139.   <option>Sri Lanka</option>
  140.   <option>Suriname</option>
  141.   <option>Sweden</option>
  142.   <option>Switzerland</option>
  143.   <option>Syria</option>
  144.   <option>Taiwan</option>
  145.   <option>Tanzania</option>
  146.   <option>Thailand</option>
  147.   <option>Tajikistan</option>
  148.   <option>Tunisia</option>
  149.   <option>Turkey</option>
  150.   <option>Turkmenistan</option>
  151.   <option>Uganda</option>
  152.   <option>Ukraine</option>
  153.   <option>United Arab Emirates</option>
  154.   <option>United Kingdom</option>
  155.   <option>Uruguay</option>
  156.   <option>USA</option>
  157.   <option>Uzbekistan</option>
  158.   <option>Vatican City</option>
  159.   <option>Venezuela</option>
  160.   <option>Vietnam</option>
  161.   <option>Yemen</option>
  162.   <option>Yugoslavia</option>
  163.   <option>Zaire</option>
  164.   <option>Zambia</option>
  165.   <option>Zimbabwe</option>
  166.   <option value="Other Country">Other Country</option>
  167.   </select> <code><font color="red">**</font></code>
  168.   </td>
  169. </tr>
  170.  
  171. </tr><tr>
  172.   <td align="right"> Type of Dance: </td>
  173.   <td>
  174.   <Input type=radio class="twikiInputField" name="class1" value="Foxtrot" />Foxtrot
  175.   <Input type=radio class="twikiInputField" name="class2" value="Mambo" />Mambo
  176.   <Input type=radio class="twikiInputField" name="class3" value="Samba" />Samba
  177.   <Input type=radio class="twikiInputField" name="class4" value="Swing" />Swing
  178.   <Input type=radio class="twikiInputField" name="class5" value="Waltz" />Waltz
  179.   <Input type=radio class="twikiInputField" name="class6" value="Other">Other Dance (indicate in the Message section below)
  180.   </td>
  181. </tr>
  182.  
  183. <p><input type=hidden input class="twikiInputField" id="to" name="to" size="30" type="text" value="xxxxx@xxxxxxx.com" /></p>
  184.  
  185. <p><input type=hidden class="twikiInputField" id="subject" name="subject" size="30" value="Dance Class Registration" /></p>
  186.  
  187. <tr>
  188.   <td valign="top" align="right"> CC: (optional)<br /> </td>
  189.   <td><input type="text" class="twikiInputField" id="cc" name="cc" size="40"  value="" /></td>
  190. </tr>
  191.  
  192. <tr>
  193.   <td valign="top" align="right"> Message: <br /> </td>
  194.   <td><textarea class="twikiInputField" cols="40" name="body" rows="6" ></textarea></td>
  195. </tr>
  196.  
  197. </table>
  198.  
  199. <h5><a name="Check"></a> Verify that the information above is correct and click below to register. </h5>
  200.  
  201. <p><input type="submit" class="twikiSubmit" value="Register" %IF{"context SendEmailPluginEnabled" then='' else='disabled="disabled"'}% /></p>
  202.  
  203. %SENDEMAIL{feedbackSuccess="Successfully sent" feedbackError="Something went wrong." }%
  204.  
  205. </form>
Oct 10 '07 #1
1 1628
acoder
16,027 Recognized Expert Moderator MVP
You need to add to the textarea value rather than reset the value. You could use +=. For the newline, use "\n".
Oct 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
2468
by: Simon | last post by:
Hey folks, I need some of your expertiese again. I am creating a survey form and need some help gathering the results of a question that has checkboxes. There are four options for one of the questions for example Where do you normally buy books? o Bookstore o Online o Book club
7
2811
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) My code is below. I am getting the following error "MyForm.oNetwork.Value is Null or is not an object". I'm struggling to diagnose what to do next. ...
4
13377
by: Don W. | last post by:
Is it possible to open a browser window from a javascript for the purpose of gathering user input on a form and then use data from the form in the javascript? How do you get the data from the form into the script? Don W.
4
2329
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I need to: 1. Click a submit button on an asp page, calling another page that saves the contents of that form to a database and then displays
4
7282
by: Steph | last post by:
Hello, Can someone tell me the script to use for having a change on the same page when using checkbox function ? For example, i would to check one condition and display dynamically a button if the condition is checked on the same page. Thanks in advance for your help
1
1415
by: Nigel | last post by:
Hello, I am creating a Perl CGI page with Javascript which I believe has a problem with the javascript. Below is my form which has two submit buttons with two different actions. I am having an issue with my "Submit FAQ" button. The "Submit FAQ" button calls the javascript function validate(). This function is supposed to check to make...
16
2845
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the ass and the app will be used internally so I'm not too worried about users who aren't using javascript. I'm using the following javascript to detect...
2
3140
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button then the calender gone actually i want if i click outside off the calender then it should me removed ..How kan i do this ... Pls inform me as early...
8
1617
numberwhun
by: numberwhun | last post by:
Hello everyone! I am dabbling in processing forms using Perl and having only just begun, I am already having problems. Go figure. :-) Top begin with, here it the form's html, its nothing at all complicated: <div id="formcontent"> <h3>The New Information Gathering Form</h3> <form action="./cgi-bin/process_form.cgi" method="post">...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.