cosmos icon indicating copy to clipboard operation
cosmos copied to clipboard

Support inline layouts in Form

Open siddharthkp opened this issue 7 years ago • 5 comments

The form can also define how the fields will be arranged. More like a form layout component: horizontal, vertical and inline.

  • [x] Horizontal: to horizontally align the labels and controls of the fields.
  • [x] Vertical: to vertically align the labels and controls of the fields
  • [ ] Inline: to render form fields in one line.

(Descriptions and names taken from Ant.design)

forms

siddharthkp avatar Jan 08 '18 08:01 siddharthkp

I would say we are missing the inline layout, which allows labels on the left, aligned left and all form fields in a row.

landitus avatar Mar 06 '18 22:03 landitus

Btw, I still find it more clear to use horizontal, vertical and inline, instead of label-on-top, etc. Mainly because both horizontal and inline have labels on the side/at the left of the field

landitus avatar Mar 06 '18 22:03 landitus

inline is a good name, but horizontal and vertical aren't that obvious on the top level Form

Form layout="horizontal" sounds like it will lay out a form horizontally (but that's inline)

I do agree that label-on-left is a ugly name too 😅 Let's open this to a wider set of people?

siddharthkp avatar Mar 07 '18 06:03 siddharthkp

@landitus Do we still want an inline layout for forms?

nkohari avatar Jun 06 '18 13:06 nkohari

Yes, the use case is out there, though it's not very common use. I was in doubt if a Stack component would solve the inline layout, but I think there are lots of things to check for: validations, messages, whether or not to show labels on the fields.

landitus avatar Jun 06 '18 20:06 landitus