You can create custom CSS or JS for a specific form in Paymattic. This CSS / JS will only be applied to that specific form.
Custom CSS/JS can be used to add your own styles or script to your form. Let’s learn how to add custom CSS / JS in Paymattic.
- First of all, select the form to which you want to add custom CSS / JS.
- Then, click on the Settings button below the form name.
- Press the Custom CSS/JS tab on the left sidebar to open the CSS/JS panel.
How to create custom CSS #
There is no need to include a <style> tag. However, before you add any CSS code, you must first add the id of the specific table. It is necessary to target this specific form and apply CSS styling to it.
Sometimes you might need to add !important to override default styles.
How to create custom JS #
You can write javascript or jQuery in the custom JS panel.
- Your additional JS code will run after the form is initialized. Please write valid javascript code. Invalid JS code may break the Form.
- You can use the JavaScript variable $form to define the JavaScript DOM object of the form.
- Please do not include <script> </script> tag in the custom JS panel.
- At last, you must click the Save CSS and JS button to make your additional script functional.
This is the simple process to add custom CSS/JS to your form.