Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
How to input NAME, E-mail and Phone Automatic on Javascript when click start chat.
** i use widget script
help me please.
Offline
Hi tama26 , welcome on the live helper chat forum!
Sorry, i can provide here just basic support.
You can look at this documentation page: Pre-filling form fields and adding custom fields
You can always look at the documentation: https://livehelperchat.com/documentation-6c.html
If you need more deep customization you can try the paid support, more info on my forum signature links.
PeopleInside - Live helper chat - free limited forum support!
For commercial support or GitHub [see FAQ here]
If you want to support this open source project, just donate [see support page]
Something wrong with the forum? [contact a superhero]
Offline
Thank you. for answer,
But i used this document not working. you and someboby have more example script?
Offline
Hi tama26, sorry i cannot help more on this.
You may consider the commercial support if you are unable to solve your issue for your business.
Have a good day
PeopleInside - Live helper chat - free limited forum support!
For commercial support or GitHub [see FAQ here]
If you want to support this open source project, just donate [see support page]
Something wrong with the forum? [contact a superhero]
Offline
thank you so much Administrator,
i will try again.
Offline
You are welcome
I'm just a passionate user that help on the forum so for more deep support i have to suggest to consider the commercial support that is not provided by me
This will also help this amazing open source project.
I wish you to solve soon.
Have a good day
PeopleInside - Live helper chat - free limited forum support!
For commercial support or GitHub [see FAQ here]
If you want to support this open source project, just donate [see support page]
Something wrong with the forum? [contact a superhero]
Offline
Hi!
I'm having the same issue. I have read https : // doc . livehelperchat . com / docs / custom-fields-and-prefill and follow the instructions
It's very simple... I want to pass the nick name to the start chat form. I have defined de custom field as you said in the documentation.
I modified the script and add the code
<script>
var LHC_API = LHC_API||{};
LHC_API.args = {mode:'widget',lhc_base_url:'//zimbra.cantv.com.ve/chat/index.php/',wheight:450,wwidth:350,pheight:520,pwidth:500,survey:1,check_messa$
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.setAttribute('crossorigin','anonymous'); po.async = true;
var date = new Date();po.src = '//zimbra.cantv.com.ve/chat/design/defaulttheme/js/widgetv2/index.js?'+(""+date.getFullYear() + date.getMonth() + date$
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
if (typeof lhc_var === 'undefined'){
window.lhc_var = {}; // Window is required to define variable in global scope
};
lhc_var.usernamepassing = "Juan Carlos";
</script>
When I start the chat widget from HTML the nick name is empty. I want to do the same with email, phone and some custom form fields.
Please give me a Clue
Offline
Hi juancmonsalves, I cannot help more with this.
I will try to forward the topic to the chat owner.
PeopleInside - Live helper chat - free limited forum support!
For commercial support or GitHub [see FAQ here]
If you want to support this open source project, just donate [see support page]
Something wrong with the forum? [contact a superhero]
Offline
I solved the first part. Text Fields worked for me. But Dropdown I'm looking for a trick. At the end of the document https : // doc . livehelperchat . com / docs / custom-fields-and-prefill you can find how to pass values from javascript to prefill new Chat form fields
Here my code. In Italics passing values to the New Chat Form
<script>
var LHCChatOptions = {};
LHCChatOptions.attr_prefill = new Array();
LHCChatOptions.attr_prefill.push({'name':'email','value':'***.com','hidden':true});
LHCChatOptions.attr_prefill.push({'name':'phone','value':'2125528938'});
LHCChatOptions.attr_prefill.push({'name':'username','value':'Juan Carlos'});
LHCChatOptions.attr_prefill.push({'name':'question','value':'Viene de Cati'});
LHCChatOptions.attr_prefill_admin = new Array();
LHCChatOptions.attr_prefill_admin.push({'index':'area local','selected':'212'});
LHCChatOptions.attr_prefill_admin.push({'index':'local','value':'9411141'});
LHCChatOptions.attr_prefill_admin.push({'index':'cell','value':'6281975'});
var LHC_API = LHC_API||{};
LHC_API.args = {mode:'widget',lhc_base_url:'//zimbra.cantv.com.ve/chat/index.php/',wheight:450,wwidth:350,pheight:520,pwidth:500,survey:1,check_messa$
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.setAttribute('crossorigin','anonymous'); po.async = true;
var date = new Date();po.src = '//zimbra.cantv.com.ve/chat/design/defaulttheme/js/widgetv2/index.js?'+(""+date.getFullYear() + date.getMonth() + date$
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
Anybody knows how to pass values tu dropdown list in New Chat Form?
Offline
Hi,
Seems dropdown does not respect passed value. I'll update lhc on monday to support that.
Offline
Hello.... Thanks you very much.
It's possible to pass department value to Start Chat Form?
Thanks a lot.
P.D.: How Can I make a little donation to developers with Paypal?
Offline
https://doc.livehelperchat.com/docs/jav … arguments/ See department value. Once passed it value can’t be changed.
Offline
Thaks to remdex for your support. I share my code. Please note the following details:
1.- Passing some values
2.- Only text values
3.- Passing Department
<script>
var LHCChatOptions = {};
//DEFAULT FIELDS IN NEW CHAT FORM
LHCChatOptions.attr_prefill = new Array();
LHCChatOptions.attr_prefill.push({'name':'email','value':'***.com','hidden':true});
LHCChatOptions.attr_prefill.push({'name':'phone','value':'2125528938'});
LHCChatOptions.attr_prefill.push({'name':'username','value':'Juan Carlos'});
LHCChatOptions.attr_prefill.push({'name':'question','value':'Viene de Cati'});
//CUSTOM FIELDS IN NEW FORM CHAT
LHCChatOptions.attr_prefill_admin = new Array();
LHCChatOptions.attr_prefill_admin.push({'index':'local','value':'9411141'});
LHCChatOptions.attr_prefill_admin.push({'index':'cell','value':'6281975'});
LHCChatOptions.attr_prefill_admin.push({'index':'local','value':'9411141'});
var LHC_API = LHC_API||{
};
//I PASS DEPARTMENT NUMBER WITH department: [7], select departmend ID 7
LHC_API.args = {mode:'widget',lhc_base_url:'//your.domain.fqdn/chat/index.php/',department: [7],wheight:450,wwidth:350,pheight:520,pwidth:500,surv$
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.setAttribute('crossorigin','anonymous'); po.async = true;
var date = new Date();po.src = '//your.domain.fqdn/chat/design/defaulttheme/js/widgetv2/index.js?'+(""+date.getFullYear() + date.getMonth() + date$
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
I hope this works for you also.
Offline
Here is your change regarding dropdown.
https://github.com/LiveHelperChat/liveh … 691a307bc8
Offline
Thank you!
I will install it and try.
Offline
Hi....
I update my base code with your patch and Its Works!!!! Thanks a lot.
Here the code to pass pre-filled value to a drop-down list custom field at Start Chat Form
var LHCChatOptions = {};
LHCChatOptions.attr_prefill = new Array();
LHCChatOptions.attr_prefill_admin.push({'index':'area_cell','value':'416'});
Thanks to remdex for your help and work!
Last edited by juancmonsalves (2020-09-01 23:02:24)
Offline