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

Name Field in Sign Up form isn't digested into DB #35

Closed
oreniko26 opened this issue Feb 10, 2020 · 2 comments
Closed

Name Field in Sign Up form isn't digested into DB #35

oreniko26 opened this issue Feb 10, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@oreniko26
Copy link

Adding the input field for a username is supported in the form but when a user signs up and includes a name, it isn't registered into the DB.
<input data-members-name type="text" placeholder="Type your name..." required="true"/>

<form class="signup-form" data-members-form="signup">
            <h1 class="signup-title">Signup to {{@site.title}}</h1>
            <p>{{@site.description}}</p>
            <div class="signup-box">
                **<input data-members-name type="text" placeholder="Type your name..." required="true"/>**
                <input data-members-email type="email" placeholder="Type your email..." required="true" autocomplete="false" />
                <button class="button primary" type="submit">
                    <span class="button-content">Continue</span>
                    <span class="button-loader">{{> "icons/loader"}}</span>
                </button>
            </div>
            <p><small>Already have an account? <a href="/signin/">Sign in</a></small></p>
            <div class="message-success"><strong>Great!</strong> Check your inbox and click the link to confirm your subscription</div>
            <div class="message-error">Please enter a valid email address!</div>
        </form>

On a personal note, I would like to take this if only someone could point me in the right direction to where data-members-form is defined.

@naz
Copy link
Member

naz commented Apr 3, 2020

Hey @oreniko26. To make the name field through all the way to the database you'd need to add support of this field in:

  1. members.js theme bindings here
  2. make sure it shows up as a part of payload in signup link later on in the process here
  3. handle member creation here

The above list is coming from not much due diligence on the exact places to be checked. pt.3 might have couple more places that might need the "name" handling just need to look up them through the codebase. Hope this is helpful ;)

@minimaluminium
Copy link
Member

Hey @oreniko26, collecting member name was made possible by TryGhost/Ghost#12191 in Ghost v3.35. You can now use data-members-name attribute after updating your Ghost to the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants