Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m just a user just like you, but maybe I can help. What do you mean by placeholder in registration?

    Thread Starter klein09

    (@klein09)

    The texbox in the registration form 🙂 I’d like to add placeholders, I was able to do it but it is not working in some fields.

    add_filter(‘wcfm_membership_registration_fields’,’wcfm_membership_registration_fields_callback’);
    function wcfm_membership_registration_fields_callback($registration_fields) {

    $registration_fields[‘first_name’][‘placeholder’] = “First Name”;
    $registration_fields[‘user_email’][‘placeholder’] = “Email Address”;
    $registration_fields[‘last_name’][‘placeholder’] = “Last Name”;
    $registration_fields[‘passoword’][‘placeholder’] = “Password”;
    $registration_fields[‘store_name’][‘placeholder’] = “Business Name”;
    return $registration_fields;
    }

    It is not working in email, city, state… etc 🙂 Thank you.

    I had to do something similar some days ago (I needed to test a custom field through JQuery validation rules) and noticed that it was possible to do a dirty hack. Basically, you insert a script in the vendor registration template through any of the actions hooks scattered in the file “…/plugins/wc-multivendor-membership/templates/vendor-registration.php”.

    I guess the problem comes from the fact that those inputs aren’t that ordinary, and may be populated AFTER the moment that the php executes, overriding any placeholder you set with the filter. By using javascript to change the placeholder, you are making the change on the client side, so it may (or not) set the placeholder after the mentioned overriding. Honestly, it would be a shot in the dark, I haven’t tried it, but it may work in the same way my JQuery hack worked for me.

    Thread Starter klein09

    (@klein09)

    Thanks for the help 🙂 I’ll try that.

    Plugin Author WC Lovers

    (@wclovers)

    Thanks @klein09

    Your code is perfect for the purpose.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Vendor registration fields Placeholder’ is closed to new replies.