Forum

Thread tagged as: Problem, Members

Perch Members Registration form

Hi, in the documentation it states "It can collect any information you need by adding inputs to the registration form template – all we require is an email address and password." however when i've added lots of custom data collection fields in the sign up form, the data doesn't appear to be collected anywhere? Can someone tell me what i'm doing wrong?

Example of the form code :

<perch:form id="register" method="post" app="perch_members" type="default">
<hr/>
<h3 class="text-center">Your Details</h3>
    <div class="large-3 medium-4 small-12 columns">
        <perch:label for="first_name">First name</perch:label>
        <perch:input type="text" id="first_name" required="true" label="First name" />
        <perch:error for="first_name" type="required">Please add your name</perch:error>
    </div>

    <div class="large-3 medium-4 small-12 columns">
        <perch:label for="last_name">Last name</perch:label>
        <perch:input type="text" id="last_name" required="true" label="Last name" />
        <perch:error for="last_name" type="required">Please add your name</perch:error>
    </div>

    <div class="large-6 medium-4 small-12 columns">
        <perch:label for="email">Email</perch:label>
        <perch:input type="email" id="email" required="true" placeholder="you@company.com" helper="PerchMembers_Members::check_email" />
        <perch:error for="email" type="required">Please add your email address</perch:error>
        <perch:error for="email" type="helper">That email address is already in use</perch:error>
    </div>

<div class="large-6 medium-6 small-12 columns">
        <perch:label for="address">Postal Address</perch:label>
        <perch:input type="text" id="address" required="true" label="address" />
        <perch:error for="address" type="required">Please add an answer</perch:error>
    </div>

    <div class="large-6 medium-6 small-12 columns">
        <perch:label for="postcode">Postcode</perch:label>
        <perch:input type="text" id="postcode" required="true" label="postcode" />
        <perch:error for="postcode" type="required">Please add an answer</perch:error>
    </div>

    <div class="large-6 medium-6 small-12 columns">
        <perch:label for="phone">Mobile Number</perch:label>
        <perch:input type="text" id="phone" required="true" label="phone" />
        <perch:error for="phone" type="required">Please add an answer</perch:error>
    </div>

    <div class="large-6 medium-6 small-12 columns">
        <perch:label for="occupation">Occupation (If you're a student let us know where!)</perch:label>
        <perch:input type="text" id="occupation" required="true" label="occupation" />
        <perch:error for="occupation" type="required">Please add an answer</perch:error>
    </div>




    <div class="large-3 medium-4 small-12 columns">
        <perch:label for="password">Choose a Password</perch:label>
        <perch:input type="password" id="password" required="true" match-with="password2" />
        <perch:error for="password" type="required">Please add a password</perch:error>
        <perch:error for="password" type="match">Passwords do not match</perch:error>
    </div>

    <div class="large-3 medium-4 small-12 columns">
        <perch:label for="password2">Enter your Password again</perch:label>
        <perch:input type="password" id="password2" required="true" />
        <perch:error for="password2" type="required">Please repeat your password</perch:error>
    </div>
 <div class="large-6 medium-4 small-12 columns">
        <perch:label for="dob">Date Of Birth</perch:label>
        <perch:input type="date" id="dob" required="false" label="dob" format="D d F y" />

    </div>
<hr/>
<h3 class="text-center">Your Social Networking</h3>
<div class="large-4 medium-4 small-12 columns">
        <perch:label for="twitter">Twitter Handle</perch:label>
        <perch:input type="text" id="twitter" required="false" label="twitter" />

    </div>

    <div class="large-4 medium-4 small-12 columns">
        <perch:label for="instagram">Instagram Username</perch:label>
        <perch:input type="text" id="instagram" required="false" label="instagram" />

    </div>

<div class="large-4 medium-4 small-12 columns">
        <perch:label for="blog">Your Blog Address</perch:label>
        <perch:input type="text" id="blog" required="false" label="blog" />

    </div>
    <hr/>
    <h3 class="text-center">More about you</h3>
<div class="large-4 medium-4 small-12 columns">
        <perch:label for="Celeb_babe">Which celeb babe’s style do you rate?</perch:label>
        <perch:input type="text" id="Celeb_babe" required="true" label="Celeb_babe" />
        <perch:error for="Celeb_babe" type="required">Please add an answer</perch:error>
    </div>

    <div class="large-4 medium-4 small-12 columns">
        <perch:label for="magazines_blogs">What magazines / blogs do you read most often?</perch:label>
        <perch:input type="text" id="magazines_blogs" required="true" label="magazines_blogs" />
        <perch:error for="magazines_blogs" type="required">Please add an answer</perch:error>
    </div>
Gareth Phillips

Gareth Phillips 0 points

  • 6 years ago

Gareth, Is that all of your code? There seems to be some code missing at the bottom like...


<div> <perch:input type="submit" class="button" value="Register" /> </div> <perch:success> <p>Thanks!</p> </perch:success> </perch:form>

Gareth if you add the additional fields in, say , your profile.html file.

<div>
  <perch:label for="Celeb_babe">Which celeb babe’s style do you rate?</perch:label>
  <perch:input type="text" id="Celeb_babe" required="true" label="Celeb_babe" />
</div>

When you load your profile page eg, /path/to/members/profile.php

You will see the additional information.

Once you apply a tag to the member in the admin section eg 'forum'

You can display the extra fields with

<?php

if (perch_member_logged_in('forum')) {

     echo perch_member_get('Celeb_babe');
}

?>

Sorry to drag up old problems, but I too am completely unable to add additional fields using this technique.

I get no errors, but the fields are in no way made. I've looked through the database as well, and nothing.

Are there ANY other settings required than that mentioned above?

No worries, I managed to stumble across the answer.

It simply needed adding to member.html

Thanks

The comments above are not mine?

Angie, glad you got it sorted.