Auto Save Input Fields

I have a form with over 30 input fields connected to data collection through a dataset. I want to auto-save the member input value onChange. I am using the below code which works perfectly, but the problem is that I need to write this code for each and every input field
Is there any code that can achieve my requirements for bulk input fields instead of keeping repeat this codes

export function currentPosition_change(event) {
    $w('#resumeDataset').save();
}

export function resumeEmail_change(event) {
    $w('#resumeDataset').save();
}

export function phoneNumber_change(event) {
    $w('#resumeDataset').save();
}

export function aboutInput_change(event) {
    $w('#resumeDataset').save();
}

export function businessWebsite_change(event) {
    $w('#resumeDataset').save();
}

export function dateOfBirth_change(event) {
    $w('#resumeDataset').save();
}

export function country_change(event) {
    $w('#resumeDataset').save();
}

export function streetAddress_change(event) {
    $w('#resumeDataset').save();
}

export function stateAddress_change(event) {
    $w('#resumeDataset').save();
}

You can do following…

  1. you have all your elements on your page…
    Get all the children on your page…
let myChildren =$w("#page1").children;
  1. Take a look what you got as result.
console.log(myChildren);
  1. Find the right items you need inside the results.

  2. Create a loop (for / each-loop), to separeate all including INPUT-ELEMENTS you have on your site.

  3. I think the rest is self-explanatory…

Another thing…

export function currentPosition_change(event) {    
    $w('#resumeDataset').save();
}

export function resumeEmail_change(event) {
    $w('#resumeDataset').save();
}

export function phoneNumber_change(event) {
    $w('#resumeDataset').save();
}

Better…

export function currentPosition_change(event) { x();}
export function resumeEmail_change(event) {x();}
export function phoneNumber_change(event) {x();}

function x() {$w('#resumeDataset').save();}