When your chat button or contact form is integrated within your CMS you usually already know the e-mail address and name of your customer so you do not need to ask for it in a contact form.
You can prefill both the e-mail address, name or phone of the customer or any custom value by adding some special code to your widget code.
Since version 5.17 prefill methods logic has been changed and new method has been added.
More info here: https://support.liveagent.com/147815-Set-visitor-specific-values-with-javascript
And now a quick one-line solution examples...
Chat buttons
<script type="text/javascript"> (function(d, src, c) { var t=d.scripts[d.scripts.length - 1],s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){return;}c(this);};t.parentElement.insertBefore(s,t.nextSibling);})(document, '//URL_TO_LiveAgent/scripts/track.js', function(e){ LiveAgent.createButton('16756da8', e); }); </script>
<script type="text/javascript">
(function(d, src, c) { var t=d.scripts[d.scripts.length - 1],s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){return;}c(this);};t.parentElement.insertBefore(s,t.nextSibling);})(document,
'//URL_TO_LiveAgent/scripts/track.js',
function(e){
LiveAgent.setUserDetails('customer@email.com', 'First name', 'Last name');
LiveAgent.createButton('16756da8', e);
});
</script>
LiveAgent.setUserDetails('customer@email.com', 'First name', 'Last name');
Contact form
Phone support
LiveAgent.setUserDetails(email, firstName, lastName, phone)