Please specify your interest in this question

CVT form posting articles

Hello dear Community,

I want to make a form allowing users to submit content. I’ve followed the CVT guide before for creating user signups, and now I’m looking for a similar function to allow for creating articles (getting title, texte, etc from POST fields, saving it in database after some checks.

What whould be the equivalent of this function for making articles?

function formulaires_xxx_traiter_dist() {
        $res = array();
        $surname = _request('surname');
        $firstname = _request('firstname');
        $email = _request('email');
        if ($id_auteur = insert_auteur()) {
                auteurs_set($id_auteur,array('surname'=>"$surname $firstname",'email'=>$email));
                $res['message_ok'] = "Save successful!";
                $res['id_auteur'] = $id_auteur;
                $res['message_erreur'] = "A problem occurred - it was not possible to save your data";

        return $res;

Thank you,