Advertisement
ZloyTip

signup.html

May 5th, 2017
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Smarty 0.41 KB | None | 0 0
  1. {$html = $wa->signupForm($errors)}
  2.     {$name = sprintf('%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff))}
  3.     {$_name = " data-`$name`=\""}
  4.     {$html|regex_replace:'/ name="/':$_name}
  5.     <script>
  6. (function (d, c) {
  7. var data = d.querySelectorAll('[data-'+c+']');
  8. for (var i = 0; i < data.length; i++) {
  9.     if(data[i].dataset && data[i].dataset[c]) data[i].name = data[i].dataset[c];
  10. }
  11. })(document, '{$name}');
  12. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement