Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Missing Bootstrap 5 Guide

You're reading from   The Missing Bootstrap 5 Guide Customize and extend Bootstrap 5 with Sass and JavaScript to create unique website designs

Arrow left icon
Product type Paperback
Published in Aug 2022
Publisher Packt
ISBN-13 9781801076432
Length 384 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jeppe Schaumburg Jensen Jeppe Schaumburg Jensen
Author Profile Icon Jeppe Schaumburg Jensen
Jeppe Schaumburg Jensen
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part One – Customizing Bootstrap 5 with Sass
2. Chapter 1: Why and How to Customize Bootstrap FREE CHAPTER 3. Chapter 2: Using and Compiling Sass 4. Chapter 3: Downloading and Exploring the Bootstrap 5 Sass Files 5. Chapter 4: Bootstrap 5 Global Options and Colors 6. Chapter 5: Customizing Various Bootstrap 5 Elements 7. Chapter 6: Understanding and Using the Bootstrap 5 Utility API 8. Part Two – Creating a Unique-Looking Website Based on Bootstrap 5 and Customization
9. Chapter 7: Creating the Website Using Default Bootstrap 5 Elements 10. Chapter 8: Customizing the Website Using Bootstrap 5 Variables, Utility API, and Sass 11. Chapter 9: Improving the Website with Interactive Features Using JavaScript 12. Part Three – Advanced Topics Related to Bootstrap 5
13. Chapter 10: Using Bootstrap 5 with Advanced Sass and CSS Features 14. Chapter 11: Using Bootstrap 5 with Advanced JavaScript Features 15. Chapter 12: Optimizing Bootstrap 5 CSS and JavaScript Code 16. Other Books You May Enjoy

Adding form success messages

In the previous example, when the loading had finished after form submission, the text of the submit button was replaced. Now we want to also add form success messages below our forms when loading has finished.

We will use the alert component with the $success color for our success message, and we will place it inside the collapse component, so it can be displayed with a vertical transition. To achieve this, first, we will add the following markup to our forms after the submit and reset buttons and just before the closing </form> tag, again using the newsletter form as an example:

part-2/chapter-9/website/index.html

<div class="collapse mt-3" id="newsletterConfirmation">
  <div class="alert alert-success">
    <h3 class="alert-heading h4">Subscribed!</h3>
    <p class="mb-0">Lorem ipsum dolor sit amet, consectetur...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime