Coding with SPIP 3.0
SPIP3.0 Technical Documentation

> > > > Passing arguments to the CVT functions

Passing arguments to the CVT functions

The charger(), verifier() and traiter() functions do not receive any parameters by default.

  1. function formulaires_x_charger_dist(){}
  2. function formulaires_x_verifier_dist(){}
  3. function formulaires_x_traiter_dist(){}


For these functions to receive parameters, they need to be submitted as arguments explicitly when calling the form.

  1. #FORMULAIRE_X{argument, argument, …}

The PHP functions receive the parameters in the same order:

  1. function formulaires_x_charger_dist($arg1, $arg2,){}
  2. function formulaires_x_verifier_dist($arg1, $arg2,){}
  3. function formulaires_x_traiter_dist($arg1, $arg2,){}


Note that there is a supplementary possibility to use the functions for dynamic tags, which make it possible to pass parameters automatically.


The "Composition" plugin contains a form which requires a type and an identifier. It is called as follows:


The processing functions therefore receive these two parameters:

  1. function formulaires_editer_composition_objet_charger($type, $id){}