Page 1 of 1

[solved]After submitting grabbing type of element.

Posted: Fri May 28, 2004 2:37 am
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.. :)

Posted: Fri May 28, 2004 3:04 am
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

Posted: Fri May 28, 2004 3:55 am
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