DavidK
1
I’m testing out Knack Next Gen. Can you change hard-coded Knack text using custom javascript?
If possible can someone give me an example of changing the ‘Email’ and ‘Password’ text on a login page?
I want to replace this text with the Japanese equivalents.
Thanks!
Hi @DavidK, this JS snippet might do the trick:
Knack.ready().then(async () => {
Knack.on('view:render', async ({ viewKey }) => {
document.querySelector('label[for="login-email"]').textContent = 'Enter your email address';
document.querySelector('label[for="login-password"]').textContent = 'Enter your password';
});
});
DavidK
3
Thanks Stephen! This seems to be working.