MemberPress account and registration forms have a default set of fields. Under MemberPress settings, you can enable and disable some default MemberPress fields and add your custom fields.
This document will explain how you can manage MemberPress fields and create custom fields for registration and account forms.
Managing MemberPress Fields
MemberPress field options are available at Dashboard > MemberPress > Settings > Fileds tab. Here, you will find several options for managing default fields.
The first option you can check is whether the field settings should be applied to purchases made by existing users. Disabling the Show The Fields Below For Logged-in Purchases option will only apply the field settings to new users.
Next, you can show the name and address fields on registration and whether these should be required.
Checking the Show checkbox for the Name Fields will add the First Name and Last Name fields to your forms. Checking the same option for the Address Fields will add the Address, City, Country, State/Province, and Zip/Postal Code fields.
Setting fields as Exigée will prevent users from submitting registration forms without filling them out.
Création de champs personnalisés
On the Fileds page, under the Custom User Information Fields section, you can add your custom fields:
- Click on the + icon to add a new custom field. This will open the field form.
- Start by naming your field. This Nom will be used as the label for this field in your forms.
- Next, you could choose the Type of the field. Depending on the type you choose, additional type-specific options will appear.
- Les Valeur(s) par défaut field should contain the value that should be loaded as default.
- Checking the Show at Signup option will show your custom field on registration forms. Also, checking the Show in Account option will show the field on the account form.
- Checking the Exigée option will prevent user registration without filling in this custom field.
- Cliquez sur le bouton Options de mise à jour button to save the field.
MemberPress Fields feature allows you to create unlimited custom fields for your members to fill out.
Further, under the settings of any Memberships, you can choose to show or hide specific fields. By default, all custom fields set to Show on Signup will be displayed on the registration forms of all Memberships.
This will allow you to show only the fields you need on the registration forms for every membership.
Custom fields set to Show in Account will be visible in users' accounts after they register for a membership.
Creating a Default Blank Option for Drop-Down Custom Field
To add an “empty” option, add the following as your first option:
That way, when your users fail to select an option, MemberPress won't let them submit the form, and it will show this error:
Création d'une case à cocher cliquable
Pour créer un champ personnalisé avec case à cocher cliquable, il suffit d'ajouter quelques éléments html de base au nom du champ lors de sa création. Voici un exemple :
<a href='https://www.yoursite.com/special-policies' target='_blank'>Veuillez accepter nos politiques spéciales</a>
qui apparaîtra comme suit sur la page d'enregistrement :
Activation de plusieurs options "cochées" pour les champs personnalisés à sélection multiple et les cases à cocher
MemberPress vous permet de saisir une option par défaut à sélectionner ou à cocher pour les types de champs personnalisés Multi-Select et Checkboxes à l'aide de l'option
Valeur(s) par défaut pour le champ et saisir la valeur de l'option comme indiqué ici :
Pour que plusieurs options soient cochées, il suffit de séparer les champs
Valeur de l'optioninscrits dans la base de données des Valeur(s) par défaut comme indiqué ici (séparées par des virgules, sans espace entre les entrées) :
Voici à quoi cela ressemblerait sur votre page d'inscription :