(gelöst) Kontaktformular - Ausgabe Error in falschem div

Hilfe zu Modulen und Tags
Post Reply
nOOber
Forum Members
Forum Members
Posts: 63
Joined: Thu Dec 10, 2009 11:29 am

(gelöst) Kontaktformular - Ausgabe Error in falschem div

Post by nOOber »

Hallo,

kann ich dem Kontaktformular irgendwie "sagen", dass die fehlerhafte Ausgabe (zB Pflichtfeld vergessen auszufüllen) in einem bestimmten div mit id auf der Seite stattfinden soll. Bei mit "springt" das Formular komplett in den header und wird da natürlich unschön angezeigt. >:(
Wird alles richtig versendet und die Versandmeldung wird auch im falschen div angezeigt.

Danke für die Hilfe schon mal im Vorraus.
Grüße, Johannes

Eingabe TEMPLATE:
...................................................
<div id="container">
<div id="headerwrap">
<div id="header">
<div id="logo">{cms_selflink page="start" text="Startseite" image="uploads/images/logo_intandem.png" imageonly=1}</div>
<div id="menu">{menu number_of_levels="2" start_level="2" collapse="1"}</div>
<div style="clear:both;"></div>
<div id="projectwrap">{content}</div>
</div>
<div id="subheaderwrap">
<div id="subheader">{content block="Zweiter Inhaltsblock"}</div>
</div>
</div>
<div style="clear:both;"></div>
<div id="contentwrap">
<div id="content">{content block="Dritter Inhaltsblock"}</div> -------------hier ist das Kontaktformular eingebettet
</div>
usw.
.....................................................


Ausgabe mit fehlerhafter Eingabe wie oben beschrieben:

<div id="container">
<div id="headerwrap">
<div id="header">
<div id="logo">{cms_selflink page="start" text="Startseite" image="uploads/images/logo_intandem.png" imageonly=1}</div>
<div id="menu">{menu number_of_levels="2" start_level="2" collapse="1"}</div>
<div style="clear:both;"></div>
<div id="projectwrap">{content}</div> -------------hier unter wird das Kontaktformular angezeigt
usw.

............................................................
CMS 1.8 "Madagascar"



Template Formular:
...............................................................
{* TABLE FORM LAYOUT / Field titles on Left *}
{* next line sets number of columns for things like checkbox groups *}
{assign var="cols" value="3"}
{literal}
<__script__ type="text/javascript">
function fbht(htid)
{
var fbhtc=document.getElementById(htid);
if (fbhtc)
{
if (fbhtc.style.display == 'none')
{
fbhtc.style.display = 'inline';
}
else
{
fbhtc.style.display = 'none';
}
}
}
</__script>
{/literal}
{$fb_form_header}
{if $fb_form_done == 1}
{* This first section is for displaying submission errors *}
{if $fb_submission_error}
<div class="error_message">{$fb_submission_error}</div>
{if $fb_show_submission_errors}
<table class="error">
{foreach from=$fb_submission_error_list item=thisErr}
<tr><td>{$thisErr}</td></tr>
{/foreach}
</table>
{/if}
{/if}
{else}
{* this section is for displaying the form *}
{* we start with validation errors *}
{if $fb_form_has_validation_errors}
<div class="error_message">
<ul>
{foreach from=$fb_form_validation_errors item=thisErr}
<li>{$thisErr}</li>
{/foreach}
</ul>
</div>
{/if}
{if $captcha_error}
<div class="error_message">{$captcha_error}</div>
{/if}

{* and now the form itself *}
{$fb_form_start}
<div>{$fb_hidden}</div>

<table{if $css_class != ''} class="{$css_class}"{/if}>
{if $total_pages gt 1}<tr><td colspan="2">{$title_page_x_of_y}</td></tr>{/if}
{foreach from=$fields item=entry}
{if $entry->display == 1 &&
$entry->type != '-Fieldset Start' &&
$entry->type != '-Fieldset End' }
<tr>
{strip}
<td align="right" valign="top"
{if $entry->required == 1 || $entry->css_class != ''} class="
{if $entry->required == 1}
required
{/if}
{if $entry->required == 1 && $entry->css_class != ''} {/if}
{if $entry->css_class != ''}
{$entry->css_class}
{/if}
"
{/if}
>
{if $entry->hide_name == 0}
{$entry->name}
{if $entry->required_symbol != ''}
{$entry->required_symbol}
{/if}
{/if}
</td><td align="left" valign="top"{if $entry->css_class != ''} class="{$entry->css_class}"{/if}>
{if $entry->multiple_parts == 1}
<table>
<tr>
{section name=numloop loop=$entry->input}
<td>{$entry->input[numloop]->input}&nbsp;{$entry->input[numloop]->name}{if $entry->input[numloop]->op}&nbsp;{$entry->input[numloop]->op}{/if}</td>
{if not ($smarty.section.numloop.rownum mod $cols)}
{if not $smarty.section.numloop.last}
</tr><tr>
{/if}
{/if}
{if $smarty.section.numloop.last}
{math equation = "n - a % n" n=$cols a=$entry->input|@count assign="cells"}
{if $cells ne $cols}
{section name=pad loop=$cells}
<td>&nbsp;</td>
{/section}
{/if}
</tr>
{/if}
{/section}
</table>
{else}
{if $entry->smarty_eval == '1'}{eval var=$entry->input}{else}{$entry->input}{/if}
{/if}
{if $entry->valid == 0} <--- {$entry->error}{/if}
{if $entry->helptext != ''}&nbsp;<a href="javascript:fbht('{$entry->field_helptext_id}')"><img src="modules/FormBuilder/images/info-small.gif" alt="Help" /></a>
<span id="{$entry->field_helptext_id}" style="display:none" class="fbr_helptext">{$entry->helptext}</span>{/if}


</td></tr>
{/strip}
{/if}
{/foreach}
{if $has_captcha == 1}
<tr><td></td><td><br/><br/>{$graphic_captcha}<br/><br/>{$title_captcha}<br/><br/>{$input_captcha}<br /></td></tr>
{/if}
<tr><td>{$prev}</td><td>{$submit}</td></tr>
</table>
{$fb_form_end}
{/if}
{$fb_form_footer}

...............................................................
Last edited by nOOber on Wed Feb 16, 2011 8:47 pm, edited 1 time in total.
nOOber
Forum Members
Forum Members
Posts: 63
Joined: Thu Dec 10, 2009 11:29 am

Re: Kontaktformular - Ausgabe Error in falschem div

Post by nOOber »

hat niemand eine idee ??
uniqu3

Re: Kontaktformular - Ausgabe Error in falschem div

Post by uniqu3 »

Checkbox "Das Formular inline anzeigen?:" schon probiert?
nOOber
Forum Members
Forum Members
Posts: 63
Joined: Thu Dec 10, 2009 11:29 am

Re: (gelöst) Kontaktformular - Ausgabe Error in falschem div

Post by nOOber »

ah, danke, wieder mal wie der Ochs vorm Berg gestanden ... ::)

viele Grüße, Johannes
Post Reply

Return to “Module und Tags”