You need to sign in to do that
Don't have an account?
Sivakumari2i
How to clear input text fields
hi,
I have some input field in my visualforce page.
If i click a command button, the values entered must be cleared automatically.
I tried this using javascript but i am not able to achieve the end result.
Please help me.
Regards,
S.Sivakumar.
Hi ,
I have made a lookup and a test field from Contact and tried to clear it with the link Clear .
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You .
All Answers
public void nullify() {
field = null;
}
use this method on a command button like
<apex:commandButton action="{!nullify}" value="Reset" />
2. Use javascript to do this. Write a javascript method and call it on button's onclick
like
document.getelementbyId('Your field html Id').value = null;
Hi ,
I have made a lookup and a test field from Contact and tried to clear it with the link Clear .
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You .
Thanks.
Its working for me.
So we need provide the correct path to achieve this.
Regards,
S.Sivakumar