laipreu Posted July 5, 2014 Share Posted July 5, 2014 Bonjour, Je crée un module et dans la configuration de ce dernier je génère un formulaire. Tout fonctionne impec (génération du formulaire, envoie en bdd etc...), sauf que IMPOSSIBLE de remplir mon formulaire par les champs enregistrés en bdd. Vous avez une idée ? Voici le code utilisé : $this->fields_form[1]['form'] = array( 'legend' => array( 'title' => $this->l('Mon titre'), 'image' => _PS_ADMIN_IMG_.'information.png' ), 'input' => array(), 'submit' => array( 'name' => 'submitUrl', 'title' => $this->l('Enregistrer'), 'class' => 'button' ) ); $regions = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'monmodule'); $urls_form = array(); foreach($urls as $url){ array_push($urls_form, array( 'type' => 'text', 'label' => $url['name'], 'name' => 'input_url_'.$url['id_url'], 'empty_message' => $url['url'], 'size' => 80)); } $this->fields_form[1]['form']['input'] = $urls_form; $helper = $this->initForm(); $helper->submit_action = ''; $helper->title = $this->l('Block Url'); $helper->fields_value = $this->fields_value; $this->_html .= $helper->generateForm($this->fields_form); Merci d'avance ! Link to comment Share on other sites More sharing options...
samyha Posted July 7, 2014 Share Posted July 7, 2014 Bonjour Ce n'est pas la bonne section pour ta question. Je déplace ton topic dans la section "Développement et adaptation de Prestashop". Bonne journée Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now