Manu-41 Posted February 15, 2021 Share Posted February 15, 2021 (edited) Bonjour, j'ai besoin de cacher certaines valeurs dans l'objet du formulaire de contact. j'ai ce code <select id="id_contact" class="form-control" name="id_contact"> <option value="0">{l s='-- Choose --'}</option> {foreach from=$contacts item=contact} <option value="{$contact.id_contact|intval}"{if isset($smarty.request.id_contact) && $smarty.request.id_contact == $contact.id_contact} selected="selected"{/if}>{$contact.name|escape:'html':'UTF-8'}</option> {/foreach} </select> notamment ici <option value="{$contact.id_contact|intval}"{if isset($smarty.request.id_contact) && $smarty.request.id_contact == $contact.id_contact} selected="selected"{/if}>{$contact.name|escape:'html':'UTF-8'}</option> qui reprend tout les id de contact. Mais je voudrais afficher que certain id. (sans supprimer les id contact dans e bo, car j'en ai besoin pour un module). Une piste? Prestashop 1.6 Merci pour votre aide. Edited February 16, 2021 by Manu-shop (see edit history) Link to comment Share on other sites More sharing options...
Mediacom87 Posted February 15, 2021 Share Posted February 15, 2021 {if $contact.id_contact != xx && $contact.id_contact != yy} <option value="{$contact.id_contact|intval}"{if isset($smarty.request.id_contact) && $smarty.request.id_contact == $contact.id_contact} selected="selected"{/if}>{$contact.name|escape:'html':'UTF-8'}</option> {/if} Link to comment Share on other sites More sharing options...
Manu-41 Posted February 16, 2021 Author Share Posted February 16, 2021 super, ça fonctionne. un grand merci 😉 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