Articles on: Working with NotionForms

How to inject custom code in my form?

This feature is only available for Pro and Enterprise subscribers.
One of customization feature is the injection of custom code within your forms. There's no limit on what you can do with your own CSS and your own scripts. Add an analytics script or even a live chat on your form page.

Note that code changes and preview can only be previewed on the public page of your form. Changes done in the form editor won't be shown.
To add custom code, in the form editor go to the "Custom Code" section, and use the code input to put your code. It will be injected of the <head> section of the page.

Here's a first example you can use to center your logo on a form page:
<style> {
    left: 50% !important;
    transform: translateX(-50%);

Here’s another example to change the page background color:
#app, {
background-color: blue !important;

Here's another more advanced code sample that can be used to customize the appearance of the form, by applying new CSS rules:
body h1, body p, body input, body label {
	font-family: Lato, sans-serif !important;

label.font-bold {
	font-weight: 500! important;

.rounded-lg {
	border-radius: 4px !important;
.relative.mb-3 {
	margin-top: 30px;
.shadow-sm {
	box-shadow: none !important;
.border {
	border-color: #b8bdc9 !important;

Updated on: 05/04/2022

Was this article helpful?

Share your feedback


Thank you!