1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help With Creating A Custom Field On the Registration Form

Discussion in 'Styling and Customization Questions' started by trichome, Dec 17, 2012.

  1. trichome

    trichome Member

    How exactly would one go about adding an additional, required check box underneath "I agree to the terms and rules."?

    Would this be done in the custom_fields_edit tab of the register_form template, and if so would it need to be done for every style's template?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Custom user fields can be made required:

    Admin CP -> Users -> Custom User Fields

    But they don't show at the very bottom of the register form like you want. You can move all custom fields on the register form by editing this template:

    Admin CP -> Appearance -> Templates -> register_form

    Find and move this code:

    	<xen:include template="custom_fields_edit" />
  3. trichome

    trichome Member

    Thanks Jake. That was easier than I thought it would be.

    Is there a way to leave some of the text fields blank, or at least so they don't display?

    I only want "three" to display.

    Also, is there a way to only have it display on the registration form?
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Changing the display of an individual field gets a little hairy. This template contains the HTML:

    Admin CP -> Appearance -> Templates -> custom_field_edit

    But this controls all custom fields. Changing just one requires template conditions. Or if you only have one custom field on your forum then it doesn't matter.

Share This Page