Jump to content

{Résolu} Formulaire de contact cacher des id de contact dans l'objet


Recommended Posts

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 by Manu-shop (see edit history)

Share this post


Link to post
Share on other sites

{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}

 

Share this post


Link to post
Share on other sites

  • Manu-shop changed the title to {Résolu} Formulaire de contact cacher des id de contact dans l'objet

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More