Interesting Form Builder Problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
pkbowen
Forum Members
Forum Members
Posts: 28
Joined: Tue Jun 10, 2008 6:23 pm

Interesting Form Builder Problem

Post by pkbowen »

Hey Guys,

I've used the Form Builder (v 0.4.4 in this particular case) on many occasions before, and I have never had this particular problem.  Normally when I submit a form, it shows the 'standard' verification errors (red list at the top as well as an arrow pointing to the problem fields)...

This page throws those 'normal' errors, but it duplicates the form (displays one right under the other).  To duplicate this error, the url is: http://www.ribfest.net/index.php?page=volunteer-sign-up.  This site is actually live, so please don't completely submit the form...just leave out one or two required fields.

This is the template that we are using...it doesn't look like there's anything that would cause it to show up twice.

Code: Select all

{* TABLE FORM LAYOUT / Field titles on Top *}
{* next line sets number of columns for things like checkbox groups *}
{assign var="cols" value="3"}
{$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}
	{$fb_hidden}

    <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 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></tr><tr><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} {$entry->input[numloop]->name}{if $entry->input[numloop]->op} {$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> </td>
                			{/section}
               		 	{/if}
                		</tr>
        			{/if}
	    		{/section}
	    		</table>
	    	{else}
	    		{$entry->input}
	    	{/if}
	    	{if $entry->valid == 0} <--- {$entry->error}{/if}
	    	</td></tr>
	    	{/strip}
	  {/if}
{/foreach}
{if $has_captcha == 1}
<tr><td>{$graphic_captcha}</td></tr><tr><td>{$input_captcha}<br />{$title_captcha}</td></tr>
{/if}
<tr><td>{$prev}</td></tr><tr><td>{$submit}</td></tr>
</table>
{$fb_form_end}
{/if}
{$fb_form_footer}
Any ideas?  Thanks for your help!

-Pat Bowen
pkbowen
Forum Members
Forum Members
Posts: 28
Joined: Tue Jun 10, 2008 6:23 pm

Re: Interesting Form Builder Problem

Post by pkbowen »

bump

...anyone have an idea?
niklasalbin

Re: Interesting Form Builder Problem

Post by niklasalbin »

It looks as though you have inserted the form module twice into your page template (not the form builder template).

In the generated source code one can find the form twice. Once under and once under .

Have a look at the template yourself or post it here and I can have a look at it.

/Niklas
lid3r
Forum Members
Forum Members
Posts: 18
Joined: Fri Nov 07, 2008 1:35 pm

Re: Interesting Form Builder Problem

Post by lid3r »

Hi, i up'ated the topic, since a have the same problem, in my template there is only once written form builder, but the script printing it twice, could anyone help me?
Post Reply

Return to “Modules/Add-Ons”