Skip to Content

How to change the value of smart field on click of a button.

I have a requirement to clear the smart field on click of a button. I have tried setValue("") from controller.js , but not working. Is there any way to set value or change value of smart field.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 02, 2018 at 05:56 PM

    We can't directly clear the smart field by using setValue(""). If you want the reset the value of smartfield to its initial value, you can make editable false and then true, then it will show initial value. But if you want to set it as blank then you have to bind the view again in such a way which will return blank for the property used for smart field.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 10 at 09:29 AM

    Hi Shubham,

    I have tried in the same way as you said like making the field editable false and then true but the value is not cleared from the input area.

    Please let me know if any other way to do this.

    Add comment
    10|10000 characters needed characters exceeded