Localstorage with Form-store-data fails when inside a Template7 template

localstorage values are not being saved when using form-store-data inside a template.

I have multiple inputs with a form set up like this (simplified):

   <form id="formAB{{@index}}" class="form-store-data"> 
    <input class="drug" name="input-{{@index}}" type="number" value="{{dosevalue}}">

When I go to the page and change the value, I see no localstorage key:values are saved with the appropriate formAB{{@index}} when examining the console. Using Framework7 v5.75
I assume this should be automatic when the input changed?

If i put a form-store-data form outside the Template div ($$(’#antibioticsData’).html(html) ), it works as it should and shows in the console.
My Template is set up like this:

 var antibioticTemplate = $$('#antibiotics-template').html();
 var compiledantibiotics = Template7.compile(antibioticTemplate);
 var html = compiledantibiotics(drugs);

If I copy the generated html from the template and try it in a new page, it works as expected.