#28879: Widget NumberInput becomes text if you change size
-------------------------------------+-------------------------------------
     Reporter:  Chris Davies-        |                    Owner:  nobody
  Barnard                            |
         Type:  Uncategorized        |                   Status:  new
    Component:  Uncategorized        |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Old description:

> 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...

New description:

 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...

--

Comment (by Tim Graham):

 Your steps to reproduce use `TextInput` not `NumberInput`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28879#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.5eed5ae1476a36f4e4ef43be468edb00%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to