Need assistance with modifying a form on my site

On one of my client's sites there's a form added through a plugin. I wanted to modify it to remove the field labels above the fields and instead use placeholders, but the plugin doesn't have any options for that. Can you assist with some jQuery code that would workaround this?

  • Dimitris
    • Support Star

    Hello there Mistey

    I went ahead and added the following jQuery code in Divi -> Theme Options -> Integration -> Code Integration -> Add code to the < body >:

    <script>
      (function ($) {
        $(document).ready(function () {
          $('.es_subscription_form .es-field-wrap').css('margin-top', '-4px');
          $('.es_subscription_form .es-field-wrap label').css('font-size', '0');
          $('.es_subscription_form .es-field-wrap input[type="text"]').attr('placeholder', 'Name');
          $('.es_subscription_form .es-field-wrap input.es_txt_email').attr('placeholder', 'E-mail address');
        });
      })(jQuery);
    </script>

    Thank you,
    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.