title: Generate random string in .tpl file
body: <p>I have the following input field:</p>
  
  <pre><code>&lt;input name="domain" value="{$domain}" size="50" 
  data-hostname-check="{$options}" 
  onchange="if (
  typeof simulateCart == 'function' &amp;&amp; this.checkValidity())
  simulateCart.call(this);"/&gt;
  </code></pre>
  
  <p>What i need is to generate a random string for if the input field when its not filled. But I have no clue how to do this. This input field is in an if loop using smarty template.</p>
  
  <p>The onchange is required at the moment so if I remove this you can leave the input field blank but there should be a label before we can insert it into the database.</p>