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 SymplicyOptionsto the page window.
This object accepts 2 properties, corresponding to the 2 customization parameters:
styleto customize the stylelocalesto 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:
paddingthe space between the borders and the textborderthe bordersborderRadiusthe roundedness of the edgesbackgroundColorthe color of the buttoncolorthe color of the textfontFamilythe font typefontSizethe font sizefontWeightthe 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:
enEnglishfrFrenchnlDutchdeGermanesSpanishitItalian- …
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>