Support » Plugin: WooCommerce » Login/Register add placeholder instead of text label

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support EastOfWest a11n

    (@eastofwest)

    Hi there,

    Your theme might already override this with its own custom templates, but by default, the file you’ll want to customize for that can be found in the WooCommerce plugin folder at /woocommerce/templates/myaccounts/form-login.php.

    In that file, you’ll want to remove lines 39 and 43 to get rid of the labels, and then add placeholder="your placeholder text" on lines 40 and 44 respectively.

    It’s advisable to do that in a child theme so that when your theme updates, your changes are not undone. Read more about how custom template files here.

    Thread Starter brandmadeconsult

    (@brandmadeconsult)

    Hi, I am kind of new to WP. These are my lines of codes. When I am trying to change it, it’s kind of breaking my website. Can you tell me exactly what need to be edited. Here’s my login code:

    <?php do_action( 'woocommerce_login_form_start' ); ?>
    
    			<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
    				<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
    				<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username"  autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
    			</p>
    			<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
    				<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
    				<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" />
    			</p>
    
    			<?php do_action( 'woocommerce_login_form' ); ?>
    Thread Starter brandmadeconsult

    (@brandmadeconsult)

    Any update?

    Thread Starter brandmadeconsult

    (@brandmadeconsult)

    Hi, Waiting for a resolution!

    Plugin Support Ena P (a11n)

    (@drwpcom)

    Hi @brandmadeconsult. Sorry that we missed your last post. I see that your login form has the option to log in with social media so I’m wondering what you’ve used to customize it.

    In any case, there is a discussion here that can help you.

    I also recommend the following places for more development-oriented questions:

    `

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.