Firstly, I agree. All input components should have that option.
That said, personally I would have little use for this as I rarely use the native form and instead choose to create my own forms from a details layout. Here is how I handle required fields:
- All input components will be writing to user specific columns
- For those inputs that are deemed as required, I will prefix the label with two asterisks (**) to provide a visual clue
- In my table, I create an if-then-else column (
ite-can-submit?
) that checks the status of each of the user specific columns associated with my required input components. It typically looks something like this:
Essentially, if any of the “required” columns are empty it returnsfalse
, otherwise (all required fields present)true
- Then in my submit action I have a conditional that checks the status of the above column:
- If
false
, then show a failed notification and take no further action - If
true
, create the new row (Add Row) and carry on with the rest of the action sequence
- If
I find that this approach works quite well.