# Send many data via input field to function in views.py

**URL:** <https://forum.djangoproject.com/t/send-many-data-via-input-field-to-function-in-views-py/8685>\
**Category:** Using Django\
**Created:** [July 8, 2021, 2:28pm UTC](https://forum.djangoproject.com/t/send-many-data-via-input-field-to-function-in-views-py/8685 "2021-07-08T14:28:05Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![smailt](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/smailt/32/8270_2.png) [@smailt](https://forum.djangoproject.com/u/smailt)\
**Post date:** [July 9, 2021, 6:57am UTC](https://forum.djangoproject.com/t/send-many-data-via-input-field-to-function-in-views-py/8685/21 "2021-07-09T06:57:23Z")

</div>

Dear Users  
when I add this to models.py, default=0

> Discu = models.DecimalField(max\_digits=4, decimal\_places=2, default=0)

then in forms.py

```auto
    Unites = forms.DecimalField(required =False)
    Discu = forms.DecimalField(required =False)
    class Meta:
        model= Invoice_billing
        fields=('Item_Ctra','Unites','Discu')

```

Many thank for all  
Just another thing is that if I add the same item it doen’t return an error message in the form 🙂

[Previous page](https://forum.djangoproject.com/t/send-many-data-via-input-field-to-function-in-views-py/8685.md?page=1)
