Title: Search function
Last modified: May 12, 2020

---

# Search function

 *  [opc121177](https://wordpress.org/support/users/opc121177/)
 * (@opc121177)
 * [6 years ago](https://wordpress.org/support/topic/search-function-70/)
 * Hi there,
    I’m looking to build a function that allows the user to submit what
   ultimately will be a postcode and query it against a list of postcodes we serve.
   On a partial successful match I’d like to redirect to a booking page. If negative
   I’d like to simply show a message. Does anyone know of a plugin that may facilitate
   this or a coding solution.
 * Any help would be greatly appreciated.
 * Kindest regards
 * Paul
    -  This topic was modified 6 years ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).

Viewing 1 replies (of 1 total)

 *  [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * (@corrinarusso)
 * [6 years ago](https://wordpress.org/support/topic/search-function-70/#post-12812144)
 * [@opc121177](https://wordpress.org/support/users/opc121177/)
 * I wrote an application in PHP and Javascript that does exactly that.
    Valid :
   [https://capitaljunk.ca/book-appointment/?search2=K2C2A6](https://capitaljunk.ca/book-appointment/?search2=K2C2A6)
   Not valid : [https://capitaljunk.ca/book-appointment/?search2=G6G6G6](https://capitaljunk.ca/book-appointment/?search2=G6G6G6)
 * The service are only covered basically one city, so all I did was insert the 
   first three letters of all available valid postal codes into a database table.
   Then when the user hits submit, I valid the form against those characters. If
   it’s found, retrun true.
    Done. 🙂
 * I’m sure these days there is open data for this however. It’s super easy, you
   could do it in Javascript entirely if you wanted if you didn’t want to insert
   them into a table.

Viewing 1 replies (of 1 total)

The topic ‘Search function’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/search-function-70/#post-12812144)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
