I tried composing a simple function to hold and update values as user inputs into a control by passing the event_handler and the input_selector as arguments to my function. But my browser console returns an error "Typeerror e is undefined;’
It’s annoyingly stressful to compose separate functions to set/update the values of variables initialized in data function via the $setState and $update hooks.
but you can manage to save all the inputs in just one function
eg:
// wrap all your inputs in a form
<form class='list no-hairlines no-margin my-form'>
// all inputs here!
...
// use the same handler for every input!
<input @input='formHandler' name='business_name'/>
...
</form>
formHandler (e) {
// use f7 form api to retrive all the data
const myFormData = app.form.convertToData('.my-form')
// now you have all the inputs value with their name prop in myFormData.
}
How are you gonna print the inputted value for every input-control using the string interpolation syntax
say, {{ field }} since this.field represents only one property under your data function.