Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#28879 closed Uncategorized (invalid)

Widget NumberInput becomes text if you change size — at Version 1

Reported by: Chris Davies-Barnard Owned by: nobody
Component: Uncategorized Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

I'm adjusting the width of some form fields because small integers such as qty and price don't need to be 20 long and the following code results in them becoming type = 'text' regardless.

    models.DecimalField: {'widget': TextInput(attrs={'size':'7'})},
    models.IntegerField: {'widget': NumberInput(attrs={'size':'3'})},
}}
breaking other aspects.  Sorry don't know if I need to add more detail etc...
		

Change History (1)

comment:1 by Tim Graham, 6 years ago

Description: modified (diff)
Resolution: needsinfo
Status: newclosed

I guess you're putting those lines in a ModelAdmin.formfield_overrides? I tried this and couldn't reproduce the problem. Please reopen if you can provide a sample project or a test case that demonstrates the problem.

Note: See TracTickets for help on using tickets.
Back to Top