Formyoula Javascript Best Practices
In this guide, we have shared some Formyoula Javascript Best Practices. If you have any questions, please email us support@formyoula.com.
Single Javascript Element Per Page
We recommend using a single Javascript element for each form page to avoid issues with JavaScript dependencies and hard to track logic that can be split between multiple JavaScript fields on the page.
Move to The Bottom of The Page
Please move the JavaScript element to the bottom of the page to avoid issues with undefined or missing fields and values. This will make sure that all fields and content are loaded before the JavaScript logic is executed.
Enable GitHub Based Version Control
You can enable Github based version control for all of your forms. This will create a change log of all form updates. All JavaScript changes will be logged on your Github repository. Please use the following guide to enable GitHub integration with Formyoula - https://support.formyoula.com/knowledgebase/articles/1903252-formyoula-github-integration
Run The Code on The Browser Console
Please copy and past the final JavaScript code into the browser console when running the Formyoula form on the mobile web app. This will highlight any warnings or errors with the code that needs to be fixed before deployment.
Include Comments and Make Functions and Variables Descriptive
Please use code comments for each line of code and make functions and variables descriptive. This will help when others are reviewing and updating the javaScript code.
For any questions, please contact us - support@formyoula.com.