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


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

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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  khumbulani 1 year, 7 months ago ago

Topic Tags

Tagged: 

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!