Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How do you make a form?

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok how do you make a form, for example a form that requires a persons name and phone Number.
I guess you would need a label saying "Name" and a text field next to it.
Then you would need a label saying "Phone No." and a text field next to that so that you can enter the number...
How do you do this.. i mean its easy to make labels and texfields.. but how do you line up a label with a textfield so that it looks really neat and nice..???
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you mean to create a from using HTML?
To align those, put them in a table.
For example:
< form action="servlet" method=GET>
< table>
< tr>
< td>Name
< td>< input type=text name=name size=20>
< tr>
< td>Phone No.
< td>< input type=text name=phone size=11>
< /table>
< /form>

[This message has been edited by Marilyn deQueiroz (edited November 15, 2001).]
 
June
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to write html code and by result it returned something with the real form.
Anyway, just use table and align text field and its label in the same table row (< tr>) but different < td>
< tr>
< td>label
< td>textField

[This message has been edited by Marilyn deQueiroz (edited November 15, 2001).]
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Put a space between the < and the tag when you post it here (not when you type it in your own form) to prevent the UBB software from converting your text into html.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic