PDA

View Full Version : Customising forms.


pt
09-26-2006, 09:37 AM
Hi all,

I have created a simple form with all the required fiels i need, however i want to reorganise the files to imporve presentation.

I downloaded the form to my pc, moved the tages about carefully and resaved as ***.form as instructed. I uploaded using the filemanaged and then inserted the form onto the page . It showed and appears as i want, however despite the riginal form submitting ok, the modified one is not and i get the following error.

fopen fail home/public_html/sohoadmin/tem_content/.com

Any ideas?
it seems to be an error generated when i upload the modified file. I dont think ive altered any of the code in the form when inthe html editor.

Thanks

Bradnjxn
09-26-2006, 10:36 AM
Look at your code again...
Make sure the name of the form is removed from the beginning tag "<FORM NAME=...".
Just take out the "NAME=***.form" and leave the rest. If you haven't removed the hidden fields that SOho puts on your form do that as well.

<input type=hidden name=EMAILTO value="">
<input type=hidden name=PAGEREQUEST value="">
<input type=hidden name=DATABASE value="">
<input type=hidden name=PAGEGO value="">
<input type=hidden name=RESPONSEFROM value="">
<input type=hidden name=SUBJECTLINE value="** **">
<input type=hidden name=RESPONSEFILE value="">
<input type=hidden name=">

<input type=hidden name="" value="">

Upload it again and try it out.

stinkybunny
10-31-2006, 06:26 PM
Hi - Did someone figure this out? I'm trying to use pgm form thing on the side bar in the template structure rather than from the content page.
So the form lives here: / public_html / tarot / sohoadmin / program / modules / site_templates / pages /home.html

It's using this script to process the data: http://www.whitelighttarot.com/pgm-form_submit.php

And gives this error when you hit submit: fopen failed for /home/stinky3/public_html/tarot/sohoadmin/tmp_content/.con

I tried what was listed here - removing hidden calls and the name of the form. So far no good. Would love more suggestions. Thanks.

Mike Morrison
11-01-2006, 02:14 PM
You may need to pass the pr (page request) variable with your form as well. You'll probably have to hard-code a particular page name since you're just working with html, so like this...

<input type="hidden" name="pr" value="Home_Page">

Or even better you gould take advantage of the #PAGENAME# variable like so...
<input type="hidden" name="pr" value="#PAGENAME#">

stinkybunny
11-07-2006, 11:49 AM
Hi Mike,
thanks for the suggestion, but it still gave me the same error.
:hmm:
I have a CGI script that will pass the values (name, emailaddr) to a form mail, but I'm still trying to figure out how to enter the name, emailaddr values into the solaunch db. So far the SQL that I've added to the CGI generates an error.

And trying to connect the pgm-form_submit.php script gives me the fopen failed for /home/stinky3/public_html/tarot/sohoadmin/tmp_content/.con error. Well, wait there's more... I just tested it again and I got this This request to submit this form needs to be made by whitelighttarot.com. Please contact the webmaster if this is an error. So, is this good?
:hmm:
I'll keep you posted...


You may need to pass the pr (page request) variable with your form as well. You'll probably have to hard-code a particular page name since you're just working with html, so like this...

<input type="hidden" name="pr" value="Home_Page">

Or even better you gould take advantage of the #PAGENAME# variable like so...
<input type="hidden" name="pr" value="#PAGENAME#">

Mike Morrison
11-08-2006, 04:06 PM
Hi stinkybunny,

fopen failed for /home/stinky3/public_html/tarot/sohoadmin/tmp_content/.con
Looks like another symptom of not passing the $pr page request value effectively. Not sure exactly how to fix it with your particular script though (maybe post the code?).

This request to submit this form needs to be made by whitelighttarot.com. Please contact the webmaster if this is an error.
Don't know about "good". But definitely different. Wild guess: this has something to do with how your cgi script is connecting to pgm-form_submit. Again though, hard to tell without knowing your code.

stinkybunny
11-14-2006, 07:48 PM
Hi -
I got it to work! :ehheh:
In case anyone else is hard pressed to figure it out, here's what I did. I tried all sorts of stuff, sometimes it just takes me a while and the answer seems obvious when you hit upon it. Anyway, here's what I did.
I added the complete form to the sidebar including all that hidden stuff that soho generates.
<FORM NAME="newsletter_sign_up" METHOD=POST ACTION="http://yourdomainhere.com/pgm-form_submit.php">

And added css stuff to the table for formatting like so.
<TABLE ALIGN=LEFT BORDER=0
CELLPADDING=0 CELLSPACING=0 WIDTH=120
STYLE="font-family: Verdana; font-size:
7pt; width: 120px; border: 1px dashed
gray;">

And holy cow, it worked! :ghasp: I also managed to add a javascript pulldown menu for finding various stuff on the site.

the javascript pulldown sits in the same directory as the template structure. The links are handcoded into the javascript, but the pulldown menu works.

code bit examples: http://stinkybunny.com/4_sohos/
They're all text files. One is the form with css, one is the javascript for the pulldown menu, and one is the pulldown's html call that sits in the index sidebar.

One additional note is if you get an error that's something like this.
fopen failed for /home/public_html/sohoadmin/tmp_content/HOME_PAGE.con
try adding the parameters that Soholaunch automatically generates to your sidebar form and replacing everything before /sohoadmin/ with your domain name. Copy the form params in HOME_PAGE.con add to your form. Remove form from center. Then paste back into the HOME_PAGE.con so that your sidebar form will work.