Search form (4 posts)

  1. thelasian
    Posted 10 years ago #

    Can someone please explain the search function template to me, and what each line does? I am sorta newbie at html and especially this sort of stuff.
    For example:
    What does <"label for="s"> do?
    What does <?php_e('Search:')?> do?

    What portion of this stuff can I just eliminate?

    <li id="search">
    <label for="s"><?php _e('Search:'); ?>
    <form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
    <input type="text" name="s" id="s" size="15" />
    <input type="submit" name="submit" value="<?php _e('Search'); ?>" />

  • NuclearMoose
    Posted 10 years ago #


    What portion can you eliminate? Depends. If you want the search form, then none of it. If you don't want the search form at all, then all of it.

  • Anonymous
    Posted 10 years ago #

    Well, that's not strictly true. The form doesn't HAVE to be in a li, unless it happens to be enclosed by an ul, and the divs are purely presentational. 'Label' is needed for validation and accessibility, but the form itself will work without it. All the other stuff is indispensible.

  • thelasian
    Posted 10 years ago #

    I have noticed that removing the LI somehow makes the "highlite" plugin not work.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic


    No tags yet.