Is there a way to get the HTML content duplicated replacing rice with every element of the foods array without using document.write or even jQuery ? Is innerHTML the only way out ? Maybe this is possible to achieve using a reactive library like alpineJS ? (I can't use npm etc)
let food = ['rice', 'wheat', 'ragi', 'maida', 'red gram dhal', 'black gram dhal', 'bengal gram', 'horse gram', 'drumstick leaves', 'cabbage', 'manathakali', 'curry leaves', 'carrot', 'beetroot', 'potato', 'yam', 'Beans', 'brinjal', 'cauliflower', 'ladies finger', 'bitter gourd', 'tomato', 'apple', 'banana', 'grapes', 'guava', 'orange', 'cow milk', 'curd', 'butter milk', 'ghee', 'butter', 'paneer', 'chicken', 'mutton', 'egg', 'fish', 'almond', 'cashew nut', 'sesame', 'ground nut', 'coconut', 'coconut oil', 'sunflower oil', 'gingelly oil', 'groundnut oil', 'palm oil', 'sugar', 'jaggery', 'honey'];
<div class="form-group row">
<label for="what-beverage" class="col-sm-4 col-form-label">Rice</label>
<div class="col-sm-8 mt-2">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="rice" id="rice-daily" value="daily" />
<label class="form-check-label" for="rice-daily">Daily</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="rice" id="rice-weekly" value="weekly" />
<label class="form-check-label" for="rice-weekly">Weekly</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="rice" id="rice-fortnightly" value="fortnightly" />
<label class="form-check-label" for="rice-fortnightly">Fortnightly</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="rice" id="rice-occasionally" value="occasionally" />
<label class="form-check-label" for="rice-occasionally">Occasionally</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="rice" id="rice-never" value="never" />
<label class="form-check-label" for="rice-never">Never included</label>
</div>
</div>
</div>