Adding, editing & deleting

Control how you allow users to contribute to your app's data

Allowing your users to add, edit, and — if you're feeling really brave, occasionally delete data — opens up a whole new dimension for your apps and the ways they can be used.

We’re going to look at four things:

Editing

Some components are editable by default. In other words, anyone who can access your app can edit them, even if you haven’t enabled editing. For example, components like; Choice, Image Picker, Notes, Number Field and Phone Field are all editable components.

If you want to allow your users to edit entire list items, then you can enable Allow editing. To do this, navigate to the details screen of a list item and click Allow editing. Now you can allow your users to edit all or some of the data which appears in your app.

Enabling editing in your app

When you click the edit button in Glide, two things happen

  1. Firstly, the app changes to show you the edit page

  2. Secondly the components panel on the right changes to show a new set of components that are your edit screen components.

Glide will add these edit screen components automatically, based on the columns in your sheet, but you can customize these to change what data can be edited.

Glide automatically adds edit components based on your columns

Now your users can edit each of your list items and these changes will flow up to your sheet. When they finish editing, their changes will be reflected in the original set of components.

If you want users to only be able to edit certain columns, you can delete these from your edit screen component list. For example, if you delete the Text Field which is bound to the Title column - users will no longer be able to change the name of your list items, but can still change all the other data.

Preventing users from editing the 'Name' by deleting the corresponding edit component

You can enable editing individually for each tab, so you can allow users to edit certain tabs and not others.

Enabling edit on the Cookies tab 🍪and not the Muffins tab 🧁

Adding

When you enable Add item, users can add data to your sheet. Like Allow editing, Add item is tab specific, so you can enable add item for some tabs and not others.

Adding an item brings up the same editable component list that we had on the edit item page. What you change in this component list will be reflected in the edit item list as well. For example, if you delete the Text Field which is bound to the Title column, this will also be reflected in your edit item screen.

Similarly to editing, you give users access to only certain columns when they add items. For example, if you want to allow users to add places to visit in a city guide app, but don’t want them to be able to choose a category for their submissions, you can make sure the Category column is not bound to an edit screen component.

Special values

To learn about special values, read our guide here.

Deleting

If you want your users to be able to delete entire list items, open the edit screen in the app, head to the edit components panel on the right and enable allow deleting. When a user deletes an item, this cannot be undone in Glide or in your sheet - so make sure whoever is using your app knows this.

Glide clears the row in your sheet, it doesn't delete the row.

If you want to restrict your app to only be used by certain people, then you can of course change the sign in settings.

Deleting possibly the best cookie idea in the history of time... 🍪🍪