The #FORMULAIRE_INSCRIPTION{...} tag displays the form allowing your visitors to register automatically, i.e. without any intervention from the site manager(s).

Once registered...

These new subscribers will then be able to benefit from services such as :

  • access to the private area and take part in the editorial life of the site;
  • participate in a forum
  • post a comment on an article (or other editorial item);
  • access restricted parts of the public area [1];
  • etc.

Requirements and system requirements

That your host accepts the sending of mail.

From the private area, go to Configuration → Interactivity
and activate one of the following two options:

  • Accept registrations in the "Automatic registration of new editors" block;
  • Accept registration of visitors to the public site in the "Visitors" block.

...otherwise, the tag will not display anything.

If you are logged in, the tag will not display anything.

Operating principle

Once the form has been filled in (name or nickname + email) and validated, three things happen:

  1. a message warns the visitor: "Your new login has just been sent to you by email";
  2. A confirmation email is sent to the address indicated;
  3. a new account is created in SPIP with the status new (displayed "Registration to be confirmed" on this author’s page in the private interface).
Menu Activité → Afficher les visiteurs

The email contains two important pieces of information:

  1. a registration confirmation link;
  2. access codes (login and password).

Registration is confirmed either by clicking on the link in the email or by logging in for the first time. If nothing is done within 45 days, the account is deleted.

In your templates

The form comes with 3 arguments, all optional.
[(#FORMULAIRE_INSCRIPTION{status, id_rubrique, url_destination})]

The simplest use is the tag with no arguments.

Status argument
[(#FORMULAIRE_INSCRIPTION{6forum})] is the equivalent of the previous one, for visitor registration (forums or restricted area reserved for registered visitors).
The value "6forum" corresponds to the visitor status title desired when registering.

To find out more about The status of authors within SPIP

Argument id_rubrique
Is used for restricted administrator registration...to a specific section.
Note: this argument is generally rarely used.

Argument url_destination
Destination URL used in the registration confirmation link.

[(#FORMULAIRE_INSCRIPTION{6forum, 0, #URL_PAGE{Welcome}})]

If not specified, the link will take you to the home page of the site for visitors, and the home page of the private area for editors and administrators.

Forcing confirmation of a registration

Reminder: A registration is confirmed either by clicking on the link inserted in the authentication email, or by logging in for the first time.

It is possible to force the use of the confirmation link contained in the email. In this case, you need to override the authorisation [2] autoriser_loger_dist() To do this, add the following function to The mes_options.php file.

function autoriser_loger($faire, $type, $id, $qui, $opt) {
    if (in_array($qui['statut'], array('nouveau','5poubelle'))) {
        return false;
    return true;


Once the person has logged in, the #FORMULAIRE_INSCRIPTION tag returns nothing.


[1The notion of a public area with access restricted to authenticated visitors is not a default feature. But you can use the #SESSION and #AUTORISER tags, as well as these plug-ins

[2See Overloading a _dist function on the site programmer.spip.net

Author jack, Mark Published : Updated : 17/07/23

Translations : català, English, français, Nederlands