phpbar.de logo

Mailinglisten-Archive

[php] PHPLIB class for merged select/input field

[php] PHPLIB class for merged select/input field

Jens Benecke php_(at)_jensbenecke.de
Sat, 7 Oct 2000 21:30:04 +0200


Hi,

I'm writing this in English because it's also going to the main PHPLIB
list.

As most of you are probably aware HTML lacks a combined
input/select(drop-down) field. You can either use <input type=text> or
<select name...> and then a load of items.

Webmin, a very good web-based administration tool for UNIX systems
(www.webmin.com, there is an online demo available) solves this problem by
creating a submit button beside each text input field that (via Javascript)
opens a new, small window showing the possible selections. If the user
clicks on one of these, that item will be returned into the text input
field on the first page and the new page will close. (Yes, this function
depends on Javascript. If the user does not have Javascript s?he will still
be able to manually type things in, so there's no problem.)


I want to know if something like this has already been done in/for PHP and
MySQL Queries(*), and if so where I can get it. If not, would anyone care
to help me extend PHPLIBs FORM widget classes with such a thing? I'm not
that much into PHPLIB yet, and although I do have a fairly accurate idea of
how to accomplish the new widget set I want to do The Right Thing(tm) the
first time.


(*) what I want to do is give the user the choice of typing something new,
OR selecting out of a list of items that were previously typed in. The
widget would then look something like this:
	<input size=20 type=text name=foo>
	<input type=submit value="..." onClick='....; return false'>



-- 
"Ich kenne zwar Netbus (bevorzuge allerdings            http://www.linuxfaq.de  
 SubSeven), aber was zur Hölle ist RFC791???!"       http://www.hitchhikers.de    
 -- Karsten in de.org.ccc                            http://www.jensbenecke.de


php::bar PHP Wiki   -   Listenarchive