Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.



Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:


Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO


                <div class="container">

  <div class="row">

    <div class="col-xs-12 col-sm-10 col-md-6">

        <h3>Гранулярные подсказки ФИО</h3>
        <p>Фамилия, имя и отчество подсказываются по отдельности</p>


      <form role="form" id="feedback-form">

        <!-- ФИО -->
        <div class="form-group">
          <label for="surname">ФИО</label><span class="required">&nbsp;∗</span>
          <input type="text" class="form-control" id="fullname-surname" placeholder="Фамилия" autofocus required>


        <div class="form-group">
          <input type="text" class="form-control" id="fullname-name" placeholder="Имя" required>

        <div class="form-group">
          <input type="text" class="form-control" id="fullname-patronymic" placeholder="Отчество">

        <div class="form-group">
          <button type="submit" class="btn btn-primary btn-lg" disabled>Отправить обращение</button>






                /* Маркер для обязательных полей */
.required {
    color: #9a4f4f;
    font-size: 16px;
    vertical-align: super;


                var GranularFullnameSuggestions = {
     * Инициализирует подсказки по ФИО на указанном элементе
     * @param $surname jQuery-элемент для текстового поля с фамилией
     * @param $name jQuery-элемент для текстового поля с именем
     * @param $patronymic jQuery-элемент для текстового поля с отчеством
     * @constructor
    init: function($surname, $name, $patronymic) {
        var self = this;
        self.$surname = $surname;
        self.$name = $name;
        self.$patronymic = $patronymic;
        var fioParts = ["SURNAME", "NAME", "PATRONYMIC"];
        // инициализируем подсказки на всех трех текстовых полях
        // (фамилия, имя, отчество)
        $.each([$surname, $name, $patronymic], function(index, $el) {
                serviceUrl: "",
                token: "5ef98f5781a106962077fb18109095f9f11ebac1",
                type: "NAME",
                useDadata: false,
                triggerSelectOnSpace: false,
                hint: "",
                count: 6,
                noCache: true,
                params: {
                    // каждому полю --- соответствующая подсказка
                    parts: [fioParts[index]]
                onSearchStart: function(params) {
                    // если пол известен на основании других полей,
                    // используем его
                    var $el = $(this);
                    params.gender = self.isGenderKnown($el) ? self.gender : "UNKNOWN";
                onSelect: function(suggestion) {
                    // определяем пол по выбранной подсказке
                    self.gender =;

     * Проверяет, известен ли пол на данный момент
     * @param $el элемент, в котором находится фокус курсора
     * @returns {boolean}
    isGenderKnown: function($el) {
        var self = this;
        var surname = self.$surname.val(),
            name = self.$name.val(),
            patronymic = self.$patronymic.val();
        if (($el.attr('id') == self.$surname.attr('id') && !name && !patronymic) ||
            ($el.attr('id') == self.$name.attr('id') && !surname && !patronymic) ||
            ($el.attr('id') == self.$patronymic.attr('id') && !surname && !name)) {
            return false;
        } else {
            return true;

    $("#fullname-surname"), $("#fullname-name"), $("#fullname-patronymic")
💕 I'm the CSS to your HTML.