Increment input name and ID when it is inserted in the dom
<p>how can I increment the input name and ID each time the element is inserted in the dom, </p>

<pre><code>&lt;input type="text" name="option_tree[sponsorship_section][1][image1]" id="sponsorship_section_image1_1"&gt;
</code></pre>

<p>to this:</p>

<pre><code>&lt;input type="text" name="option_tree[sponsorship_section][1][image2]" id="sponsorship_section_image1_2"&gt;
</code></pre>

<p>Thanks</p>
