Symfony How to pass javascript variables values from twig to controller

Tip :

var url = '{{ path("yourroute", {'id': 'id'}) }}'; 
url = url.replace("id", this.value);

window.location.href = url;

 

Leave a Reply

Your email address will not be published. Required fields are marked *