Group fields together without changing the model structure?
See original GitHub issueI know that you can use a template and basically display the fields however you like (as described here: https://github.com/gcanti/tcomb-form-native/issues/106) (I am doing that currently)
However I was wondering - I need some fields to be grouped together like you would do in html with a fieldset?
This is my model:
var model = t.struct({
id: t.maybe(t.String),
name: t.String,
email: Email,
street: t.maybe(t.String),
zip: t.maybe(t.String),
city: t.maybe(t.String),
country: t.maybe(t.String),
tel: t.maybe(t.String),
manager: t.struct({
name: t.maybe(t.String),
lastname: t.maybe(t.String),
tel: t.maybe(t.String),
email: t.maybe(Email)
}),
notes: t.maybe(t.String),
position: t.struct({
latitude: t.Number,
longitude: t.Number
}),
});
name and email should be displayed together, steet, zip, city, country, tel as well.
Basic info:
- name
- email Address info:
- street
- …
- …
Am I able to achieve this somehow just with the options? For the manager fields for example I can have a label for all the fields since it is a new struct. The issue with doing the same for name and email is that I would have to change the object structure. And then the value that comes from tform will be different…
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Grouping Controls | Web Accessibility Initiative (WAI) - W3C
Grouping related form controls makes forms more understandable for all users, as related controls are easier to identify. It also makes it easier...
Read more >How to group fields when serialising object with Marshmallow?
How to group fields together when serialising a flat-structured SQLAlchemy object with Marshmallow without changing the flat data structure ...
Read more >Fields and Field Groups subpattern - Finance & Operations
Field and Field Groups is the most common data entry subpattern and uses a dynamic number of columns to present multiple fields or...
Read more >Field Groups - Sanity.io
Using field groups in a document or object does not change the structure of the document, it only affects how and where fields...
Read more >Solved: How to group fields - Microsoft Power BI Community
How to group fields ... I am not sure how simple it would seem but you can just add a slicer ... Then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
and then just pass it to the options
There might be a way to get the result you want this without a template. Here is a simple example of two side by side fields and a full width field without using templates.