3

I have created these on the backend at custom member fields.

Do I need to do something extra?

{exp:member:registration_form
    return="member/registration/success"
    error_handling="inline"
}

    <p>* Required fields</p>
    <fieldset>
        <h4>Login details</h4>

        <p>
            <label for="username">Username*: {if error:username}{error:username}{/if}</label><br />
            <input type="text" name="username" id="username" value="{if username}{username}{/if}"/><br />
        </p>

        <p>
            <label for="email">Email*: {if error:email}{error:email}{/if}</label><br />
            <input type="text" name="email" id="email" value="{if email}{email}{/if}"/><br />
        </p>

        <p>
            <label for="first_name">First Name*: {if error:first_name}{error:first_name}{/if}</label><br />
            <input type="text" name="first_name" id="first_name" value="{if first_name}{first_name}{/if}"/><br />
        </p>

        <p>
            <label for="surname">Surname*: {if error:surname}{error:surname}{/if}</label><br />
            <input type="text" name="surname" id="surname" value="{if surname}{surname}{/if}"/><br />
        </p>

        <p>
            <label for="phone_number">Phone Number*: {if error:phone_number}{error:phone_number}{/if}</label><br />
            <input type="text" name="phone_number" id="phone_number" value="{if phone_number}{phone_number}{/if}"/><br />
        </p>

        <p>
            <label for="password">Password*: {if error:password}{error:password}{/if}</label><br />
            <input type="password" name="password" id="password" value="{if password}{password}{/if}"/>
        </p>

        <p>
            <label for="password_confirm">Confirm password*: </label><br />
            <input type="password" name="password_confirm" id="password_confirm" value="{if password_confirm}{password_confirm}{/if}"/>
        </p>

        <p>
            <label for="terms_of_service">Terms of service:</label><br />
            <div>All messages posted at this site express the views of the author, and do not necessarily reflect the views of the owners and administrators
                of this site.By registering at this site you agree not to post any messages that are obscene, vulgar, slanderous, hateful, threatening, or that violate any laws. We will
                permanently ban all users who do so.We reserve the right to remove, edit, or move any messages for any reason.</div>
        </p>

        <p>
            <label><input type="checkbox" name="accept_terms" value="y" {if accept_terms == 'y'}checked="checked"{/if} /> I accept these terms {if error:accept_terms}{error:accept_terms}{/if}</label>
        </p>

        {if captcha}
            <p>
                <label for="captcha">{lang:captcha}*</label>
                {captcha}<br/>
                <input type="text" id="captcha" name="captcha" value="" size="20" maxlength="20" style="width:140px;"/>
            </p>
        {/if}
    </fieldset>

    <input type="submit" value="Register" class="btn btn-primary" />
{/exp:member:registration_form}
4
  • 2
    Hi Wilford, to get the best answer here please add a little more context. Is the registration form working for you or are encountering a specific issue? Feel free to Edit your question and add more detail.
    – Alex Kendrick
    Commented Feb 5 at 16:42
  • 1
    Hi Alex, i had to use m_field_id_1 to reference the Custom Field like below <div class="form-group"> <label for="surname"> {if error:m_field_id_1}{error:m_field_id_1}{/if}</label> <input type="text" name="m_field_id_1" id="m_field_id_1" placeholder="Surname*" class="pry-form-control" value="{if m_field_id_1}{m_field_id_1}{/if}" required /> </div> and worked Commented Feb 5 at 17:11
  • 1
    Great, glad you got it working. This site strongly encourages answering your own questions. So when you get a chance, to help others and to mark this question as answered, please add and accept your own answer!
    – Alex Kendrick
    Commented Feb 6 at 19:40
  • Thanks i will do so Commented Feb 8 at 8:16

1 Answer 1

2

I had to use m_field_id_1 to reference the Custom Field like below

<div class="form-group"> <label for="surname"> {if error:m_field_id_1}{error:m_field_id_1}{/if}</label> <input type="text" name="m_field_id_1" id="m_field_id_1" placeholder="Surname*" class="pry-form-control" value="{if m_field_id_1}{m_field_id_1}{/if}" required /> </div>

and then it worked.

1
  • 1
    Great! When the 48h time limit has passed you can (and should) accept your own answer!
    – Alex Kendrick
    Commented Feb 9 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.