dynamic-django-forms icon indicating copy to clipboard operation
dynamic-django-forms copied to clipboard

The "Rows" and "Max length" attributes of text area widgets seem to be unused

Open nickyu42 opened this issue 3 years ago • 1 comments

Setting the aforementioned attributes for a text area widget in the admin page has no effect, this https://github.com/askvortsov1/dynamic-django-forms/blob/012612323d28f284004d494bb320fa09e99cc445/dynamic_forms/utils.py#L55-L58

should be changed to something like:

def _process_text_area(field_json):
    field = forms.CharField()
    field.widget = forms.Textarea(attrs={'rows': field_json['rows'], 'maxlength': field_json['maxlength']})
    return field

If contributions are welcome, I can open a PR.

nickyu42 avatar Jun 01 '22 10:06 nickyu42

That change makes sense, yeah.

Sorry for the late reply. Just put this on the README (a bit too late, tbh), but I'm not using Django in any projects, and am open to someone else taking over maintenance of this package. I don't really have the time or need to push new features at the moment.

askvortsov1 avatar Apr 16 '23 19:04 askvortsov1