title: how to pass json encode data to a form
body: <pre><code>function PrintMembers(){
      var url = '/PrintMList';
      var MDataList = $('#MDataList').val();      
      var form = $('&lt;form action=&quot;' + url + '&quot; method=&quot;post&quot; id=&quot;search&quot; target=&quot;_blank&quot;&gt;' +
          '@csrf'+
          '&lt;input type=&quot;text&quot; name=&quot;MDataList&quot; value=&quot;' + MDataList + '&quot; /&gt;' +                                    
          '&lt;input type=&quot;text&quot; name=&quot;Action&quot; value=&quot;'+Action+'&quot; /&gt;' +              
          '&lt;/form&gt;');
          $('body').append(form);
          $(&quot;#search&quot;).submit();      
  }
  </code></pre>
  <p>in the PrintMList page, the array is empty when i print_r the MDataList in controller as below:</p>
  <pre><code>$var = $request-&gt;input('MDataList');
  print_r($var);
  </code></pre>