New
Are you ready for Agentforce? Take our assessment to find out today!
    • Expertise
          • Product

          • Sales Cloud
          • Service Cloud
          • Account Engagement
          • Marketing Cloud Next
          • Revenue Cloud
          • Agentforce
          • Data 360 (Data Cloud)
          • CRM Analytics
          • Tableau Next
          • Experience Cloud
          • Industry

          • Manufacturing
          • Healthcare
          • High Tech
          • Financial Services
          • Media & Entertainment
    • Solutions
      • Consulting
      • Implementation
      • Managed Services
      • Health Check
      • Training
    • About Nebula
      • We Are Nebula
      • Meet the Team
      • Join Our Team
    • Resources
    • Login
    • Get in Touch
Share:

Upgrade Your Form UX with Toggle Switches

by Migena Marina
6th March 2026 • 2 min read
Migena Marina
Share:

If you would like to modernise your forms, provide a slicker user experience, and match contemporary web design, follow our mini guide that helps you convert standard Account Engagement form radio buttons into modern, user-friendly toggle switches.
Why make the change
Better UX: Toggles are often easier and more satisfying to use, especially on mobile devices.
Modern Look: The look and feel are consistent with modern web design and many customers use them in their branding.
Clarity: For simple “Yes/No” or “On/Off” options, a toggle is visually clearer than a radio button.
How it works
This solution requires a bit of custom CSS and JavaScript added to your layout templates. Here are the snippets you’ll add to your Account Engagement Layout Template. CSS The code below hides the original Radio Button and creates a new class to style and align the toggle on the right of the field label and description:

CSS
/* Field Container */
.form-field.toggle-right {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px !important;
padding-bottom: 10px;
width: 100%;
}
/* Vertically Align the Label */
.form-field.toggle-right > .field-label {
padding-top: 0 !important;
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}
/* Style The Description Text */
#pardot-form .toggle-right span.description {
position: absolute;
bottom: 0;
left: 0;
display: block;
margin-top: 0;
padding-left: 10px;
font-size: 1.4rem;
}
/* Hide Original Radio Buttons */
.toggle-right input[type="radio"],
.toggle-right label.inline {
display: none !important;
}
/* Style the JS switch */
.rm-switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
background-color: #ccc;
border-radius: 34px;
cursor: pointer;
transition: background-color 0.3s;
}
.rm-slider {
position: absolute;
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
border-radius: 50%;
transition: transform 0.3s;
}
/* Style the ON toggle */
.rm-switch.is-checked {
background-color: #bdda0b;
}
.rm-switch.is-checked .rm-slider {
transform: translateX(26px);
}



JavaScript The solution below creates a switch element to manage the state of the radio button. This script will run when the above class is used in the CSS (.toggle-right):

JavaScript
// Ragio Buttons to Toggle JS
document.addEventListener("DOMContentLoaded", function() {
// Find all radio button fields you've marked for conversion
var toggleFields = document.querySelectorAll('.toggle-right');
toggleFields.forEach(function(field) {
var label = field.querySelector('.field-label');
var valueContainer = field.querySelector('span.value');
var radios = field.querySelectorAll('input[type="radio"]');
// Make sure we have two radio buttons to work with
if (radios.length === 2) {
// Create the visual toggle switch element
var switchElement = document.createElement('label');
switchElement.className = 'rm-switch';
var sliderElement = document.createElement('span');
sliderElement.className = 'rm-slider';
switchElement.appendChild(sliderElement);
// Add the new switch to the form
valueContainer.appendChild(switchElement);
// Function to update the switch's appearance
function updateSwitchState() {
if (radios[0].checked) {
switchElement.classList.add('is-checked');
} else {
switchElement.classList.remove('is-checked');
}
}
// Add a click listener to our new visual switch
switchElement.addEventListener('click', function() {
// Toggle between the two radio buttons
if (radios[0].checked) {
radios[1].checked = true;
} else {
radios[0].checked = true;
}
updateSwitchState();
});
// Set the initial state of the switch when the page loads
updateSwitchState();
}
});
});

Stay updated with our latest news & insights

Find all our recent updates, tips, strategies and hot takes from the Salesforce ecosystem. Written by experts, read by experts.



Implementation Steps
Update the Layout template by adding the CSS inside the <style> tag.
Scroll down at the bottom of your layout template and add the JavaScript before the <body> closing tag.
Navigate to your Form and create or update your radio button field/s.
Go to the field’s ‘Advanced tab’ and add toggle-right in the CSS Class field. Form CSS classes
Navigate to the field’s Values tab and add your two options (e.g., True and False). Make sure you add a label for each value, and you leave it empty. Form radio button values
Save and test
Conclusion
This might seem like a small change, but in marketing, every single interaction counts. By reducing friction and improving your UX, you’re not just modernising your look, you’re making it that little bit easier for a prospect to say “yes”. These small, polished details build trust and can make a real difference to your conversion rates. If you would like to take a strategic look at your wider marketing automation and optimise your customer journeys, get in touch with our team of experts.

Find related resources by topic

Marketing

You may also be interested in

Fix the Foundations: Success in the Agentic Era Marketing Edition
Blog
Marketing

Fix the Foundations: Success in the Agentic Era Marketing Edition

We hear the announcements and on repeat about how the Agentic Era is here to transform the B2B and B2C landscapes. These changes will enable…

4 min read Read Blog
Laying the Right Foundations
Success Story
Account Engagement Sales Cloud

Laying the Right Foundations

Complex processes and cautious stakeholders hindered Redwheel's CRM adoption. Nebula's Account Engagement and Salesforce audits mapped the journey, restoring confidence and delivering a strategic roadmap for a powerful, sales-enabled CRM.

May 27, 2025 Read Customer Story
How to Avoid Completion Action Limits in Account Engagement (Pardot) Using Engagement Studio
Blog
Marketing

How to Avoid Completion Action Limits in Account Engagement (Pardot) Using Engagement Studio

Conditional completion actions and completion actions, while powerful, can quickly consume the available limits on your forms and form handlers. If you’ve been creating and managing…

3 min read Read Blog
Aligning Marketing and Sales for a Global Insurer
Success Story
Account Engagement Sales Cloud

Aligning Marketing and Sales for a Global Insurer

Poor email deliverability and disconnected data misaligned Lockton's sales and marketing. Nebula's Salesforce and Account Engagement integration established governance, delivering a 97% delivery rate, 25 empowered users, and transparent insights.

Apr 30, 2025 Read Customer Story
Account Engagement Landing Page Conversion Mastery
Blog
Marketing

Account Engagement Landing Page Conversion Mastery

Building pages that truly perform in Account Engagement isn't just about clicking buttons; it's about strategy, technical finesse, and empathy for the user. Here’s my…

5 min read Read Blog
Creating a seamless membership experience
Success Story
Account Engagement Sales Cloud Service Cloud

Creating a seamless membership experience

Data silos and disparate systems hindered the World Travel and Tourism Council's membership experience. Nebula's Cvent integration, record cleansing and automated invoicing delivered rapid efficiency, unified data, and a 10-year partnership.

Jan 30, 2025 Read Customer Story
5 Hidden Snags in Account Engagement
Blog
Marketing

5 Hidden Snags in Account Engagement

Managing Salesforce Account Engagement (Pardot) requires more than just marketing knowledge. Even in a well-established org, you can sometimes hit some invisible walls. Below are…

4 min read Read Blog
Targeted Sales Enablement for Users
Success Story
Account Engagement CRM Analytics Sales Cloud

Targeted Sales Enablement for Users

Stale opportunities and missing data delayed Clarion Events' pipeline. Nebula's Einstein Next Best Action delivered intuitive guidance, surging stage moves by 132%, doubling activities, capturing crucial VAT details, and boosting CRM adoption.

Jan 3, 2025 Read Customer Story
5 new Marketing Cloud Next features we’re excited to try
Blog
Marketing

5 new Marketing Cloud Next features we’re excited to try

The Spring ’26 release is here, and it’s a significant milestone for Marketing Cloud Next (also known as Agentforce Marketing). This release focuses on making…

4 min read Read Blog
Mastering Navigation Design for a Better User Experience
Blog
Marketing

Mastering Navigation Design for a Better User Experience

Effective navigation is essential in digital design to ensure a seamless and intuitive user experience. Users should effortlessly navigate through interfaces, understanding their progress and…

2 min read Read Blog
Nebula

Our journey started in 2012 with a clear vision and core values. Nebula is dedicated to empowering our customers through fostering relationships founded on collaboration, flexibility, and trust.

  • We Are Nebula
  • Resources
  • Join Our Team
  • Terms and Conditions
  • Privacy Policy
The Space Aldgate,
Irongate House,
22-30 Dukes Place,
London EC3A 7LP
+44 207 112 8026
Get in Touch
Copyright © 2026 Nebula Consulting. All Rights Reserved.