How to override default translations
This tip uses a JS Action on form load, to override our default translations with your own. This can be useful to change default error messages or button labels etc. Using this technique you can do things like change the default message on a required field, or the text in the Save & Finish Later Window.
Default Translations
Logiforms translations are stored in a variable named "logiFormAPI.lang". Type this into the developer console of your web browser:
logiFormAPI.lang
And hit ENTER and you will see output like the example below. Using this data you can find the path to the specific translations:
Once you've done that you can write your own JS (attached to a Form Action > JS Action), and change the default values. In the example below, we are changing the "Load Data" button shown of the Save & Finish Later plugin, to "Continue Claim" from the default of "Load Data"
// This function will receive the field and form objects. function(field,form){ // change finish later load button label logiFormAPI.lang['plugins']["FinishLater"].loaddata='Continue Claim'; }
0 Comments