How to handle removing Form Container entries when a user presses cancel?

I’m stuck with how to handle a certain use case, I’m hoping someone could give me some ideas…

I’m trying to make a system to track what items users bring in and out of labs.
the app is used to know which item(s) were brought in by who, and what users are using what Lab.

  • I have 4 tables:
    1. Users
    2. Items (this is anything the user inputs)
    3. Labs (this is a fixed list)
    4. Bookings

An Item is anything - it’s added by a user when he/she books a room.
The Item(s) can only be used in a Lab.

I have a ‘new form’ for Bookings, which has:

  • Form Container for Items, saying “what items to do you have?”.
  • A drop-down for the Labs for the user to select which lab he/she will use.

The User inputs details of the items in the items form container, and presses ‘submit’ which adds items to the Items table.

and finally, when he/she presses submit for the form, A row is added to the bookings table.


If the user presses ‘Submit’ in the Form Container for Items, but then presses cancel for the bookings new form, the result are items existing in the Items table without a Lab. (the user pressed cancel on the booking but added items.)

I would like to make it that if the user presses ‘Cancel’ in the new form, that all Items added via the form container in the bookings form are also removed.

I can imagine this is a common thing, any ideas on how I can do this?
Is it possible to ‘stage’ all the changes to all the tables until the user presses submit?


Might need some screenshots to see what you are doing. So you have a form that opens a second form on submit?

My initial thoughts are that you might need to rethink your flow.

Hi Jeff,

Thanks a lot for your quick reply.
Here’s the screenshot:

I also considered changing the flow,
but the only ideas I have require the user to have some knowledge of how the app works.
Picture a tablet on the door to a lab with this app running. Its got to be that the user uses 1 form to add items to him/herself and reserve the lab.

For example, I can’t add on-screen instructions like:
“If you want to use this room, First, add your items using Form A, then, Book the Lab using form B”

Any ideas? Maybe i’m not thinking in the right way?

I think there are 2 options here

Option 1

Only allow users to book through the form you have, add items later in the details screen of the booking using another form (can be a form container, or a form screen).

Option 2

Use a custom form.

Add a user-specific booking ID column in the work table for the form.

Add a single value column in the user profiles table to cast the booking ID value to that table (first > Work table > Booking ID column).

The button to open the form should check if a booking ID is presented. If presented, just show the details screen for the custom form row, else set a unique ID value to that column.

Now, every item added should contain the booking ID.

Since booking IDs are not cleared when the user moves back using a “Cancel” button you create, they will stay there until the user submits the booking (and you clear the booking ID, prepare for the next iteration).

1 Like

Hi Thinh,

Thanks a lot for your feedback,
Your Option 2 advice gave me a few new ideas on how I might be able to do it.
I’ll try again!

Thanks !

1 Like