You need to sign in to do that
Don't have an account?
Create a search on a visualforce page
What is the simplist way to take user input and do a search on specific fields based on their input?
Ex: they have fields like name and age available//they input John and 23//search returns all John's with an age of 23.
It doesn't need to be anything fancy. The simpler the better.
Ex: they have fields like name and age available//they input John and 23//search returns all John's with an age of 23.
It doesn't need to be anything fancy. The simpler the better.
The code below will show you how to create a Visualforce page that takes two inputs - Name and MailingState. The page has a button named Search that, when clicked, will query all Contacts and return those that have a matching Name and MailingState.
The button is connected to a searchContacts() method that handles the query. The results are displayed in a pageBlockTable.
This is really simple but should point you in the right direction as to how to accomplish this.
Controller Visualforce Page
Hope that helps,
Clint
Please find simple search code at below location:
http://gtr.net/how-to-build-a-simple-search-page-using-visualforce/
I am using this code for public visualforce page, I am getting empty rows like this