Skip to content

Commit 41f614b

Browse files
Customised text
1 parent 0814d15 commit 41f614b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
layout: socket_example
3+
title: Customised Text Example
4+
permalink: /examples/customised-messages-view/
5+
description: An example of the enquiry form with customised messages
6+
---
7+
A full list of the customisable messages and their labels can be found
8+
<a href="https://github.com/tutorcruncher/socket-frontend/blob/master/src/index.js#L26">here</a>.
9+
10+
{% highlight html %}
11+
<div id="customised-messages-view"></div>
12+
13+
<script>
14+
socket('{{ site.socket_key }}', {
15+
router_mode: 'history',
16+
element: '#customised-messages-view',
17+
mode: 'enquiry',
18+
messages: {
19+
submit_enquiry: 'Make Inquiry',
20+
enquiry_submitted_thanks: 'Inquiry submitted!',
21+
enquiry_title: 'Inquiry',
22+
}
23+
});
24+
</script>
25+
{% endhighlight %}
26+
27+
<div id="customised-messages-view"></div>
28+
29+
<script>
30+
socket('{{ site.socket_key }}', {
31+
router_mode: 'history',
32+
element: '#customised-messages-view',
33+
mode: 'enquiry',
34+
messages: {
35+
submit_enquiry: 'Make Inquiry',
36+
enquiry_submitted_thanks: 'Inquiry submitted!',
37+
enquiry_title: 'Inquiry',
38+
}
39+
});
40+
</script>

0 commit comments

Comments
 (0)