"Add Item" form is the same across tabs

I’m building a mentoring app. Basically, I have a column in the Users table to identify their role (Mentor or Mentee). Both Mentor and Mentee can arrange a mentoring session, which is a record in the Sessions table. Sessions table has columns like session_date, mentor_name, mentee_name, session_notes. Assume that Mentor-Mentee is one-to-many relationship.

Refer to the attached screenshot. I have 2 tabs for adding a mentoring session: one for Mentors and one for Mentees (only one tab is visible according to your role). The difference between the 2 tabs is the default values when adding a session. For example, if I’m a Mentee, my Mentor value is defaulted, so I don’t have to type anything.

The issue is the ‘add item’ form which appears when you click the + button. This form is replicated across the 2 tabs. In other words, I cannot configure this form so it has different default values depending on the tab. Is this the expected behavior or is this a bug?

Do both tabs refer to the same underlying sheet/table? Some layouts are deeply integrated to the sheet/table, so depending on your setup, I would say that it is expected behavior for the Add Form to be the same for both tabs.

There’s a handful of ways to approach it. If both tabs are tied to the same sheet, then I would personally only have a single tab instead of two. I never use the built in Add function. Instead, I usually use a details style layout with an inline list and a floating form button. You could have two different forms and continually show the correct form button based on the user role.

3 Likes

Hi Jeff,
Thank you for your speedy reply and your suggested workaround – that works for me.

Yes, both tabs refer to the same underlying table. I have a different opinion about the Add Form. I made 2 tabs because I want Mentors and Mentees to have different list layouts. For example, Mentees are grouped by name, whereas Mentors are not (because of the one-to-many relationship). I’m able to implement these different layouts for the 2 tabs. So, if I’m able to do this, I would argue that I should be able to differentiate the Add Form for the 2 tabs too.

Do you know what is the best way to share my opinion to the Glide team?

1 Like
1 Like

Hi @dregar :wave:

I second Jeff. The native Add Form seems to be integrated to the source sheet, so tabs (with list displays) with the same source sheet have the same Add Form. I see what you mean: because one has two tabs with the same underlying source sheet and yet one has displayed the information differently – different lists and options (filter, group, visibility) – one might expect the Add Forms to also be adjustable. The way I remember that it isn’t so is that the list options (filter, group, visibility) only has a bearing on how the data is displayed, not on the data itself. The Add Form is more of a data backend feature, whereas options are more frontend UI features.

By putting all of your components for your 2 roles in one single screen (tab), I believe you will need to adjust the visibility options for each individual component. In a way, you are building two screens within one and using visibility on components to toggle between one and the other. I personally have gotten used to this approach and use visibility on components (more so than on tabs), as I like the idea of creating the layout of a screen within the confines of one single tab (instead of two versions of a screen). It’s only a question of perspective, I believe your approach to create 2 separate tabs would also work.

(For this reason, it would be practical to be able to save a component’s visibility settings to apply the same setting to other components :slight_smile: )

3 Likes

Hi @nathanaelb thank you for the taking the time to explain it. This community has been immensely helpful and responsive. I’ve only used Glide for <1 month and I’m very encouraged to see the strong community here.

3 Likes