Form field - is this possible?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hairyjim
Forum Contributor
Posts: 219
Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK

Form field - is this possible?

Post by hairyjim »

Hi all,

I am pretty new to PHP so I have little knowledge of inbuilt functions etc.

I have a form which will be used to submit a request for a Bill of materials (BOM). A Bom can contain any number of items, although this is generally less than 10 it can go over.

So I would like a form where the user can enter the Bom name and then specify which item numbers will be used to make up the Bom. Rather than just put 10 seperate fields on the form for the entering of individual item numbers I wanted to create a form which is more dynamic.

Here is my though.

Bom name field.

Item number entry field. With an 'add' button next to it. On click of add it would populate the next line in the list field.

Some sort of container/list field which would be populated by the entries in the Item entry field.

Am I just been stupid here and trying to be too clever and should just whack on 10 seperate item fields, or am I tredding down the right route?

If I am is this possible with php, and could you point me in the direction of the functions to do this sort of stuff?

Ta muchly for any assistance.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Not 100% clear what you want.

Can you explain more clearly?

Doesn't actually sound like a PHP solution, but maybe i am wrong without fully understanding you.

Mark
hairyjim
Forum Contributor
Posts: 219
Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK

Post by hairyjim »

Basically my question is this.

Two fields, field A and Field B. 1 Button called 'add'

I enter data into field A then click add.

Field B will then get populated by the data that was in field A, and field A is 'reset'.

I enter more data into field A and then click add.

This data is then entered into field B in a new line to make a list.

I thought this would be a neater way of entering multiple lines of data on a form.
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Post by Jade »

Okay, so basically you'd be listing back to them what they already added into the list, correct?? To do that you'll probably need to use sessions or a database, etc. Something that can hold the multiple pieces of data that they enter, otherwise it will work.

Jade
Post Reply