JSFiddle - React, Tailwind, and code Playground

HTML

<form>


<fieldset id="inputsadd">
<label>Nome: <input class="abc" type="text" name="images[]" /></label>

</fieldset>

<label><input type="button" name="add" value="ADD"/></label>

<img src="http://lorempixel.com/50/50/cats" />
<img src="http://lorempixel.com/50/50/nature" />

</form>

JavaScript

var input = '</br><label>Nome: <input class = "abc" type="text" /> <a href="#" class="remove">X</a></label>';

	$("input[name='add']").click(function( e ){
  alert('hi');
		$('#inputsadd').children('label').last().append( input );
	});

	$('#inputs_add').delegate('a','click',function( e ){
		e.preventDefault();
		$( this ).parent('label').remove();
	});


var focused = null;

$("input").on("focus", function() {
  focused = $(this);
})

$("img").click(function() {
  if (focused.length)
  focused.val($(this).attr("src"));
})