Support

Home Forums Event Espresso Premium How do I put placeholder text in the promotions code box

How do I put placeholder text in the promotions code box

Posted: August 23, 2018 at 11:08 am

Viewing 2 reply threads


khumbulani

August 23, 2018 at 11:08 am

How do I put placeholder text in the promotions code box?


Josh

  • Support Staff

August 25, 2018 at 11:44 am

Hi,

You can add a placeholder attribute by adding this bit of code into a functions plugin:

function add_promo_code_placeholder_attribute(){
    wp_add_inline_script(
        'espresso_promotions',
        'jQuery( document ).ready(function($) {
            $( document ).ajaxComplete(function() {
                jQuery("#ee-promotion-code-input").attr("placeholder", "Type here to input a discount code");
            });
        });'
    );
}
add_action( 'wp_enqueue_scripts', 'add_promo_code_placeholder_attribute', 20);

You can add the above to a functions plugin or into your WordPress child theme’s functions.php file.


khumbulani

August 28, 2018 at 4:01 am

thank you

Viewing 2 reply threads

The support post ‘How do I put placeholder text in the promotions code box’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso