Skip to Content

SimpleForm to be saved as draft until "Submit" button is clicked

Hello Experts,

I have a requirement in which , there is a SimpleForm , with some fields . The user may fill some of the input fields in the SimpleForm and decide to close the app. When he reopens the app , he should get the same SimpleForm with the input fields filled with the values , he placed the last time.(i.e. the same instance of SimpleForm should get reloaded).

In short the SimpleForm should be stored as a draft until the user submits the details by clicking the "SUBMIT" button. Is it feasible to do so??

Is it possible to save this SimpleForm's immediate vrsions and reload it with same details that was filled earlier?

Thanks and Regards

Aman Anand

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Hi Anand,

    I need like same scenario what you mentioned on your post,if you done that task then please will you elaborate that............

    Thanks & Regards


  • Get RSS Feed

2 Answers

  • Best Answer
    May 03, 2017 at 11:12 AM

    there is a design guideline for "Draft handling", check this link draft-handling

    you can follow steps as i have done for one app:

    1. Create draft (duplicate) database tables
    2. while creating data /open view in app, create a draft entry with blank values
    3. at particular event (tab change, time interval etc.) from front end update draft tables
    4. every time data if exists should come from draft tables only
    5. on click of Submit button, Update the draft tables first and then process data from draft to original tables.
    6. once data is processed from Draft to Original table, Delete the draft entry


    oData model v2 or above is good to implement Draft handling

    oModel.submitChanges() - to update respective draft tables

    Import functions - to process data from draft to original tables

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 03, 2017 at 02:30 PM

    Hi Anand,

    The required functionality can be achieved with two oData services -

    1) For Save/Submit ( pass filter parameter like A-Save , S-Submit)

    2) Read the saved data. This service can also be used to read the submitted data by passing indicator Submit(S)

    You can implement the logic for Save/Submit as explained from Akhilesh or same table you can use for Saving(A) and Submit(S) the data using an indicator.



    Add comment
    10|10000 characters needed characters exceeded