function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
shrey.tyagi88@tcs.comshrey.tyagi88@tcs.com 

I wanna make a reset button on vf page, that clears the values given in the form

Hi,

   I've made a custom search page. Its has a <apex:form> which contains the paramaters of search. I wanna create a reset button, that does two things. Firstly it should clear all the values given in the <apex:form> and then it sould render the lower <apex:pageblocksection> that displays the serach results. Please help me!!!!!

Best Answer chosen by Admin (Salesforce Developers) 
Edwin VijayEdwin Vijay

You mean, clear the search results and the search criteria entered?

 

Then, just reload the page with a commandbutton.

All Answers

Edwin VijayEdwin Vijay

You mean, clear the search results and the search criteria entered?

 

Then, just reload the page with a commandbutton.

This was selected as the best answer
shrey.tyagi88@tcs.comshrey.tyagi88@tcs.com

Thanks a lot. I have one more query!!!

Can we implement 2 methods of controller on click of a commandbutton?

If yes , then please provide me the syntax of it

 

 

 

Thanks again for your time and effort!!!!

Edwin VijayEdwin Vijay

You could call just one function from a commandbutton.

 

However, you could call a function from within the function

 

public void function1()
{

function2();

}

public void function2()
{

}