I have a page developed in php, which takes billing information as input on checkout. It has multiple text fields alongwith checkboxes with each field. Each text field has some default value(integer). On clicking a checkbox, the corresponding field becomes disabled and its value is being added in waived_off_amount. The values of all unchecked fields get added into amount_paidby_guest. There are total 13 fields which i want to categorize under 4 headings,such as room rent, exclusive charges,house keeping,room service. Such that if i click exclusive charges, it should check AC,electricity, water,gas and internet charges. If i check house keeping, it should automatically check extra bedding,house keeping, misc charges. How do i achieve above functionality. Im sharing the code through which im already calculating waived_off amount, amount_paidby_guest and total_bill. But they are not categorize under main headings. Also there are 2 buttons,one for calculating these values, other one sends all the info in db.I don't want calculate button to submit the page, but currently its submitting my form and hence i loose all the values which i want to store in db.
Aucun commentaire:
Enregistrer un commentaire