Passing arguments to the CVT functions

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

function formulaires_x_charger_dist(){}
function formulaires_x_verifier_dist(){}
function formulaires_x_traiter_dist(){}

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

#FORMULAIRE_X{argument, argument, …}

The PHP functions receive the parameters in the same order:

function formulaires_x_charger_dist($arg1, $arg2,){}
function formulaires_x_verifier_dist($arg1, $arg2,){}
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:

function formulaires_editer_composition_objet_charger($type, $id){}

Author Mark Baber Published : Updated : 02/06/10

Translations : English, Español, français