ctkr 0 Newbie Poster

I am a beginner in the wonderful world of forms.

I have 2 Forms on the same website that web uses will vote for their favorite routines for the upcoming convention in one or both halls.

The forms work well by themselves. They submit the information to the thank you page and send the information via the text files to 3 email accounts.

The problems started to occur when I put both of them on the site. When I go into the ADVANCED VOTE LIST, after working on the intermediate list, it will return with the intermediate thank you page and intermeidate text files are sent to the email addresses. and vica versa...

Below I have listed:

- contents and directory structure for the ADV & INT files

- code in the corresponding form.cfg files

- code for my formprocessorpro.cfg


Thank you,
ctkr

----------------------------------------------------------------
ADVANCED HALL:

files in this folder/directory include:

advanced_hall.htm (vote list)
adv-thank-you.htm (thank you page)
error.htm
email_to_user1.txt
email_to_user2.txt
email_to_visitor.txt
form.cfg

CODE for form.cfg: ( - equals right & left carots )
-input type="hidden" name="base_path" value="../vote-
_browser_out = adv-thank-you.htm
_error_path = error.htm
_send_email1 = email_to_user1.txt
_send_email2 = email_to_user2.txt
_send_email3 = email_to_visitor.txt
#_out_file = adv-vote-logfile.txt
GMT_OFFSET = +2


----------------------------------------------------------------
INTERMEDIATE HALL:

files in this folder/directory include:

int_hall.htm (vote list)
int-thank-you.htm (thank you page)
error.htm
email_to_user1.txt
email_to_user2.txt
email_to_visitor.txt
form.cfg

CODE for form.cfg:
-input type="hidden" name="base_path" value="../vote/int-
_browser_out = int-thank-you.htm
_error_path = error.htm
_send_email1 = email_to_user1.txt
_send_email2 = email_to_user2.txt
_send_email3 = email_to_visitor.txt
#_out_file = int-vote-logfile.txt
GMT_OFFSET = +2

----------------------------------------------------------------------
CODE FOR formprocessorpro.cfg (located in cgi-bin)

# sendmail cmd
mail_cmd = /usr/sbin/sendmail -t

# smtp server. comment this line to use sendmail
mailserver = localhost

# list of referers
Referers =
Referers =
Referers =
Referers = localhost

# base path for first form.
base_path = ../vote/

# base path for second form.
# base_path = ../vote/int/

# path for attachments (relative to base_path).
# chmod 766 (write permission) this dir.
#attachments_path = attachments/
# attachments time to live on server (in seconds).
#attachments_ttl = 3600
# attachments max file size (in KB, 1024 for 1M)
#max_file_size = 512


#default mail format (this option is overrided for AOL as plain)
mail_format = plain


date_format = dd month yyyy #27 April 2003
#date_format = wee dd/mm/yy #Sun 27/04/03
#date_format = weekday mmm dd, yyyy #Sunday Apr 27, 2003

Dani AI

Generated

As described, the symptoms point to the form processor resolving template and redirect paths from the wrong place — so one form’s redirect page and email templates get used for the other form. That usually happens when the processor has a global base path or when the per-form override isn’t actually being passed or parsed.

Things to check and try:

  • Confirm the per-form override is being posted and spelled exactly as the processor expects (not commented out or malformed). A broken hidden field will not override a global setting.
  • Remove or neutralize any global base-path setting in the processor config while testing so each form must supply its own path. This isolates whether the processor default is the culprit.
  • Use absolute/fully qualified URLs for the browser redirect where possible, instead of relying on relative resolution. That avoids ambiguity when the processor picks a directory.
  • Give each form unique template and log filenames (email templates, logfile names). If names collide but paths resolve incorrectly, unique names make the mistake obvious and prevent cross-writing.
  • Check the processor’s referer whitelist and server logs. If referer checks block a directory the processor may fall back to the default path. Enable or inspect any debug/log mode the processor provides to see which folder and which template files it actually opened on each submit.
  • Clear the browser cache or test in a private window while debugging to rule out cached thank-you pages.

Extra notes: verify file permissions so the CGI can read each template, and apply changes one at a time so you can see what fixed the behavior. If the processor still returns the wrong templates after these steps, the processor’s debug trace or server error log will show the exact base-path and template filenames used on each submission.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.