My select tag will be auto generated with php. It might happen that there will be just a single option tag inside this select tag.
I tought about using php to check whether there are multiple options or just a single one. If there is just a single one I print a hidden input tag otherwise I'll generate the select option tag.
Is there a css solution to hide a select tag with a single option child or do I have to use my php-solution?
<?php
if( is_array( $options ) && count( $options ) > 1)
// generate select tag and its' option tags
else
// use a hidden input tag
?>
I would not like to use a javascript solution.