mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 02:31:21 +00:00
avoid repetition on get_form date
This commit is contained in:
@@ -208,10 +208,7 @@ async function submit() {
|
|||||||
|
|
||||||
function get_form_data() {
|
function get_form_data() {
|
||||||
contact = {};
|
contact = {};
|
||||||
contact.name = document.getElementById('customer_name').value;
|
let inputs = ['name', 'skype', 'number', 'notes', 'email'];
|
||||||
contact.number = document.getElementById('customer_number').value;
|
inputs.forEach((id) => contact[id] = document.getElementById(`customer_${id}`).value)
|
||||||
contact.skype = document.getElementById('customer_skype').value;
|
|
||||||
contact.notes = document.getElementById('customer_notes').value;
|
|
||||||
contact.email = document.getElementById('customer_email').value;
|
|
||||||
window.contact = contact
|
window.contact = contact
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user