Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form layout for viewing submitted form results #315

Closed
mikfreeman opened this issue Sep 27, 2011 · 6 comments
Closed

Form layout for viewing submitted form results #315

mikfreeman opened this issue Sep 27, 2011 · 6 comments

Comments

@mikfreeman
Copy link

Right now fieldsets are only supported in forms.

After a form is submitted it would be nice to show the results with the same layout as your form.

So you would have paragraphs in place of inputs, selects etc

This is a common pattern, see any CRUD grails application for an example.

@olvlvl
Copy link
Contributor

olvlvl commented Sep 27, 2011

When I successfully submit a form I like to be greeted with a message that the submission went fine, or be presented with the result of my submission. I my opinion forms should only be used when data is to be submitted, not for presentation or layout.

Do you have a visual example of what you ask for ?

@mikfreeman
Copy link
Author

If we take a product example and I want to take a look at the product details. Often laying the page out label and value makes sense. When the user edits the form version they get a consistent layout for the fields they are going to edit.

I could accomplish this quite easily in 1.2.0 but 1.3.0 requires a form for the field sets.

Here is a sample https://lh6.googleusercontent.com/-Vip7jW1oqgg/ToHt2H9cxLI/AAAAAAAAABY/P_oTLqLoPUE/s800/bootstrap.png

@mdo
Copy link
Member

mdo commented Sep 29, 2011

1.3 does not require a form as the parent for the fieldset, nor any of the other form elements. There's nothing stopping you from doing this if I'm understanding this right.

Can you confirm?

@mikfreeman
Copy link
Author

Sorry its not the field set that requires the form but some of the clearfix styles.

1.3.0 requires that these styles are enclosed in a form. For example

form .clearfix {
margin-bottom: 18px;
zoom: 1;
}
form .clearfix:before, form .clearfix:after {
display: table;
content: "";
zoom: 1;
*display: inline;
}
form .clearfix:after {
clear: both;
}
form div.clearfix.error {
background: #fae5e3;
padding: 10px 0;
margin: -10px 0 10px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}

@mdo
Copy link
Member

mdo commented Oct 4, 2011

Yup, but all those styles are to simple ensure that they don't get applied globally. That's not something we can do right now. In 2.0, we'll be introducing a new class for form .clearfix instances to avoid this kind of behavior. For now, you'll have to make do.

@mdo mdo closed this as completed Oct 4, 2011
@mikfreeman
Copy link
Author

ok great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants