Back to Documentation
Core Features

Smart Code Visual Builder

Advanced visual form editor with drag-and-drop interface, container support, and real-time preview. Create custom HTML layouts without coding.

8 min read
Updated December 2024
Visual CanvasHeading ElementLorem ipsum dolor sit amet, consectetur adipiscing elit.Sed do eiusmod tempor incididunt ut labore et dolore magna.ButtonButtonElementsπŸ“° HeadingπŸ“„ TextπŸ”˜ ButtonπŸ–ΌοΈ ImageπŸ“¦ Container

Overview

The Smart Code Visual Builder is an advanced visual form editor that allows you to create custom HTML layouts using a drag-and-drop interface. Unlike the basic HTML editor mode, Smart Code provides a visual canvas with pre-built elements, container support, and real-time preview capabilitiesβ€”no coding knowledge required.

🎨

Visual Interface

Drag and drop elements without writing any code

πŸ“¦

Container Support

Nested layouts with rows, columns, and containers

⚑

Real-time Preview

See changes instantly as you build

Key Benefits

  • β€’ No coding required - Visual interface for everyone
  • β€’ Container support - Build complex nested layouts
  • β€’ Data persistence - Layouts save and restore perfectly
  • β€’ Element library - Pre-built components ready to use

Getting Started

Step 1: Enable Smart Code Mode

When editing a Custom Code field:

  1. Navigate to your form field settings
  2. Scroll to the Editor Mode section
  3. Select "Smart Code" radio button
  4. The Smart Code canvas will appear automatically

Step 2: Add Your First Element

Use the element toolbar on the right side of the canvas:

  1. Choose from Content elements (Heading, Text, Image, Link)
  2. Or select Interactive elements (Button, Input, Link)
  3. Click any element button to add it to the canvas
  4. Elements appear instantly with entrance animations
<!-- Example generated output --> <div class="wfb-smart-code-container"> <h2>Your Heading Here</h2> <p>Your text content goes here.</p> <button type="button">Click Me</button> </div>

Element Types

πŸ“„ Content Elements

πŸ“° Heading

Creates H1-H6 headings with customizable styles and content.

Settings: Tag level (H1-H6), text content, alignment
Styles: Font size, color, weight, text transform

πŸ“„ Text

Paragraph text blocks with rich text editing capabilities.

Settings: Text content, alignment
Styles: Font family, size, color, line height, spacing

πŸ–ΌοΈ Image

Responsive images with alt text, links, and style controls.

Settings: Image URL, alt text, link, target
Styles: Width, height, border radius, object fit

πŸ”— Link

Clickable links with target options and custom styling.

Settings: Link text, URL, target (_blank, _self)
Styles: Color, hover color, text decoration, font weight

⚑ Interactive Elements

πŸ”˜ Button

Clickable buttons with custom actions and styling.

Settings: Button text, type, onclick action
Styles: Background, color, padding, border radius, hover effects

πŸ“ Input

Form input fields (text, email, number, etc.).

Settings: Input type, placeholder, name, required
Styles: Width, padding, border, focus effects

πŸ“¦ Layout Elements

πŸ“¦ Container

Wrapper div for grouping elements with styling options

➑️ Row

Horizontal flexbox row for side-by-side layouts

⬇️ Column

Vertical flexbox column for stacked content

Container System

The Container System allows you to build complex nested layouts by adding elements inside containers, rows, and columns.

How to Use Containers

  1. Add a Container, Row, or Column element to the canvas
  2. Click inside the empty container area
  3. A popup menu will appear showing available elements
  4. Select an element type from the menu
  5. The element will be added inside the container
  6. Repeat to build complex nested layouts

Example: Two-Column Layout

Left Column

Heading
Text
Button

Right Column

Image
Text

Element Controls

Each element on the canvas has hover controls for customization:

βš™οΈ

Settings

Configure element properties and content

🎨

Styles

Customize colors, sizes, spacing, and more

πŸ—‘οΈ

Delete

Remove element from canvas

Tips & Best Practices

βœ… Do's

  • βœ“ Use containers for organized layouts
  • βœ“ Set proper heading hierarchy (H1, H2, H3)
  • βœ“ Test your layout on mobile devices
  • βœ“ Use semantic HTML elements appropriately
  • βœ“ Add alt text to all images
  • βœ“ Save your work frequently

❌ Don'ts

  • βœ— Don't nest containers too deeply (3-4 max)
  • βœ— Don't use inline styles when not necessary
  • βœ— Don't forget to test form functionality
  • βœ— Don't skip accessibility considerations
  • βœ— Don't use too many different font sizes
  • βœ— Don't create layouts that break on mobile

Troubleshooting

Elements not appearing?

  • Ensure Smart Code mode is selected (not HTML mode)
  • Check if JavaScript is enabled in your browser
  • Clear browser cache and reload the page
  • Check browser console for error messages

Can't add elements to containers?

  • Click inside the container area (not on borders)
  • Look for the element selection popup menu
  • Ensure container has enough space to display
  • Try refreshing the page if popup doesn't appear

Changes not saving?

  • Click the main form Save or Update button
  • Verify you have proper permissions to edit forms
  • Check for WordPress admin AJAX errors in console
  • Try saving in HTML mode and switching back to Smart Code

Need Advanced Layouts?

Our team can help you design and implement complex Smart Code layouts for your specific use case.Contact support for assistance.

Master Smart Code Builder

Watch our comprehensive video tutorial on creating custom layouts

Watch Video Tutorial