Chat Form
There are 2 types of form API.
Pre Chat Form API: Using this API Developer can set Online Pre Chat form data. Such as user name, email and contact number.
Offline Message Form API: Using this API Developer can set offline Pre Chat form data like name, email, contact number, subject and message.
API call should be placed always bellow the REVE Chat script and Wrapped within
$_REVECHAT_API(function(){ … });
Table
Method
Description
setName
set Visitor Name
setEmail
set visitor email address
setContact
set visitor contact no
setSubject
set subject of offline message
setMessage
set predefined offline message
Pre Chat Form
function setName(name)
set the visitor name.
function setEmail(email)
set the visitor email address.
function setContact(contact)
set the visitor contact number.
How to Run Code
<script type="text/javascript">
$_REVECHAT_API(function()
{
$_REVECHAT_API.Form.Online.setFormInfo('name', 'email', 'phoneNo');
});
</script>
Offline Message Form
function setName(name)
set the visitor name.
function setEmail(email)
set the visitor email address.
function setContact(contact)
set the visitor contact number.
function setSubject(subject)
set the subject of the message.
function setMessage(message)
set the offline message.
How to Run Code
<script type="text/javascript">
$_REVECHAT_API(function()
{
$_REVECHAT_API.Form.Offline.setName('john');
});
</script>
Enable/Disable Pre-Chat Form
→ Insert chat script into website first
→ insert following html code into your website as needed
Paste following code snippet into webpage
$_REVECHAT_API(function()
{
$_REVECHAT_API.Form.Online.enableOrDisableForm(true);
});
</script>
Any questions? Please email us at [email protected]
Last updated
Was this helpful?