How to change text in option in select element to (input type=text)

Hi

My requirement is I want to change option elements inside select element with some other custom types like input type=text when dropdown in open something like this

How can I acheive this?

Hi vngx,

I might be wrong, but, as far as I know, what you want is not possible with normal form elements (like select, options and input). They are all what is called “replaced elements” where the OS has a good deal of control over the appearance. You might have better luck if you use some components from a framework like Bootstrap: replace the select with a dropdown component, which is essentially an absolutely positioned div and you have complete control over the content.

Ok

Couldn’t you just use a css drop down that holds a bunch of inputs? Or are you still after the function of a select.

I can’t see what use your fiddle colud be put to but as Adrian said above its not possible anyway. You can customise selects by using a script to swap them out dynamically and handle the data

1 Like

css hack is great

Exactly I am looking for

Thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.