Live Helper Chat support forum.. Old google groups forum can be found here

You are not logged in.

Announcement

#1 2019-06-13 09:05:47

tama26
New member
Registered: 2019-06-13
Posts: 3

help me !! how to input NAME , E-mail and Phone Auto on Start Chat

How to input NAME, E-mail and Phone  Automatic  on Javascript when  click start chat.


** i use widget script

help me please.

Offline

#2 2019-06-13 09:35:49

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 3,726
Website

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

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.


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#3 2019-06-14 01:23:55

tama26
New member
Registered: 2019-06-13
Posts: 3

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

Thank you. for answer,
But i used this document not working. you and someboby have more example script?

Offline

#4 2019-06-14 06:30:30

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 3,726
Website

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

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  wink


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#5 2019-06-14 08:56:36

tama26
New member
Registered: 2019-06-13
Posts: 3

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

thank you so much Administrator,
i will try again.

Offline

#6 2019-06-14 09:10:33

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 3,726
Website

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

You are welcome smile
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 wink

This will also help this amazing open source project.
I wish you to solve soon.

Have a good day smile


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#7 2020-08-28 20:52:28

juancmonsalves
Member
From: Venezuela
Registered: 2020-07-29
Posts: 14

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

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

#8 2020-08-28 21:36:14

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 3,726
Website

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

Hi juancmonsalves, I cannot help more with this.
I will try to forward the topic to the chat owner.


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#9 2020-08-29 00:07:19

juancmonsalves
Member
From: Venezuela
Registered: 2020-07-29
Posts: 14

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

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

#10 2020-08-29 05:36:36

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,230
Website

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

Hi,

Seems dropdown does not respect passed value. I'll update lhc on monday to support that.

Offline

#11 2020-08-29 15:07:56

juancmonsalves
Member
From: Venezuela
Registered: 2020-07-29
Posts: 14

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

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

#12 2020-08-29 17:14:49

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,230
Website

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

https://doc.livehelperchat.com/docs/jav … arguments/ See department value. Once passed it value can’t be changed.

Offline

#13 2020-08-29 20:28:40

juancmonsalves
Member
From: Venezuela
Registered: 2020-07-29
Posts: 14

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

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

#14 2020-08-31 05:32:58

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,230
Website

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

Here is your change regarding dropdown.
https://github.com/LiveHelperChat/liveh … 691a307bc8

Offline

#15 2020-09-01 00:01:09

juancmonsalves
Member
From: Venezuela
Registered: 2020-07-29
Posts: 14

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

Thank you!

I will install it and try.

Offline

#16 2020-09-01 23:01:57

juancmonsalves
Member
From: Venezuela
Registered: 2020-07-29
Posts: 14

Re: help me !! how to input NAME , E-mail and Phone Auto on Start Chat

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

Board footer