Matt the Destroyer írta: >size=30 simply tells the browser to make the input field a size of 30 >characters wide. it has no bearing on input data or transmission. > >in the past, i have simply hard-coded my own input fields into my >templates so I can directly control the size and other attributes that >i might want (such as onclick et al). > > No problem with hard-coding. Sooner or later we have to say something to the machine. But the equestion is if i say something once (in the model), why need to repeat myself?
Say something similar to (pseudo): ALLOWED_TEXTWIDGET_COUNT = 60 if (model.field.size > ALLOWED_TEXTWIDGET_COUNT): size_tag = ALLOWED_TEXTWIDGET_COUNT else: size_tag = model.field.size And Jay, (afaik) CSS controls visual size of field, not the number of characters you can type in (VARCHAR(30) field in 600px input widget means 2/3 of a box is empty) Charlie. -- "...s minden mestert kinevettem, ki nem nevetett önmagán." GPG public key: http://www.rendszergazda.com/gpg/charlie-gpg-public-key.asc --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---