Skip to content

Use Form Model for "view"/task, command usage #368

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

Closed
spralle opened this issue Apr 27, 2015 · 3 comments
Closed

Use Form Model for "view"/task, command usage #368

spralle opened this issue Apr 27, 2015 · 3 comments

Comments

@spralle
Copy link

spralle commented Apr 27, 2015

I would like to use the schema-form for two things I cannot see are supported

  1. View only. Instead of having editable components it is labels or similar that show the data. It would be good if the same form layouts could be reused for this.

  2. Task / command driven editable parts from the viewable form. As an example maybe you see an order with orderlines I would like to have each field on the order line clickable, if you click you make the whole order line editable (with for example x-editable inplace edit) and when done with the orderline a json command would be triggered ("AmendOrderLine...."). Or a button to remove an orderline would then trigger a RemoveOrderLine command. Another command could be change delivery address. I think you get the idea.

This is not so much a feature request as a request if you think this is feasible. It is something like all data is displayed from a schema but you can trigger tasks / commands by clicking data or button which would then trigger a new form from a separate schema.

If you could give some hints on how easily the project could be extended for these kind of usecases it would be very helpful.

@Dervisevic
Copy link
Contributor

For number 1 could be pretty done i think with a custom [decorator]. The idea being that you look at how it's done with the bootstrap one, and instead of having a form in the html to correspond to the schema/form you instead just output it in the way that it fits, like one line for strings, and maybe a pre for a textarea or whatever really fits. This may also be a useful decorator to include in ASF.

@davidlgj
Copy link
Contributor

As @Dervisevic said, what your looking for is implementing your own set of templates for the standard types, which is called a "decorator". This could also be the solution for #2.

@nicklasb
Copy link
Member

nicklasb commented Apr 9, 2016

Please re-open if you do not feel the question has been answered sufficiently.

@nicklasb nicklasb closed this as completed Apr 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants