/    Sign up×
Community /Pin to ProfileBookmark

Form to Datasheet help

I have a form that a user fills out and I want some of that data to be automatically put into a datasheet format.

Here is the html for the data sheet.

[code=html]<div class=”form_background” style=”width:90%;”>
<div class=”form_groove_outer”><div class=”form_groove_inner”>
<table class=”datasheet” cellpadding=”0″ cellspacing=”0″>
<thead>
<th style=”width: 2%;”>#</th>
<th style=”width: 10%;” nowrap=”nowrap”>Status</th>
<th style=”width: 20%;” nowrap=”nowrap”>Requestor</th>
<th style=”width: 22%;” nowrap=”nowrap”>Approver</th>
<th style=”width: 46%;” nowrap=”nowrap”>Approver E-mail</th>
<th style=”width: 22%;” nowrap=”nowrap”>Item Description</th>
<th style=”width: 10%;” nowrap=”nowrap”>Req Date</th>
<th style=”width: 20%;” nowrap=”nowrap”>Need Date</th>
</thead>
<tbody>
<tr id=”set1_row1″ class=”datasheet_row”>
<th>1</th>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
</tr>
<tr id=”set1_row2″ class=”datasheet_row”>
<th>2</th>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
</tr>
<tr id=”set1_row3″ class=”datasheet_row”>
<th>3</th>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
</tr>
<tr id=”set1_row4″ class=”datasheet_row”>
<th>4</th>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
</tr>
<tr id=”set1_row5″ class=”datasheet_row”>
<th>5</th>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
<td><input value=”” type=”text”></td>
</tr>
</tbody></table></div></div></div>[/code]

And here is the form html for those values:

[code=html]
<label>*Requestor:</label><input type=”text” name=”name” size=”30″ <br />

<label>*Approver:</label><input type=”text” name=”approver” size=”30″ <br />

<label>*Approver E-mail:</label><input type=”text” name=”appemail” size=”30″ <br />

<p id=”acqtype”style=”margin-left: 13.3em; margin-bottom: 0;”><label>*Acquisition Type:</label><select name=”acqtype”>
<option selected=””>-Select-</option>
<option value=”Hardware”>Hardware</option>
<option value=”Hardware Capital”>Hardware Capital</option>
<option value=”Leases”>Leases</option>
<option value=”Maintenance”>Maintenance</option>
<option value=”Professional Services”>Professional Services</option>
<option value=”Software”>Software</option>
<option value=”Software Capital”>Software Capital</option>
<option value=”Other”>Other</option>
</select></p>

//Req date involves 2 drop downs (month and day) and a text with the year

<label>*Item Description:</label><input type=”text” name=”description” size=”30″ <br />

<label>*Total Cost:</label><input type=”text” name=”totalcost” size=”30″ /><br />

[/code]

Also is there a way to put a link on the Reqestor name and be able to view the original form filled out?

I am very new at HTML and JavaScript so please try to be detailed.

Thanks in advance.

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@ryanbutlerAug 07.2008 — You need to use a server-side language to do this and preferably a database. What would normally happen is this:

[LIST]
  • The original HTML code that allows users to fill out information needs to be handled by a server-side language.

  • [/LIST]


    [List]
  • Once the insert into the database happens, then re-direct them to a new page that can query for the record and fill in what information has been entered.

  • [/list]


    The reason I say a database is if you simply grab out of the post of the page, once you go to another page, that will be lost, whereas querying a record from the database table would always be there. Preferably, you would only allow certain individuals to edit the information that was filled out, through an administrative side. Doing this in ASP.NET would be relatively painless, PHP & ASP, little more pain but tolerable.
    Copy linkTweet thisAlerts:
    @jenbuhauthorAug 07.2008 — If I were to get an ASP.NET book do you have any recommendations in order to easily do what I'm trying to accomplish?

    I'm pretty sure I can't use PHP on my server, so ASP would be what I need.
    Copy linkTweet thisAlerts:
    @ryanbutlerAug 08.2008 — ASP & ASP.NET are two different technologies. ASP.NET would be pretty simple. You would create a web form with text boxes for each field in your database table and then do an insert statement once all the submissions are complete.

    If you were to build an administrative side, you would query for the primary key of a given record and display the information inside literals or text boxes, depending if you want people to be able to edit the information.
    ×

    Success!

    Help @jenbuh spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...