21/04/2010, 17:25:49
Citation :#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~Pour des raisons de compatibilité CSS, j'aurais besoin d'ajouter un <div> sous chaque fieldset automatiquement généré.
#~ Version du CMS : 1.7.0
#~ Version du MLE si existante :
#~ Informations Système :
#~ ----------------------------------------------
#~ Cms Version: 1.7
#~ Installed Modules:
#~ CMSMailer: 1.73.14
#~ FileManager: 1.0.2
#~ MenuManager: 1.6.2
#~ ModuleManager: 1.3.3
#~ News: 2.10.4
#~ nuSOAP: 1.0.1
#~ Printing: 1.0.4
#~ Search: 1.6.2
#~ FormBuilder: 0.6.1
#~ Config Information:
#~ php_memory_limit:
#~ process_whole_template: false
#~ max_upload_size: 64000000
#~ default_upload_permission: 664
#~ assume_mod_rewrite: true
#~ page_extension: .php
#~ internal_pretty_urls: false
#~ use_hierarchy: true
#~ Php Information:
#~ phpversion: 5.2.12
#~ md5_function: On (Vrai)
#~ gd_version: 2
#~ tempnam_function: On (Vrai)
#~ magic_quotes_runtime: Off (Faux)
#~ E_STRICT: 0
#~ memory_limit: 64M
#~ max_execution_time: 30
#~ safe_mode: Off (Faux)
#~ session_save_path: /tmp (1777)
#~ session_use_cookies: On (Vrai)
#~ Server Information:
#~ Server Api: cgi
#~ Server Db Type: MySQL (mysql)
#~ Server Db Version: 5.0.90
#~ ----------------------------------------------
#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
Ma question est donc la suivante : y a-t-il moyen de déterminer la nature d'un champs ou d'un élément dans la boucle de génération de Form Builder.
A priori, je ne pense pas...
Mais je préfère demander. :o)
Voici ma boucle :
Code :
{$fb_form_start}{* and now the form itself *}
<div>{$fb_hidden}</div>
{foreach from=$fields item=entry}
{if $entry->display == 1} {strip}
{if $entry->needs_div == 1} <p{if $entry->css_class != ''} id="{$entry->css_class}"{/if}{if $entry->valid == 0} class="fb_invalid"{/if}>{/if}
{if $entry->hide_name == 0}<label{if $entry->multiple_parts != 1} for="{$entry->input_id}"{/if}>{$entry->name}{if $entry->required_symbol != ''} <span class="obligatoire">{$entry->required_symbol}</span>{/if}</label>{/if}
{if $entry->multiple_parts == 1}
{section name=numloop loop=$entry->input}
{if $entry->label_parts == 1}<span>{$entry->input[numloop]->input}{$entry->input[numloop]->name}</span>
{else}{$entry->input[numloop]->input}{/if}
{if isset($entry->input[numloop]->op) && $entry->input[numloop]->op}{$entry->input[numloop]->op}{/if}
{/section}{else}{if $entry->smarty_eval == '1'}{eval var=$entry->input}{else}{$entry->input}
{/if}
{/if}{if $entry->needs_div == 1} </p>{/if}
{/strip}
{/if}{/foreach}
<p id="submit"><input type="image" value="envoyer" src="uploads/icono/submit.png" /></p>
{$fb_form_end}