Adding labels to members on signup isn't working

Here are some screenshots to help illustrate. After a new member is created, this is what I see:

Note the empty label field. If I click on the field, I see a list of available labels, but none of those labels are applied to the member:

What I expect to see is the label correctly and automatically applied to the member, like so:

1 Like

@mrwilson We have been able to reproduce the bug and will be pushing a fix soon for this.

3 Likes

I have the exact same bug (label created in the dropdown but not applied to the member created). In weeks, haven’t been able to have this feature to work once. Good to hear a fix is coming soon!

Thank you, @rishabhgarg. I look forward to that fix! Let me know if I can help in any way.

I also notice that if the value of the hidden label is some attribute (like primary_tag) and the value is null (no tags assigned), then when the user clicks to confirm subscription, the Portal says error…I would think this is an unexpected behaviour.

Hi @rishabhgarg, do you happen to know in which version this bugfix might appear? My client has asked me for an update. I haven’t been in the Ghost ecosystem for very long, so I’m still learning about things like your product release schedule.

Update: The fix for this will be out in next release of Ghost - v4.5.0 - which will be released this week.

3 Likes

Thank you, Rishabh. One great addition would be the ability to email subsets of users based on tags associated with them. Just a thought.

1 Like

The fix is live in Ghost v4.5.0, please upgrade

@Davis_Hunt The latest release also allows you to filter newsletter recipients based on labels. :slight_smile:

Hi guys,

maybe some of you could advise? For me, the labels also don’t work. I have it in the dropdown of the labels in the members but it’s not giving it the proper label to the member, tried both codes.

Please see my code below, I’m using the form from my theme. Not sure what I’m doing wrong.

       <form data-members-form="subscribe" class="c-subscribe-form">
  <div class="form-group">
    <label for="subscribe-email-footer" class="u-hidden-visually">Your email address</label>
    <input data-members-label type="hidden" value="DPC'>
    <input type="email" name="email" class="c-subscribe-form__input" id="subscribe-email-footer" placeholder="Your email address" data-members-email="">
    <button type="submit" value="Subscribe" class="c-btn c-btn--action c-subscribe-form__btn">Subscribe</button>
  </div>

  <div class="u-alert u-alert--success u-mt-16">Please check your inbox and click the link to confirm your subscription.</div>
  <div class="u-alert u-alert--invalid u-mt-16">Please enter a valid email address!</div>
  <div class="u-alert u-alert--error u-mt-16">An error occurred, please try again later.</div>
</form>

Thank you in advance! :slight_smile:

Hey @PixelzFairy , which version of Ghost you are running ? The fix for this landed with release of 4.5, can you try again after updating to latest version of Ghost and see if you can still reproduce this behaviour.

Hey @rishabhgarg , I’m on Ghost Pro, so the latest 4.6.3

@PixelzFairy I am unable to reproduce the issue with the code you pasted, its able to create and assign label correctly. If you still run into any problems I’d suggest you reach out to Ghost Pro support directly :slight_smile:

Can you allow the user to select multiple labels using checkboxes?

I can confirm this is still broken.

As of now the HTTP request contains all of the labels, not just the checked ones.

This is because Portal doesn’t follow regular form behavior, and takes the value attribute of the checkboxes with no regard to its checked status.

I will open a GitHub issue for this soon.

Did you open a GitHub issue for this?

I am experiencing the same problem, all labels are selected and not just the selected ones.

Is this something that will be fixed? No one seems to be responding about this issue.

I published a guide recently, about member labels, and how to apply them with multiple checkboxes as labels. The idea is to toggle the data-members-label attribute when the checkbox is clicked.

Here is the post:

1 Like

Thanks for this.

It works but in reverse. When you remove the checked attribute and then check an empty label that label is left out and all labels that are not checked are assigned to the user.

That depends on your setup, if you remove the checked attribute you should also remove the data-members-label, because the click will toggle it. But it’s a good point, I will mention it in the post.