Gossamer Forum
Home : Products : DBMan : Installation :

how to make tables in html.pl

Quote Reply
how to make tables in html.pl
I know how to make tables in HTML but I am not sure how to make tables in html.pl. Each field in the table would have to be some sort of field for entering data (e.g., text, pull-down menu, number, etc.). I was thinking of using the "user-friendly" html.pl, as perhaps that one allows easier html coding?

Also, a question I asked before, but I don't think I asked it very clearly: How do I make a table where rows are added *only* as data is entered? So a person enters data in the only visible row of a table, and a second row is immediately created. They can stop there or enter row in the newly created second row; if they enter data in the second row a third row is created. This continues until they are done.

This second idea might not be doable, but I have a table that *could* be up to 100 rows but most likely will only be about 10 in the average case.
Quote Reply
Re: how to make tables in html.pl In reply to
All you do is put HTML codes between the print qq| and |; codes in the sub html_record, sub html_record_form routines with the following record hash codes:

Code:
$rec{'MyField'}

Change MyField to the name of your fields.

So, it should look like the following example:

Code:
print qq|
<table border="0">
<tr>
<td valign="top">
<$font>Name:</font></td>
<td valign="top">
<$font>$rec{'Name'}</font></td>
</tr></table>
|;

The only way you can do the second request is via javascript, which is quite complicated and not that easy to program.

Goodbye.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------