diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php
new file mode 100644
index 00000000000..095cf0d8887
--- /dev/null
+++ b/htdocs/core/class/html.formsetup.class.php
@@ -0,0 +1,403 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+
+/**
+ * This class help you create setup render
+ */
+class formSetup{
+
+ /**
+ * @var DoliDB Database handler.
+ */
+ public $db;
+
+ /** @var formSetupItem[] */
+ public $arrayOfParameters = array();
+
+ public $setupNotEmpty = 0;
+
+ /** @var Translate */
+ public $langs;
+
+ /** @var Form */
+ public $form;
+
+ /**
+ * Constructor
+ *
+ * @param DoliDB $db Database handler
+ */
+ public function __construct($db, $outputLangs = false)
+ {
+ global $langs;
+ $this->db = $db;
+ $this->form = new Form($this->db);
+
+ if($outputLangs){
+ $this->langs = $outputLangs;
+ }
+ else{
+ $this->langs = $langs;
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function generateOutput($edit = false){
+
+ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
+
+ $out = '
';
+
+ if($edit){
+ $item->generateInputField();
+ }
+ else{
+ $item->generateOutputField();
+ }
+
+ if(!empty($item->errors)){
+ // TODO : move set event message in a methode to be called by cards not by this class
+ setEventMessages(null, $item->errors, 'errors');
+ }
+
+ $out.= '