Selecting all and posting

16 views
Skip to first unread message

Isaac Ndutumo

unread,
Feb 23, 2020, 10:41:17 AM2/23/20
to Django users
Am working on a hospital system where the billing model requires users to select varies items from the bill list and post them by creating a receipt or an invoice. Am new in JavaScript programming combined with Django.

Any help on below tasks will be highly appreciated 
  1. Select all or few and post either as a receipt or invoice. 
  2. Show total of selected items dynamically 

  Find attached capture for bill view.
Capture.JPG

Rishabh Gupta

unread,
Feb 23, 2020, 6:07:37 PM2/23/20
to django...@googlegroups.com
I can help give me checkout . You need to use of javascript .You can
take id from input field and place in value
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1b59fa26-910c-4fb6-81c4-a7b38291abf7%40googlegroups.com.

maninder singh Kumar

unread,
Feb 23, 2020, 10:32:05 PM2/23/20
to django...@googlegroups.com
There is a doubt about the model
 
               
 


Integr@te System

unread,
Feb 24, 2020, 4:18:55 AM2/24/20
to django...@googlegroups.com
Hi Isaac,

Plz review and attempt sth like this sample:

as we have with any type of fields you like for user input :

sth.html
<input type="checkbox" />   

<button> Click On </button> 

<script>
const checkbox = document.querySelector('input[type=checkbox]');
const button = document.querySelector('button');
checkbox.onchange = () => {
if (checkbox.checked) {
button.onclick = () => {  alert('Alert sth of user input. ');
};
}
};
</script>

If you asign any id of each input tag or type, you can map to db, that base on your declare and define.



Reply all
Reply to author
Forward
0 new messages