Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #5813 > unrolled thread
| Started by | Charles <cchamb2@gmail.com> |
|---|---|
| First post | 2012-05-03 15:32 -0700 |
| Last post | 2012-05-04 09:38 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.php
Data entry forms Charles <cchamb2@gmail.com> - 2012-05-03 15:32 -0700
Re: Data entry forms Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-03 19:33 -0400
Re: Data entry forms "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-04 09:38 +0200
| From | Charles <cchamb2@gmail.com> |
|---|---|
| Date | 2012-05-03 15:32 -0700 |
| Subject | Data entry forms |
| Message-ID | <16041.28.1336084372301.JavaMail.geo-discussion-forums@ynf8> |
I'm working on a data entry for for this application, and I'm stuck at what may end up being some bad code. I'm capturing data for two tables (custinfo and orderinfo) on one page. The top part of the data entry form collects data once for the transaction, kind of like an invoice captures customer details. The bottom part (the part I'm stuck on) captures order information line after line. So, for example: TopForm (custinfo) Customer name Customer address Customer city, state, zip Bottom form (orderinfo) Item description Item quantity Item price What I'm looking for is two things: 1) The ability to extend the bottom form item by item as the order grows. 2) The ability to remove items (last in, first out) if the order needs to shrink. I can already clear the form, cancel data entry, and submit data for processing; I need to know how to dynamically enlarge or shrink the second half of the form. Can this be done in PHP?
[toc] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-05-03 19:33 -0400 |
| Message-ID | <jnv4kq$47v$1@dont-email.me> |
| In reply to | #5813 |
On 5/3/2012 6:32 PM, Charles wrote: > I'm working on a data entry for for this application, and I'm stuck at what may end up being some bad code. I'm capturing data for two tables (custinfo and orderinfo) on one page. The top part of the data entry form collects data once for the transaction, kind of like an invoice captures customer details. The bottom part (the part I'm stuck on) captures order information line after line. > > So, for example: > > TopForm (custinfo) > Customer name > Customer address > Customer city, state, zip > > Bottom form (orderinfo) > Item description > Item quantity > Item price > > What I'm looking for is two things: > > 1) The ability to extend the bottom form item by item as the order grows. > > 2) The ability to remove items (last in, first out) if the order needs to shrink. > > I can already clear the form, cancel data entry, and submit data for processing; I need to know how to dynamically enlarge or shrink the second half of the form. > > Can this be done in PHP? It's just HTML, of course you can generate the necessary output in PHP. It means sending the entire page to the server then sending the results back. You could also do it in Javascript and do it all on the client, but it requires Javascript be enabled. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Date | 2012-05-04 09:38 +0200 |
| Message-ID | <a0hfbpFgjhU1@mid.uni-berlin.de> |
| In reply to | #5813 |
Am 04.05.2012 00:32, schrieb Charles: > I'm working on a data entry for for this application, and I'm stuck at what may end up being some bad code. I'm capturing data for two tables (custinfo and orderinfo) on one page. The top part of the data entry form collects data once for the transaction, kind of like an invoice captures customer details. The bottom part (the part I'm stuck on) captures order information line after line. > > So, for example: > > TopForm (custinfo) > Customer name > Customer address > Customer city, state, zip > > Bottom form (orderinfo) > Item description > Item quantity > Item price > > What I'm looking for is two things: > > 1) The ability to extend the bottom form item by item as the order grows. > > 2) The ability to remove items (last in, first out) if the order needs to shrink. > > I can already clear the form, cancel data entry, and submit data for processing; I need to know how to dynamically enlarge or shrink the second half of the form. > > Can this be done in PHP? Short answer: can be done in PHP + Ajax. It works like this: Server (PHP script) sends html + (embedded or linked) javascript User enters data onchange() event + your javascript in client browser sends data to server (in background) Server (PHP script) must handle it, and send Ajax response to browser Browser executes sent javascript, which may add or remove document elements /Str.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web