[solved]After submitting grabbing type of element.

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
dreamline
Forum Contributor
Posts: 158
Joined: Fri May 28, 2004 2:37 am

[solved]After submitting grabbing type of element.

Post by dreamline »

Hi guyz,
I'm having a bit of a problem.. On a form I use textboxes and selectboxes dynamically. Basically if the user selects something on the form a textbox could turn into a selectbox or the other way around... After submitting the form i wanna check if the form had a tetbox or selectbox...
Is this possible ?

I use the list command to get the values and element names, but the type of the element i can't seem to get... Is there a way or doesn't php have a feature like this?

Ps. I don't want to change the elements name since everything else is coded on one element name. If i have to split those in two element names (1 for textboxes and 1 for selectboxes) then I'm basically rewriting lots of code.. :(

Thanks.. :)
Last edited by dreamline on Sun Aug 07, 2005 5:17 am, edited 1 time in total.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

I don't think there is a way to do it directly.

When outputting your dynamic form, you could store a value in a hidden field to identify what was used!?

Mark
dreamline
Forum Contributor
Posts: 158
Joined: Fri May 28, 2004 2:37 am

Post by dreamline »

Thanks bech100.. :) Too bad there doesn't seem to be a command for that.. So probably i have to take your advice and use an extra hidden field on that page... :D
Post Reply