LogoLogo
Mluvii webLoginAPIDEMO
English
English
  • ABOUT
  • UPDATES MLUVII
    • 2.125
    • 2.124
    • 2.123
    • Archive
      • 2.122
      • 2.121
      • 2.120
      • 2.119
      • 2.118
      • 2.117
      • 2.116
      • 2.115
      • 2.114
      • 2.113
      • 2.112
      • 2.111
      • 2.110
      • 2.109
      • 2.108
      • 2.107
      • 2.106
      • 2.105
      • 2.104
      • 2.103
      • 2.102
      • 2.101
      • 2.100
      • 2.99
      • 2.98
      • 2.97
      • 2.96
      • 2.95
      • 2.94
      • 2.93
      • 2.92
      • 2.91
      • 2.90
      • 2.89
      • 2.88
      • 2.87
      • 2.86
      • 2.85
      • 2.84
      • 2.83
      • 2.82
      • 2.81
      • 2.80
      • 2.79
      • 2.78
      • 2.77
      • 2.76
      • 2.75
      • 2.72
      • 2.71
      • 2.70
      • 2.68
      • 2.67
      • 2.66
      • 2.65
      • 2.64
      • 2.63
      • 2.61
      • 2.60
      • 2.59
      • 2.58
      • 2.57
      • 2.56
      • 2.55
      • 2.54
      • 2.53
      • 2.52
      • 2.51
      • 2.50
      • 2.49
      • 2.48
      • 2.47
      • 2.46
      • 2.45
      • 2.44
      • 2.43
      • 2.42
      • 2.41
      • 2.40
      • 2.39
      • 2.38
      • 2.37
      • 2.36
      • 2.35
      • 2.34
      • 2.33
      • 2.32
      • 2.31
      • 2.30
      • 2.29
      • 2.28
      • 2.27
      • 2.26
      • 2.25
      • 2.24
      • 2.23
      • 2.22
      • 2.21
      • 2.20
      • 2.19
  • LICENSE TYPES
  • FOR OPERATORS
    • Login
    • Workspace
    • Accept client
    • Client interaction
      • WebChat
      • Client tab
      • Videocall
      • Share
      • Templates
      • Browser
      • End Session
      • Hero Cards
      • E-mail
      • Facebook Messenger
      • Apple Messages for Business
      • WhatsApp
      • VKontakte
      • IP Telephony
      • Telephone campaigns
    • Profile
  • FOR ADMINISTRATORS
    • Company management
      • Licences
      • Users
      • External contacts
      • Performance
      • Operator metrics
      • Dashboards
    • Tenant management
      • Contact directory
      • Sessions
      • All e-mails
      • Operators
      • Campaigns
        • Telephone campaign
          • Campaign Contacts
          • Missed Calls
        • WhatsApp campaign
          • Campaign Contacts
      • Settings
        • Groups
          • By operator utilization
          • To whole group (deprecated)
        • External groups
        • Routing
        • Rules
        • WebChat
        • Forms
          • Forms
          • Hero Cards
        • Chatbots
          • API chatbot
          • Microsoft Bot Framework chatbot
        • WhatsApp
          • Registration process
          • Adding a new phone number
          • Eligible Phone Numbers
          • Pricing
          • Template Messages
            • Conversations
          • Whatsapp ecosystem comparison
          • Data security and GDPR
          • Add WhatsApp widget to website
        • Apple Messages for Business
          • Add Apple widget to website
          • Data security and GDPR
        • Facebook Messenger
          • Add Facebook Messenger widget to website
        • VKontakte
        • E-mails
        • IP Telephony
        • Files
        • Templates
        • Routing visualization
        • Application
          • General
        • Blacklist
        • GDPR
  • FOR IT SPECIALISTS
    • Supported widget methods
    • Add WebChat button to website
    • Add Apple widget to website
    • Customization
      • Customized forms
        • Entry forms
          • Basic entry forms
          • Tenant selection forms
        • Feedback form
          • Basic feedback forms
          • Feedback forms with emojis
          • Feedback form with stars
        • Offline forms
      • Parameters
      • Customized Pop-up
      • Customized functions
      • Customized microsite
    • Public API
      • Authentication
      • Swagger
      • Public API FAQ
      • Webhooks
      • Webhooks FAQ
    • WIDGET API
    • Co-browsing
    • Mobile SDK
      • Android
      • iOS
    • Chatbot connection
      • Microsoft Bot Framework
      • API chatbot
        • API chatbot connection
        • Chatbot API-specific activities and events
      • Supported activities and events
      • Tips and Tutorials
    • Realtime statistics
      • Connection to influx database
      • Existing metrics
      • Examples
      • Grafana
    • Connect Office 365 mailbox
    • Connect Gmail mailbox
    • Software architecture
      • Data encryption
    • Telephony
    • Facebook
    • Files
    • WebChat
    • Cookies
    • Desktop Application
  • SECURITY
  • SYSTEM REQUIREMENTS
    • Minimum HW requirements for operators
    • Minimum SW requirements for operators
    • Supported browsers
    • Audio/Video
    • Supported languages
    • Desktop application
    • Minimum server requirements
    • Mobile application
  • HELPDESK
    • Bug Reporting
    • Manuals
      • Delete browser cookies
      • Delete Local and Session Storage
      • Clear cache memory
      • Add timestamps to logs in the browser console
      • Disconnecting inactive tabs in Google Chrome
    • FAQ
    • Keyboard shortcuts
    • Glossary
Powered by GitBook
On this page
  • How the form looks
  • Upload a form to any hosting
  • Inserting a link to the mluvii application administration

Was this helpful?

  1. FOR IT SPECIALISTS
  2. Customization
  3. Customized forms
  4. Feedback form

Feedback forms with emojis

PreviousBasic feedback formsNextFeedback form with stars

Last updated 2 years ago

Was this helpful?

You must complete several steps to create this output form, similar to the creation of the basic of the feedback form:

Create an HTML document, add CSS styles, and use “JavaScript methods” to ensure functionality of ratings and send data from the form. Then you must upload the form to any hosting that supports the HTTPS protocol and add a link to the form into the administration interface of the Mluvii application.

We recommend creating an output form using the codepen.io web application for simplicity and clarity. Start by clicking , where there is already preset the ui framework preset with a small library, due to the difficulties with iframe scrolling on iOS. At the end of this manual, you can find the complete code for the output form.

How the form looks

Direct link to insert the form into the mluvii administration application:

HTML

The HTML code contains elements of the emojis and other input elements.

The first two div tags (and css and javascript linked to them) serve to display your own scrollbars for better user experience on mobile devices.

CSS Styling

JavaScript code

The Javascript form code provides emoji animations and sends data from the form to the Mluvii application. For full API form capabilities, see the general instructions on creating an feedback form.

Upload a form to any hosting

If you created the form using codepen.io, first click the Save button, then export to .zip format (see instructions below).

We have a form ready for you. Now you need to upload the form to the Internet so we can refer to it from the administration interface. In our case, we will use the GitHub site. You can find more information .

If you use a tool other than codepen.io, the form code will look like this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css" rel="stylesheet" />
  <link rel="stylesheet" href="https://unpkg.com/simplebar@3.1.0/dist/simplebar.css" />
  <style>
    .rating-stars {
      display: flex;
      justify-content: center;
    }

    svg {
      padding: 4px;
    }

    .star-path, svg {
      transition: all 0.15s;
    }

    svg:hover {
      transform: scale(1.15);
    }

    svg:hover > .star-path {
      fill: #ffbf00 !important;
    }

    .inner-container {
      background-color: #fff;
    }

    input[type="email"], input[type="submit"], textarea, .inner-container {
      border-radius: 0.5rem !important;
    }

    input[type="email"], textarea {
      border: 2px solid rgb(214, 218, 222) !important;
      box-shadow: none !important;
    }

    input[type="email"]:focus, textarea:focus {
      border: 2px solid #6eb6bc !important;
    }

    input[type="submit"] {
      background-color: #6eb6bc;
      box-sizing: border-box;
      border: none;
      box-shadow: 0px 0px 6px 0px rgba(0,0,0,0.4) !important;
      transition: all 0.15s;
    }

    input[type="submit"]:hover, input[type="submit"]:focus {
      background-color: #6eb6bc !important;
      box-shadow: 0px 0px 6px 0px rgba(0,0,0,0.4) !important;
    }

    input[type="submit"]:active {
      transform: translateY(2px);
      box-shadow: none !important;
    }

    #email_checkbox {
      line-height: 1.6;
    }

    #email_checkbox:before, #email_checkbox:after {
      height: 1.2rem;
      width: 1.2rem;
      left: -26px;
      box-shadow: none !important;
    }

    .custom-checkbox {
      padding-left: 26px;
    }

    .custom-control-input:checked ~ .custom-control-label::before {
      background-color: #6eb6bc !important;
    }

    .custom-control-input:active ~ .custom-control-label::before {
      background-color: #9ecee2 !important;
    }

    .curp {
      cursor: pointer;
    }
    .scroll-container {
      max-height: 107vh;
      width: 1px !important;
      min-width: 100% !important;
      max-width: 100% !important;
    }
    .scroll {
      max-width: 100% !important;
    }
  </style>
</head>
<body>
  <div class="scroll-container">
    <div class="scroll" data-simplebar>
      <form id="my_form" class="m-3 d-flex flex-column justify-content-center">
          <p class="text-center mt-3 mb-3 font-weight-bold">Jak jste s námi byli spokojeni?</p>
          <div class="inner-container p-3">
            <div class="rating-stars mb-1">
              <label class="icon">
                <svg class="curp" width="38px" height="38px" viewBox="0 0 512 512" xml:space="preserve">
                  <polygon class="star-path" fill="#e5e5e5" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
                    259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 
                    29.274,197.007 188.165,173.919 "/>
                </svg>
                <input 
                  value="1"
                  type="radio" 
                  id="rating_1"
                  name="rating" 
                  class="d-none" 
                  onclick="onRatingClick(this)"
                />
              </label>
                  <label>
                <svg class="curp" width="38px" height="38px" viewBox="0 0 512 512" xml:space="preserve">
                  <polygon class="star-path" fill="#e5e5e5" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
                    259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 
                    29.274,197.007 188.165,173.919 "/>
                </svg>
                <input 
                  value="2"
                  type="radio" 
                  id="rating_2"
                  name="rating" 
                  class="d-none" 
                  onclick="onRatingClick(this)"
                />
              </label>
                  <label>
                <svg class="curp" width="38px" height="38px" viewBox="0 0 512 512" xml:space="preserve">
                  <polygon class="star-path" fill="#e5e5e5" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
                    259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 
                    29.274,197.007 188.165,173.919 "/>
                </svg>
                <input 
                  value="3"
                  type="radio" 
                  id="rating_3"
                  name="rating" 
                  class="d-none" 
                  onclick="onRatingClick(this)"
                />
              </label>
                  <label>
                <svg class="curp" width="38px" height="38px" viewBox="0 0 512 512" xml:space="preserve">
                  <polygon class="star-path" fill="#e5e5e5" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
                    259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 
                    29.274,197.007 188.165,173.919 "/>
                </svg>
                <input 
                  value="4"
                  type="radio" 
                  id="rating_4"
                  name="rating" 
                  class="d-none" 
                  onclick="onRatingClick(this)"
                />
              </label>
                  <label>
                <svg class="curp" width="38px" height="38px" viewBox="0 0 512 512" xml:space="preserve">
                  <polygon class="star-path" fill="#e5e5e5" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
                    259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 
                    29.274,197.007 188.165,173.919 "/>
                </svg>
                <input 
                  value="5"
                  type="radio" 
                  id="rating_5"
                  name="rating" 
                  class="d-none" 
                  onclick="onRatingClick(this)"
                />
              </label>
            </div>
        
            <textarea 
              rows="4"
              id="feedback" 
              name="feedback"
              class="form-control feedback"
              placeholder="Vaše zpětná vazba"
            ></textarea>
        
            <div class="custom-control custom-checkbox mt-3 mb-2">
              <input type="checkbox" class="custom-control-input" id="send_to_email">
              <label id="email_checkbox" class="custom-control-label curp" for="send_to_email">
                Chci poslat přepis konverzace
              </label>
            </div>
        
            <div class="form-group">
              <input 
                disabled
                required
                id="email" 
                type="email" 
                placeholder="E-mailová adresa" 
                class="form-control email" 
              />
            </div>
          </div>
          
          <div class="form-group d-flex py-3 m-0">
            <input 
              id="submit"
              type="submit" 
              value="Ok"
              class="btn btn-primary mt-3 mx-auto px-5" 
            />
          </div>
        </form>
    </div>
  </div>
  
  <script src="https://unpkg.com/simplebar@3.1.0/dist/simplebar.js"></script>
  <script>
    var selectedStarColor = '#FFD700';
    var emptyStarColor = '#e5e5e5';

    var form = document.getElementById('my_form');
    // var stars = [...document.querySelectorAll('svg')];
    var stars = Array.prototype.slice.call(document.querySelectorAll('svg'));
    var starRating = null;

    stars.forEach(function(star) {
      star.addEventListener('mouseenter', fillStars);
      star.addEventListener('mouseleave', resetStars);
    });

    function setFilledStars(endIndex) {
      stars.forEach(function(star, index) {
        if (index < endIndex) {
          star.childNodes[1].style.setProperty('fill', selectedStarColor);
        }
        else if (index >= endIndex) {
          star.childNodes[1].style.setProperty('fill', emptyStarColor);
        }
      })
    }

    function fillStars(e) {
      setFilledStars(stars.indexOf(e.target));
    }

    function resetStars(e) {
      return starRating ? setFilledStars(starRating) : setFilledStars(0);
    }

    function onRatingClick(target) {
      starRating = target.value;
    }

    var checkbox = document.getElementById('send_to_email');

    checkbox.onchange = function(e) {
      document.getElementById('email').disabled = !e.target.checked;
    };

    form.onsubmit = function (e) {
      e.preventDefault();

      var email = document.getElementById('email').value;
      var feedback = document.getElementById('feedback').value;
      var checked = document.getElementById('send_to_email').checked;
      
      window.parent.postMessage({
        type: "FEEDBACK_ACTION",
        email: checked ? email : null,
        stars: starRating,
        content: feedback
      }, "*");
    };
  </script>
</body>
</html>

Inserting a link to the mluvii application administration

You created an entry form using codepen.io. You have exported it to your computer. You have uploaded exported folders to the GitHub repository and then switched on the GitHub website. So you have a link to our form, which you put into the administration interface.

on this link
Bootstrap
simplebar
https://mluvii.github.io/customization/feedback_smiles.html
here