473,788 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

To Generate form fields dynamically

40 New Member
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.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitl ed Document</title>
</head>
<body>
<form method="post" enctype="multip art/form-data">
<table width="500" border="0" align="center" cellpadding="1" cellspacing="6" >
<tbody>
<tr class="text">
<td align="left">Sc an/Enter Customer ID:</td>
<td align="left"><i nput size="30" name="Name" id="Name" type="text" />
</td>
</tr>

<tr class="text">
<td align="left">Sc an/Enter Product ID:</td>
<td align="left"><i nput size="30" name="productNa me" id="productName " type="text" /></td>
</tr>

<tr class="text">
<td align="left">Pr oduct Type</td>
<td align="left">
<select name="productTy pe" id="productType ">
<option value="Sales">S ales</option>
<option value="Rental"> Rental</option>
<option value="Both">Bo th</option>
</select>
</td>
</tr>

<tr class="text">
<td align="left">Co st Price/Unit($):</td>
<td align="left"><i nput size="30" name="costPrice " id="costPrice" type="text" />
</td>
</tr>

<tr class="text">
<td align="left">Qu antity:</td>
<td align="left"><i nput 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 2477
acoder
16,027 Recognized Expert Moderator MVP
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
3236
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 generated, though. I'd like to capture the NAME of every HTML form field element on the server, even if that element is submitted blank. The trouble is, with, say, radio buttons or checkboxes for example, a *blank* element does not get submitted at all.
1
1772
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 opposed to using a shopping cart and flipping through multiple pages. On the page would be the following.... 1) Billing address 2) shipping address 3) fields for order numbers
1
7305
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 say with x amount of input boxes.. I enter data in the boxes and submit. The data submitted is needing to be placed into an array for insert into a database.
4
1884
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 reads the fields in the user's chosen PDF file, displays a webform with relevant fields (textbox or drop-menu or radio buttons etc) for user to fill out online. I'm using a 3rd party software to read and write to the PDF file, but I don't know how to...
1
2269
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 the query string, and does not append any of the dynamically generated fields. any ideas how to fix this? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> <html>
3
1367
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 tasks have a common set of fields ,the problem is that some of them have some specific fiels (most of them just text fields). Has anyone developed a similar system and/or can give some hints on how I can alow the user to generate these fields on...
1
1476
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 user <form name ="test" action="test.asp"> <input type="text" id="txt1" name="title1">
0
3396
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 within options. I have everything being dynamically named from the previously dynamically named element. (I hope this makes sense.) I am not able to retrieve any of the dynamically created values. I can view them on the source page but can't pull them...
2
6533
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 trying to create a db for a friend's business. I have two issues that I'm wrestling with. First is how to dynamically create a text box on a form. I'm building a form that relates information between two tables (A, B). Table B is the source of...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10177
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10118
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.