Title: Custom search form with Javascript
Last modified: August 22, 2016

---

# Custom search form with Javascript

 *  [Hindrik](https://wordpress.org/support/users/hindrik/)
 * (@hindrik)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-search-form-with-javascript/)
 * Hi all,
 * I’m making a search form which requires some javascript. The form is located 
   in a .php file but when i put the script there it doesn’t work and it gives me
   a blank page.
 * I need the following code. It works but not in the .php file. So what should 
   I do?
 *     ```
       <form target="frame2" id="searchform" name="searchform" onsubmit="javascript:if ((zoek.value == '') || zoek.value.match(/^ +$/)) return (false);" action="https://webshop.blz.nl/Webshop/SearchResults.aspx?" >
   
       <input type="text" id="zoek" name="zoek" size="20" />
       <input type="image" id="submit" name="submit" src="http://boekhandelwever.nl/wp-content/uploads/Schermafbeelding-2012-05-09-om-01.27.46.png" alt="Zoek & bestel!" /></center>
   
       <input type="hidden" name="MemberNr" value="7211"/>
       <input type="hidden" name="pf" value="eBook"/>
       </form>
       ```
   
 * Thanks

The topic ‘Custom search form with Javascript’ is closed to new replies.

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [form](https://wordpress.org/support/topic-tag/form/)
 * [java](https://wordpress.org/support/topic-tag/java/)

 * 0 replies
 * 1 participant
 * Last reply from: [Hindrik](https://wordpress.org/support/users/hindrik/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/custom-search-form-with-javascript/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
