Add required component in an existing form

I have a set added a set of components to the User profile form. I forgot to make one of the components (a number entry) to be required. I can’t modify the requirement of any existing component, nor can’t I set this for a new component on the same form, I don’t have the required checkbox (to check or uncheck) when I edit the details of the component.
If I add a new form I can set the requirement of the same type of component. I only have test users who have submitted data, less than 10. I have tried to fix it in a published and non-published version as well, but with no success.

How does your user profile form look like? Are you using an edit screen or a custom form? Can you please share screen shot

It’s an edit screen (I think). It’s the original Profile form where I have added the components and not the screen where users can view their profile in a list and edit the data as it’s shown in the list.

The only components that I can edit are the choice components.

No, you are on a detail screen. You are updating data in the table in real time as you type. Because of that, there is no concept of required or not required. The required flag is meant to control a submit button, and whether or not to allow the entire record to be added or updated. Since you are updating data in real time, there is nothing for a required flag to control since it has already updated the data in the row. I imagine you don’t even have a submit button on the screen.

If you notice the Edit pencil at the top right of the screen, that’s what takes you to your Edit screen. Forms, Add Forms, and Edit Forms don’t update anything in the table until you actually click on submit. That submit is controlled be the required flag. So it makes sense to have a required flag on a native form, but since you are on a detail screen, a required flag is pointless.

I’m guessing at some point you must have copied those components from inside a form and pasted them onto that profile screen. That’s how the ‘required’ tag stuck to that component. It’s a bit of a hack, but doesn’t mean that the value in that component is actually required. If you still want that required tag, open a native form, add a component that you need, then cut and paste it to your profile detail screen. That will give you the required tag, but it won’t mean much as far as forcing the user to fill it out.


Wow, what a hack and I did not even realize what I did :sweat_smile: The user profile screen was the first thing I did and I was still figuring out Glide. Initially, I had a separate form for the User profile, but then I decided to make the questionnaire part of the original profile screen.
Thanks for the help, I fixed the required tag visually, and now I guess I need to add an if-then-else to somehow control the submit button I added on the bottom to require all fields, right?

Yes, you can add a visibility condition for the submit button, or you can set up a custom action on the button with IF logic that only allows it to do something when all conditions are met.

But…what is your submit button actually doing? Since you are on a detail screen and you are updating the table in real time, what would be the purpose of the submit? A user could change data and not click on submit, and it would have still updated their record.

1 Like

It’s the native profile screen that I’m editing. I need my users to have more details on their profiles so I added additional fields to the original profile screen and filling these is their first step. When they click on the submit button, I set some fields (like a starting balance, and profile ready checkbox) and that’s when I show the rest of the tabs.
Could I have done this in a better way?

1 Like

I was moreso curious what the button did. For example, someone might enter their name and not click on the submit button. Their name has still been updated in the table regardless of the button. But now it makes more sense that you also have additional logic and values being set when the button becomes visible and you click on it.

I just wanted to make sure you understood that a custom form on a detail screen doesn’t work the same way as a native form, and you weren’t expecting the button to actually save the values that were entered by the user. Instead they are saved as they type them.

There’s a bunch of different ways to set it up an onboarding flow. If it makes sense for your app and it works for you, then there’s nothing wrong with it.

Happy Creating!

1 Like

Thanks a lot, Jeff, I now understand how it works! Even though the setup was not initially intended, I like the part that it actually saves the user data or if a user abandons or quits the onboarding flow accidentally, they don’t lose the data. |«

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.