[Solved] Tearing my hair our with form builder

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
janb

Re: Tearing my hair our with form builder

Post by janb »

Ahh

..and the Flat File question? You didn't have that def in the other form?
Last edited by janb on Thu Mar 04, 2010 10:22 am, edited 1 time in total.
stealer
Forum Members
Forum Members
Posts: 16
Joined: Wed Mar 03, 2010 2:16 pm

Re: Tearing my hair our with form builder

Post by stealer »

janb wrote: Ahh

..and the Flat File question? You didn't have that def in the other form?
Sorry Janb, that's my fault...as I said i've got 2 forms on 2 pages, to test all options, this is the write to file xml form and the variables were based on this.




Thanks! Your submissions have been received.{if $fld_53 != "" && $fld_53 != "[unspecified]" }Email address:: {$fld_53}
{/if}
{if $fld_54 != "" && $fld_54 != "[unspecified]" }File update: {$fld_54}
{/if}
{if $fld_56 != "" && $fld_56 != "[unspecified]" }Your name:: {$fld_56}
{/if}
{if $fld_55 != "" && $fld_55 != "[unspecified]" }Your email:: {$fld_55}
{/if}
{if $fld_57 != "" && $fld_57 != "[unspecified]" }Your message:: {$fld_57}
{/if}
]]>
















function fbht(htid)
{
var fbhtc=document.getElementById(htid);
if (fbhtc)
{
if (fbhtc.style.display == 'none')
{
fbhtc.style.display = 'inline';
}
else
{
fbhtc.style.display = 'none';
}
}
}

{/literal}
{$fb_form_header}
{if $fb_form_done == 1}
{* This first section is for displaying submission errors *}
{if isset($fb_submission_error) && $fb_submission_error}
{$fb_submission_error}
{if isset($fb_show_submission_errors) && $fb_show_submission_errors}


{foreach from=$fb_submission_error_list item=thisErr}
{$thisErr}
{/foreach}


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


{foreach from=$fb_form_validation_errors item=thisErr}
{$thisErr}
{/foreach}


{/if}
{if isset($captcha_error) && $captcha_error}
{$captcha_error}
{/if}

{* and now the form itself *}
{$fb_form_start}
{$fb_hidden}

{if $total_pages gt 1}{$title_page_x_of_y}{/if}
{foreach from=$fields item=entry}
{if $entry->display == 1}
{strip}
{if $entry->needs_div == 1}
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}
multiple_parts != 1} for="{$entry->input_id}"{/if}>{$entry->name}
{if $entry->required_symbol != ''}
{$entry->required_symbol}
{/if}

{/if}
{if $entry->multiple_parts == 1}
{section name=numloop loop=$entry->input}
{if $entry->label_parts == 1}
{$entry->input[numloop]->input} {$entry->input[numloop]->name}
{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->helptext != ''} field_helptext_id}')">
field_helptext_id}" style="display:none">{$entry->helptext}{/if}
{if $entry->valid == 0} <--- {$entry->error}{/if}
{if $entry->needs_div == 1}

{/if}
{/strip}
{/if}
{/foreach}
{if $has_captcha == 1}
{$graphic_captcha}{$title_captcha}
{$input_captcha}
{/if}
{$prev}{$submit}

{$fb_form_end}
{/if}
{$fb_form_footer}
{get_template_vars}]]>
























































stealer
Forum Members
Forum Members
Posts: 16
Joined: Wed Mar 03, 2010 2:16 pm

Re: Tearing my hair our with form builder

Post by stealer »

(Update)

Hi all,

Ok, so i've created a new email to form with just a message box and a disposition field to my email.  I've then created this on a new page using the default NCleanBlue template and it comes straight through!

I've added my form.css my layout.css and any other additional stylesheets i was using 1 by 1 and it's still ok, as soon as I add the test form to my template, it doesn't send, are there any obvious no-no's when creating templates that I need to be aware of with formbuilder?
janb

Re: Tearing my hair our with form builder

Post by janb »

as soon as I add the test form to my template
Added the form to a template? Which template?

JanB
stealer
Forum Members
Forum Members
Posts: 16
Joined: Wed Mar 03, 2010 2:16 pm

Re: Tearing my hair our with form builder

Post by stealer »

lexscripta wrote: Yeah, I have had nothing but problems with Formbuilder. I finally got it working a year ago when I had a friend do the CSS, whcih I never could figure out. It is the hardest, least intuitive form thingy I have ever seen. MInd you, it is really good at making and manipulating fields, but thats where it stops. Wait until you want to build a lengthy form and try to style it. Thats a whole lot of fun. Oh yeah.

Anyhow, I did an upgrade of CMSMS, and it stopped working... Now I am having the same issues you are.
Thanks for your post lexscripta, it's nice to know it's not just me.

this is my template,

{process_pagedata}



{sitename} - {title}
{metadata}








 

   

     

 
     

     
   

 

   

     
     
   

 

   


     

   

{FormBuilder form='test'}

     
   


 
   








         

   






It's pretty basic and i've not attached any stylesheets to it, still doesn't work, here's the xml form again,  just a basic message box with a send to field





















function fbht(htid)
{
var fbhtc=document.getElementById(htid);
if (fbhtc)
{
if (fbhtc.style.display == 'none')
{
fbhtc.style.display = 'inline';
}
else
{
fbhtc.style.display = 'none';
}
}
}

{/literal}
{$fb_form_header}
{if $fb_form_done == 1}
{* This first section is for displaying submission errors *}
{if isset($fb_submission_error) && $fb_submission_error}
{$fb_submission_error}
{if isset($fb_show_submission_errors) && $fb_show_submission_errors}


{foreach from=$fb_submission_error_list item=thisErr}
{$thisErr}
{/foreach}


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


{foreach from=$fb_form_validation_errors item=thisErr}
{$thisErr}
{/foreach}


{/if}
{if isset($captcha_error) && $captcha_error}
{$captcha_error}
{/if}

{* and now the form itself *}
{$fb_form_start}
{$fb_hidden}

{if $total_pages gt 1}{$title_page_x_of_y}{/if}
{foreach from=$fields item=entry}
{if $entry->display == 1}
{strip}
{if $entry->needs_div == 1}
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}
multiple_parts != 1} for="{$entry->input_id}"{/if}>{$entry->name}
{if $entry->required_symbol != ''}
{$entry->required_symbol}
{/if}

{/if}
{if $entry->multiple_parts == 1}
{section name=numloop loop=$entry->input}
{if $entry->label_parts == 1}
{$entry->input[numloop]->input} {$entry->input[numloop]->name}
{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->helptext != ''} field_helptext_id}')">
field_helptext_id}" style="display:none">{$entry->helptext}{/if}
{if $entry->valid == 0} <--- {$entry->error}{/if}
{if $entry->needs_div == 1}

{/if}
{/strip}
{/if}
{/foreach}
{if $has_captcha == 1}
{$graphic_captcha}{$title_captcha}
{$input_captcha}
{/if}
{$prev}{$submit}

{$fb_form_end}
{/if}
{$fb_form_footer}]]>































As I said before, I can include the {FormBuilder form='test'} into NCleanBlue template and it's fine, add it to my now stripped down own template and squat.

Once again, thanks all.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Tearing my hair our with form builder

Post by Rolf »

You always need to put one {content} tag in your template.
Put the {Formbuilder} tag in the content of the page.

Rolf  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
janb

Re: Tearing my hair our with form builder

Post by janb »

YES

Was about to write that Rolf.

Leave the template as it is with the {content} tag.
You can of course write your own template but place the form tag into a content page. In that way the form is within the {content} tag.

JanB
stealer
Forum Members
Forum Members
Posts: 16
Joined: Wed Mar 03, 2010 2:16 pm

Re: Tearing my hair our with form builder

Post by stealer »

Rolf wrote: You always need to put one {content} tag in your template.
Put the {Formbuilder} tag in the content of the page.

Rolf  :)
Thanks Rolf,

I stripped out everything to make the template more readable but you're right.  It now works but only if I have the tag {content assign=pagecontent} on my page.
stealer
Forum Members
Forum Members
Posts: 16
Joined: Wed Mar 03, 2010 2:16 pm

Re: Tearing my hair our with form builder

Post by stealer »

Actually it also works with just the {content} tag in place, but that also adds some old content from a previous test site.  Everyone, I can't thank you enough for all your help...It's true what they say, a 2nd, 3rd or even 4th pair of eyes really can help.
janb

Re: Tearing my hair our with form builder

Post by janb »

Glad you got it to work at last :)

Don't forget to add [Solved] to the subject..

JanB
Post Reply

Return to “Modules/Add-Ons”