Greetings great sages
I have a question about form action using TT2 and FB.
Here's the details.
I have a an FB-based script using a TT2 template. The template sets the baseurl meta tag and creates the initial form using this instantion of an FB object
85 my $form = CGI::FormBuilder->new( 86 template => { 87 type=> 'TT2', 88 template => 'contact.tt', 89 variable => 'contact' }, 90 name => 'contactform', 91 id => 'contactform', 92 fields => \@formfields , 93 method => 'post', 94 );
If I use this, I get The requested URL /<scriptname> was not found on this server. error message because, upon form post, there is an attempt to load <baseurl>/<scriptname> and not <baseurl>/cgi/<scriptname>
I have also tried
Okay, I have to debug my script some, and I will be looking for something to help with automatic form submission and testing.
However, I have found that the form action as in 0 (accept FB's default) and 3 don't give the desired result of form post to the original form url. Method 2 gives the desired result, and I'm still out with the jury on method 1.
I can understand why method 3 fails. The scriptname is concatenated to the baseurl and this appears to be what happens with FB's default too.
I'm using method 2 because it works
I would like to know if there is a way to avoid mentioning the scriptname in the instantion of the FB object when using a directory structure on cgi scripts or would it be better to not have that directory structure? Is this the tradeoff?
In reply to Form action with TT2 and FB v3.03 by LesleyB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |