Skip to Content
0

How to clear simple form after submit the button using sapui5

Jan 30, 2017 at 09:24 AM

607

avatar image

I have created simple form and i want to clear all field after validation and submit the button.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

VIPLOVE KHUSHALANI Jan 30, 2017 at 11:26 AM
-1

Hi Kallesh KS ,

You might be initialising the form (setting initial values to the fields binded to the form elements) in onInit function of the view.

onInit : function () {

this._initialiseForm();

}

initialiseForm:function()

{

//Binding the form with the model with initial set of values.

}

you just need to call this._initialiseForm function on submit and validation press (after the data is posted successfully)

thanks

Viplove

Share
10 |10000 characters needed characters left characters exceeded
vamsilakshman pendurti Jan 30, 2017 at 11:55 AM
-1

Hi,

You can do it by accessing the FORM Properties by using Its ID.

Like as shown below...

var oForm = new sap.ui.getCore().byId("your Control unique ID");

By the above code u can access the your form attributes...go to the console and do some R&D and you will get some solution for clearing the data from your FORM.Console is our best friend to resolve any kind of issues...

Thanks ,

Vamsi.

Share
10 |10000 characters needed characters left characters exceeded