Personalization
You can customize 2 parameters of the contact button generated by Symplicy :
- Button style
- The text displayed on button
1 Add customization script
To customize, you have to attach a object SymplicyOptions
to the page window.
This object accepts 2 properties, corresponding to the 2 customization parameters:
style
to customize the stylelocales
to edit text
To declare these parameters, you must place a script before the main script:
<script>
window.SymplicyOptions = {
styles: {
// style options
},
locales: {
// text options
}
};
</script>
2 Modify the style
You can modify several properties of the button, separating the parameters with commas:
padding
the space between the borders and the textborder
the bordersborderRadius
the roundedness of the edgesbackgroundColor
the color of the buttoncolor
the color of the textfontFamily
the font typefontSize
the font sizefontWeight
the font weight
If you wish to keep one of these default values, simply omit the property. The default value will apply.
Example:
<script>
window.SymplicyOptions = {
styles: {
padding: '8px 12px',
borderRadius: '4px',
backgroundColor: '#E68A6F',
color: '#ffffff',
fontFamily: 'Source Sans Pro',
fontSize: '14px',
fontWeight: '700'
}
};
</script>
3 Modify the text
You can modify the text displayed in the button by separating the different languages with commas:
en
Englishfr
Frenchnl
Dutchde
Germanes
Spanishit
Italian- …
Symplicy will automatically identify the language of the page and display the correct translation.
Note: Currently, forms are only available in French, English, and Dutch.
Example:
<script>
window.SymplicyOptions = {
locales : {
fr: 'Veuillez répondre à quelques questions',
en: 'Please answer a few questions',
nl: 'Beantwoord enkele vragen',
...
}
};
</script>