Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I have a form with 5 entry f

Status
Not open for further replies.

RebelFox

Programmer
Jun 16, 2002
62
0
0
GB
Hi,

I have a form with 5 entry fields in it.
The fields are search criteria for a little internal telephone database I want to make available over our intranet.

How do I display the form so that the input text fields all
line up vertically next to the prompt text?
For Example, assume the '.' symbols represent a text entry box.

Forename ....................
Surname ....................
Department ....................
Location ....................

In reality I get something like this with each input text field occurring immediatly after the text prompt:-

<FORM ACTION=&quot;SearchResults.asp&quot; METHOD=POST>
Surname<INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Surname&quot;><BR>
Forename<INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Forename&quot;<BR>
Department<INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Department&quot;<BR>
Location<INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Location&quot;<BR>
<INPUT TYPE = &quot;SUBMIT&quot; VALUE = &quot;Login&quot;>   
<INPUT TYPE=&quot;RESET&quot;>
</FORM>

Forename...................
Surname...................
Department...................
Location..................

I've tried putting ' ' characters as padding, and I've tried putting the prompts in a one table column and the form entry fields in another table column but niether works.

 
Hi

How about putting it in a table something like:

<FORM ACTION=&quot;SearchResults.asp&quot; METHOD=POST>
<table>
<tr><td>Surname</td><td><INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Surname&quot;></td></tr>
</table>


Just repeat the line in between the <table></table>
(the one beginning with <tr><td>) to add more fields.

Hope this helps

Nook6
 
Hi RebelFox,
The first and foremost mistake u have done is tht u have not closed the INPUT tag on the other end.that is why there was no spacing in the output.Now try with the same code which is given below.

<FORM ACTION=&quot;SearchResults.asp&quot; METHOD=POST>
<table border=1>
<TABLE border=0 align=center width=&quot;70%&quot;>
<TR>
<TD> Surname</TD>
<TD><INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Surname&quot;></TD>
</TR>
<TR>
<TD>Forename</TD>
<TD> <INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Forename&quot;></TD>
</TR>
<TR>
<TD>Department</TD>
<TD> <INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Department&quot;></TD>
</TR>
<TR>
<TD> Location</TD>
<TD><INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Location&quot;></TD>
</TR>
<TR>
<TD>&nbsp;</TD>
</TR>
<TR>
<TD align=right><INPUT TYPE = &quot;SUBMIT&quot; VALUE = &quot;Login&quot;></TD>
<TD align=left><INPUT TYPE=&quot;RESET&quot;></TD>
</TR>
</TABLE>
</FORM>

 
Hi RebelFox,
The first and foremost mistake u have done is tht u have not closed the INPUT tag on the other end.that is why there was no spacing in the output.Now try with the same code which is given below.

<FORM ACTION=&quot;SearchResults.asp&quot; METHOD=POST>
<table border=1>
<TABLE border=0 align=center width=&quot;70%&quot;>
<TR>
<TD> Surname</TD>
<TD><INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Surname&quot;></TD>
</TR>
<TR>
<TD>Forename</TD>
<TD> <INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Forename&quot;></TD>
</TR>
<TR>
<TD>Department</TD>
<TD> <INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Department&quot;></TD>
</TR>
<TR>
<TD> Location</TD>
<TD><INPUT TYPE = &quot;TEXT&quot; NAME = &quot;Location&quot;></TD>
</TR>
<TR>
<TD>&nbsp;</TD>
</TR>
<TR>
<TD align=right><INPUT TYPE = &quot;SUBMIT&quot; VALUE = &quot;Login&quot;></TD>
<TD align=left><INPUT TYPE=&quot;RESET&quot;></TD>
</TR>
</TABLE>
</FORM>


Vishnu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top