JSFiddle - React, Tailwind, and code Playground

HTML

<body>
    <a id=cropros>опрос</a>
  
<form id=pool method=post>
    <p><input value="" name=v1 id=v1 class="inp2"></input></p>
    <p><input value="" name=v2 id=v2 class="inp2"></input></p>
    <p><input value="add new" name=v3 id=3 class="inp2"></input></p>
    <p><button type="submit">Нажми на меня!</button></p>
    
</form>

</body>

JavaScript

$(function () {
    
    
    $('form').hide();
    $('#cropros').click(function(){
        $('form').show();
        //addnewinput();
    });
    
    function addnewinput(){
        var qtyinput = $("#pool input").length;
        //alert(qtyinput);
        $("#pool input:last").val("v"+qtyinput);
   
        qtyinput++;
        //alert(qtyinput);
        $("#pool button").before('<p><input class="inp2" value="add new" name=v'+qtyinput+'></input></p>'); 
    }
    
    //var lastinput = $("input:last");
    
    $("input:last").on("click",  function () {
            addnewinput();
    });
    

});