In this guide, we will explain how to display and enter the field values from the right side.
Drag and drop some fields with a JavaScript field as shown below.
Click the pencil icon of the JavaScript field and paste the code. Save the changes.
Please use the code below:
function setRTL() {
// Update all text elements
let textElements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, span, a, li');
for(let i = 0; i < textElements.length; i++) {
textElements[i].setAttribute('dir', 'rtl');
}
// Update all input elements
let inputElements = document.querySelectorAll('input, textarea');
for(let i = 0; i < inputElements.length; i++) {
inputElements[i].setAttribute('dir', 'rtl');
}
}
setRTL()
Try the form. It will show the text like Header and Paragraph on the right and allow you to enter the field values from the right side.
For any questions, please contact us - [email protected] or the Formyoula in-app chat 🙂