Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
Hello, first of all this is my first message here, this live support software is great, and I'm trying to edit it in order to reach my objectives.
Today, I'm facing a development problem, I have 3 buttons on my page, every button is used for asking help to operator for a certain problem.
So, Clicking on each button, I need to open a popup with chat embedded, and start it automatically using the username and a pre-defined description (ie. John Smith - I need help with red shoes).
I tried to see if there is some api, but I really don't know how to to this. Is it possible to include some command into the embed code?
Offline
You can prefill some form variables following this
https://livehelperchat.com/pre-filling- … -140a.html
But automatically start chat, don't think so.
Offline
Thank you for your reply, I tried but without results, this is my script:
[== JavaScript ==]
<script type="text/javascript">
var LHCChatOptionsPage = {};
LHCChatOptionsPage.attr_prefill = new Array();
LHCChatOptionsPage.attr_prefill.push({'name':'Username','value':'test name'});
LHCChatOptionsPage.attr_prefill.push({'name':'Question','value':'test question'});
LHCChatOptionsPage.opt = {};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = '//mydomain.eu/index.php/ita/chat/getstatusembed';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
window.onload=function(){
$("#box_chat").css("height",$("body").height());
}
</script>
I used "Username" because my chat html has this input:
[== HTML ==]
<input type="text" class="form-control" name="Username" value="">
and "Question", because my chat html has this textarea:
[== HTML ==]
<textarea class="form-control form-group " placeholder="Please enter a message..." id="id_Question" name="Question"></textarea>
what's wrong with my code?
My loaded chat is not pre-compiled:
Last edited by Berserk (2015-05-18 16:56:02)
Offline
Have you at-least tried to read an article?
As for default fields only these are supported
LHCChatOptionsPage.attr_prefill.push({'name':'email','value':'***.com','hidden':true});
LHCChatOptionsPage.attr_prefill.push({'name':'phone','value':'370454654'});
LHCChatOptionsPage.attr_prefill.push({'name':'username','value':'Username here'});
Offline
Pages: 1