473,395 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

To Generate form fields dynamically

40
I am doing an inventory project using PHP in which there is a text box.The customer id should be entered in that text box.If that customer id is valid,another text box should be generated in which the product id should be entered..If that product id is valid,other 3 text boxes should be generated dynamically in order to do transaction.is it possible to generate forms without a button click?...The order of the forms should be as follows:

[HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" enctype="multipart/form-data">
<table width="500" border="0" align="center" cellpadding="1" cellspacing="6" >
<tbody>
<tr class="text">
<td align="left">Scan/Enter Customer ID:</td>
<td align="left"><input size="30" name="Name" id="Name" type="text" />
</td>
</tr>

<tr class="text">
<td align="left">Scan/Enter Product ID:</td>
<td align="left"><input size="30" name="productName" id="productName" type="text" /></td>
</tr>

<tr class="text">
<td align="left">Product Type</td>
<td align="left">
<select name="productType" id="productType">
<option value="Sales">Sales</option>
<option value="Rental">Rental</option>
<option value="Both">Both</option>
</select>
</td>
</tr>

<tr class="text">
<td align="left">Cost Price/Unit($):</td>
<td align="left"><input size="30" name="costPrice" id="costPrice" type="text" />
</td>
</tr>

<tr class="text">
<td align="left">Quantity:</td>
<td align="left"><input size="30" name="Quantity" id="Quantity" type="text" />
</td>
</tr>

<tr>
<td colspan="2" align="center">
<input type="submit" name="submit" value="Submit" id="submit" /> </td>
</tr>
</tbody>
</table>
</form>
</body>
</html>[/HTML]
Oct 31 '08 #1
1 2459
acoder
16,027 Expert Mod 8TB
If that customer id is valid,another text box should be generated in which the product id should be entered..If that product id is valid,other 3 text boxes should be generated dynamically in order to do transaction.is it possible to generate forms without a button click?
Yes, just create them in your validation function.
Oct 31 '08 #2

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

Similar topics

7
by: JDS | last post by:
Hi, all. I'd like to do the following, preferably *without* resorting to JavaScript: I have a long, dynamically-generated form questionnaire. Not all of the form fields are dynamically...
1
by: shank | last post by:
I need advice on how to get started with this project. I want a page where a user can manually enter an order. Our users know our order# system and it's much easier to manually enter items as...
1
by: Daniel Gormley | last post by:
What I have is a form that is dynamically generated based on which database table its calling. Therefore, the number of category.name.count can be different. So I have this form generated and...
4
by: WB | last post by:
Hi, How can I generate web controls such as textboxes and drop-menus on the fly? My web application allows users to fill out PDF forms online. There are many PDF forms, and my application...
1
verbatim
by: verbatim | last post by:
with the following page, the dynamically generated fields are not recognized when i try to submit the form, or add more elements. when i hit my submit button, the address bar has only x1 - x5 in...
3
by: Anibal Caixinha | last post by:
Hello, I'm trying to create a task manager , for accounting firm, they have a series of regular tasks they need to be able to control , research old records,etc... The problem is that all of these...
1
by: stepby | last post by:
Generate the ASP code dynamically Hi All, I would like to ask how to generate the ASP code dynamically? The case is that there are several textbox and the number of textbox is controlled by...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
2
by: ssmith147 | last post by:
Hi, I'm somewhat familiar with access and vb programming (I can read someone else's code, for the most part), but I'm still very green when it comes to creating solutions for my own needs. I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.