I'm writing a web app that gives you 2 template options on create.php
In template 1, you have the follwing in put options
<input type="file" name="image1" id="image1" required />
<input type="file" name="image2" id="image2" required />
In template 2, the user has 3 extra input options.
However, I don't want these 3 extra inputs to show for anyone using template 1.
Therefore I decided that I would surround the inputs with <div id="template2">
so that I can just use
$('#template2').hide()
to remove the extra 3 inputs inputs. See below
<input type="file" name="image1" id="image1" required /> <input type="file" name="image2" id="image2" required />
<div id="template2"><input type="file" name="image3" id="image3" required /><div>
<div id="template2"><input type="file" name="image4" id="image4" required /><div>
<div id="template2"><input type="file" name="image5" id="image5" required /><div>
The problem Is that this hide is only removing one of the template 2 divs, but the others are remaining.
I also tried looping $('#template2').hide()
three times, but that didn't solve the issue either.
So I'm kind of out of ideas at this point...