Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-populate name/email fields on Add new subscription form; See: websharks/comment-mail#204 #52

Closed
wants to merge 3 commits into from

Conversation

kristineds
Copy link
Contributor

Pre-populate name/email fields on Add new subscription form;

screen shot 2016-01-29 at 8 10 25 am

See: wpsharks/comment-mail#204

@kristineds
Copy link
Contributor Author

@jaswsinc @raamdev I'm submitting the PR for this with the code you provided but it's not pre-populating the fields for the last name and email fields?

@jaswrks
Copy link

jaswrks commented Jan 29, 2016

@kristineds Were you logged into the site whenever you tested this?

@kristineds
Copy link
Contributor Author

Were you logged into the site whenever you tested this?

@jaswsinc When I was logged-in as a user, only the "First name" is pre-populated.

This works perfectly, i.e. email and first name fields are pre-populated, when a cookie exists from previously leaving a comment.

@jaswrks
Copy link

jaswrks commented Jan 31, 2016

When I was logged-in as a user, only the "First name" is pre-populated

And I assume that your account in WordPress had both the First and Last name filled? In other words, do you feel there is a bug in that specific scenario? Or was the Last name missing from the form because it was missing in your account profile in WordPress?

@jaswrks
Copy link

jaswrks commented Jan 31, 2016

This works perfectly, i.e. email and first name fields are pre-populated, when a cookie exists from previously leaving a comment.

Cool!

@raamdev
Copy link
Contributor

raamdev commented Feb 1, 2016

@kristineds Can we get an update here?

@kristineds
Copy link
Contributor Author

@jaswsinc @raamdev I tested this again. See below for my observations. What are the possible causes for this?

  • Signed up and registered for a new user account: http://kristine.websharks-inc.net/wp-login.php (Site has no other plugins enabled except Comment Mail Pro)
  • Logged in with credentials and edited profile, added first name and last name

screen shot 2016-02-02 at 10 29 02 pm

  • Went back to a post and selected "you can subscribe without commenting"

screen shot 2016-02-02 at 10 18 39 pm

  • Got redirected to the Add New Subscription Form. First name is pre-populated but not that Email and Last name fields.

screen shot 2016-02-02 at 10 30 12 pm

@jaswrks
Copy link

jaswrks commented Feb 2, 2016

@kristineds My last commit/tweak should correct this behavior. Working good on my side. If you can test it and confirm I'd appreciate it. Also, if it works for you, can you apply the same to the lite PR?

@kristineds
Copy link
Contributor Author

@jaswsinc Got the last name to show up but not the email. That should be filled since email is a required field, isn't it?

screen shot 2016-02-03 at 11 55 36 am

I'll be submitting the one for the Lite PR, so it's easier to track the changes for both

@jaswrks
Copy link

jaswrks commented Feb 3, 2016

@kristineds Try changing $current->email to $current->user_email.

@kristineds
Copy link
Contributor Author

@jaswsinc That works. Thanks! 👍 This is ready for review. @raamdev

@raamdev raamdev closed this Feb 6, 2016
@raamdev raamdev deleted the feature/204 branch February 6, 2016 01:34
@raamdev
Copy link
Contributor

raamdev commented Feb 6, 2016

@kristineds Reviewed, tested, and merged. Nice work! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants