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 Necessário will prevent users from submitting registration forms without filling them out.
Criação de campos personalizados
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 Nome will be used as the label for this field in your forms.
- Next, you could choose the Tipo of the field. Depending on the type you choose, additional type-specific options will appear.
- O Valor(es) padrão 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 Necessário option will prevent user registration without filling in this custom field.
- Clique no botão Opções de atualização 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:
Criação de uma opção de caixa de seleção clicável
Para criar um campo personalizado de caixa de seleção clicável, você pode simplesmente adicionar algum html básico ao nome do campo ao criá-lo. Aqui está um exemplo:
<a href='https://www.yoursite.com/special-policies' target='_blank'>Concorde com nossas Políticas Especiais</a>
Que aparecerá na página de registro da seguinte forma:
Habilitação de várias opções "marcadas" para campos personalizados de seleção múltipla e caixas de seleção
O MemberPress permite que você insira uma opção padrão a ser selecionada ou marcada para os tipos de campo personalizado Multi-Select e Checkboxes usando a opção
Valor(es) padrão para o campo e inserir o valor da opção, conforme mostrado aqui:
Para que mais de uma opção seja marcada, basta separar os
Valor da opçãos inseridos no Valor(es) padrão conforme mostrado aqui (separadas por vírgulas, sem espaços entre as entradas):
Veja como isso ficaria na sua página de registro: