简体   繁体   中英

How to link zopim chat widget with custom form?

Does anyone know how to link custom form with zopim chat? I have a form that contains 2 questions and one listing with radio buttons. If customer fills that form, zopim chat widget have to open zopim chat widget with provided information.

For example:

Client answers "Answer1" to first question and "Answer2" to second question. Client chooses radio button with value "radiobutton2" out of radio button listing. Then he clicks on "Submit" button and zopim chat widget automatically opens up and customer is automatically saying there following line of text: "Hello! I want to sell you Answer1 for Answer2 with radiobutton2!"

I'm using wordpress.

Is it possible?

I also found code:

javascript:void($zopim.livechat.say('textext'));

You can use the Zopim API for this indeed:

Make it post to the same page with that info using submit. Use input fields and <form> element. Then

$answer1 = $_POST['answer1'];
$answer2 = $_POST['answer2'];

<a href="javascript:void($zopim.livechat.say('Hello! I want to sell you <?php echo $answer1; ?> for <?php echo $answer2; ?> with radiobutton2!'))"></a>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM