Display and hiding for search form
-
hello
I’m adding some categories using drop down boxes in to my search form.
But, i want to hide a drop down box and display drop down box for specific searches.this is my code….
<form id="searchform" name="searchform" method="get" action="<?php echo home_url(); ?>"> <div> <?php wp_dropdown_categories( array('include' => array(212, 213)) ); ?> <?php wp_dropdown_categories( array('include' => array(1, 211)) ); ?> <?php wp_dropdown_categories( array('include' => array(225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 214, 217, 216, 215, 223, 222, 221, 220, 219, 218)) ); ?> Select Price Range <?php wp_dropdown_categories( array('include' => array(315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351)) ); ?> Enter Zip Code <input type="text" id="tag" name="tag" /> <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'shaken'); ?>" /> </div> </form>
[Moderator Note: Please post code or markup snippets between backticks or use the code button.]
What i want to do is; hide the select price range drop down when the first category drop down box is selected at ‘213’
is this possible?
- The topic ‘Display and hiding for search form’ is closed to new replies.