Form builder going to Index page after submit - problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
actionslax
Forum Members
Forum Members
Posts: 19
Joined: Sun Aug 31, 2008 8:55 am

Form builder going to Index page after submit - problem

Post by actionslax »

Hello folks,

Have searched for this high and low but can't seem to find a relating post so here goes. Think it is a small issue I am having.

My forms are looking good and everything seems to be working sending wise etc but I have a small problem when I click submit button and form does it's validation check and outputs the list of inputs or whatever not filled in, my page content disapears and the url is now the main root index.php with said form and validation list on the page. All I want is for content and the proper page to stay the same and not go to index page. Only change the page once submit process has gone smoothly.
  • I have 3 forms and they all do the same.
  • On submission they all go to a thankyou page
Hope I have explained properly.

FormBuilder - 0.5.3
CMS Version - 1.4.1

The code for each form is pretty much the default form - I have changed only the validation error section.

Code: Select all

{* DEFAULT FORM LAYOUT / pure CSS *}
{$fb_form_header}
{if $fb_form_done == 1}
	{* This first section is for displaying submission errors *}
	{if isset($fb_submission_error) && $fb_submission_error}
		<div class="error_message">{$fb_submission_error}</div>
		{if isset($fb_show_submission_errors) && $fb_show_submission_errors}
			<div class="error">
			<ul>
			{foreach from=$fb_submission_error_list item=thisErr}
				<li>{$thisErr}</li>
			{/foreach}
			</ul>
		</div>
		{/if}
	{/if}
{else}
	{* this section is for displaying the form *}
	{* we start with validation errors *}
	{if isset($fb_form_has_validation_errors) && $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 isset($captcha_error) && $captcha_error}
		<div class="error_message">{$captcha_error}</div>
	{/if}

	{* and now the form itself *}
	{$fb_form_start}
	<div>{$fb_hidden}</div>
	<div{if $css_class != ''} class="{$css_class}"{/if}>
	{if $total_pages gt 1}<span>{$title_page_x_of_y}</span>{/if}
	{foreach from=$fields item=entry}
		{if $entry->display == 1}
        	{strip}
         	{if $entry->needs_div == 1}
            	<div
            	{if $entry->required == 1 || $entry->css_class != '' || $entry->valid == 0} class="
              		{if $entry->required == 1}required{/if}
              		{if $entry->css_class != ''} {$entry->css_class}{/if}
                    {if $entry->valid == 0} fb_invalid{/if}
              		"
            	{/if}
            	>
         	{/if}
         	{if $entry->hide_name == 0}
            	<label{if $entry->multiple_parts != 1} for="{$entry->input_id}"{/if}>{$entry->name}
            	{if $entry->required_symbol != ''}
               		{$entry->required_symbol}
            	{/if}
            	</label>
         	{/if}
         	{if $entry->multiple_parts == 1}
            	{section name=numloop loop=$entry->input}
               		{if $entry->label_parts == 1}
               			<div>{$entry->input[numloop]->input} {$entry->input[numloop]->name}</div>
               		{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->valid == 0}  <span class="validation"> *required</span>{/if}
         	{if $entry->needs_div == 1}
            	</div>
         	{/if}
         	{/strip}
     	{/if}
	{/foreach}
	{if $has_captcha == 1}
		<div class="captcha">{$graphic_captcha}{$title_captcha}<br />{$input_captcha}</div>
	{/if}
	<div class="submit">{$prev}{$submit}</div>
	</div>
	{$fb_form_end}
{/if}
{$fb_form_footer}
Cheers

Slax
soren
Forum Members
Forum Members
Posts: 60
Joined: Fri Apr 18, 2008 6:44 am
Location: Denmark

Re: Form builder going to Index page after submit - problem

Post by soren »

Hello Slax

Go to Extensions > FormBuilder
Select your form
Go to Form Submission

On this page you must select what you want to do after supmitting the form.

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

Re: Form builder going to Index page after submit - problem

Post by lid3r »

have the same problem, seems to be that this is not the solution.
actionslax
Forum Members
Forum Members
Posts: 19
Joined: Sun Aug 31, 2008 8:55 am

Re: Form builder going to Index page after submit - problem

Post by actionslax »

soren wrote: Hello Slax

Go to Extensions > FormBuilder
Select your form
Go to Form Submission

On this page you must select what you want to do after supmitting the form.

Soren
Hi Soren,

I already have this set to go to a thankyou page. It is not this I have the problem with, it is while you are on the form and you have 1 field for example you have not filled in, the validation alert shows that you need to fill in a field. It is at this point my form url  - http://www.website.com/form.php then goes to http://www.website.com/index.php the root and my content on the page disapears.

Any other ideas?
actionslax
Forum Members
Forum Members
Posts: 19
Joined: Sun Aug 31, 2008 8:55 am

Re: Form builder going to Index page after submit - problem

Post by actionslax »

Hello,

I still seem to bel having this problem. Has anyone found a fix for this?

cheers
athena_pallas
Power Poster
Power Poster
Posts: 272
Joined: Wed Sep 13, 2006 4:41 pm
Location: Belgium

Re: Form builder going to Index page after submit - problem

Post by athena_pallas »

Hi !

Don't you have an UDT called before template ?
actionslax
Forum Members
Forum Members
Posts: 19
Joined: Sun Aug 31, 2008 8:55 am

Re: Form builder going to Index page after submit - problem

Post by actionslax »

thanks for geting back to me athena_pallas.

Can you explain further - UDT and how i would find out if this being called.
Post Reply

Return to “Modules/Add-Ons”