Closed zabulus closed 10 years ago
It is possible, but it involves creating your own version of Form
that returns a different field generator than the DefaultFieldGenerator
that uses a different implementation of the FieldGeneratorHandlersRouter
(https://github.com/MRCollective/ChameleonForms/blob/master/ChameleonForms/FieldGenerators/FieldGeneratorHandlersRouter.cs).
You could then hook up your extended Form
class via a different extension method on HtmlHelper (e.g. https://github.com/MRCollective/ChameleonForms/blob/master/ChameleonForms/Form.cs#L108).
Obviously, that's a lot of work and it's on the todo list in terms of making it easier to extend. I'd love to enable people to add in their own custom controls. Unfortunately, it's something that wouldn't happen any time soon as both @MattDavies and I are very busy.
I'm interested in how you would implement localisation with the enum though as maybe we can bake that support in. If you are willing to make a contribution to the project I'm happy to help you get it working.
Looks like I've started panic earlier than it needed. I've read documentation of the Humanizer. And there is already localization mechanism for enums. I have little problem to put this in auto-generated datacontracts but this is another story. I think you should add this to documentation with link to Humanizer documentation. https://github.com/MehdiK/Humanizer#humanize-enums Thanks for fast reply.
I need to localize values of Enum in drop down list, but I couldn't find any possibilities to replace default implementation of EnumListHandler via Humanizer. Is there any override for this?