emmett-framework / emmett

The web framework for inventors
Other
1.06k stars 71 forks source link

Customizing forms #321

Closed bronte2k7 closed 2 years ago

bronte2k7 commented 3 years ago

Hi @gi0baro

Need information with examples)))

gi0baro commented 3 years ago

@bronte2k7 could you give us a bit of context?

What do you mean by customizing forms? Are you talking about styling, rendering, behaviour, validation..?

bronte2k7 commented 3 years ago

style and custom widget

no information: https://emmett.sh/docs/2.2.x/forms#customizing-forms

gi0baro commented 3 years ago

@bronte2k7 yes, you can use custom widgets and Form.custom attribute, see:

Regards creating custom styles, you can inherit from the FormStyle class (https://github.com/emmett-framework/emmett/blob/master/emmett/forms.py#L435), write your own widget functions and apply the style to forms using the formstyle parameter. You can also apply the style to all forms setting App.config.ui.forms_style to your class.

gi0baro commented 2 years ago

I'm closing this for inactivity