If you routinely use the Act-On Form editor, you may want to customize the appearance or functionality of Forms beyond what the editor allows by default. With some CSS and JavaScript knowledge, just about any edit can be made.
- Go to Content > Forms.
- Hover over the Form in question and click Edit
- In the Design tab, click CSS:
- From this panel, you can modify the various classes utilized by Act-On Forms.
Modify Form Functionality with JavaScript
If you are embedding a Form on a Landing Page, you can use JavaScript on the landing page to target specific areas of the Form and change how they function. Because Forms are generated on-demand for each visitor, they load separately from the rest of the page – this means that code must be entered correctly to ensure it runs after the Form is loaded.
To target Forms embedded on Act-On Landing Pages:
- Create your Form and embed it on an Act-On Landing Page as described here.
- In the Landing Page Composer, navigate to the Edit Form Block section.
- Click on the Form Load JS tab and add your code:
- Click OK to save.
- To apply code once a Form is submitted and redirects to a Rich Text Block (or Saved Rich Text Block), add your code in the ‘Form Submit JS’ tab: