Zen Cart Logo
Forums / All Other Contributions/Addons / custom forms - data collection

custom forms - data collection

Sticky

Views: 221,970

Results 21 to 40 of 259
14 Jul 2004, 8:15 AM
#21
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

custom forms - data collection

Mmm Very nice, getting there:

test page

14 Jul 2004, 8:26 AM
#22
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

Okay, followed all your instructions, page is there, looks good, now I just gotta test it and duplicate it for a slightly different form.

This is great, thanks so much. ::tup

14 Jul 2004, 8:31 AM
#23
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: custom forms - data collection

You can build in more checks, and can fully-utilize the language file by pulling the text out of the template and into the lang file using constants the same way it's doing it now.

You would do that for the error messages too from header_php.php and swap actual messages for constants.

Also, in the template file, in some places I used Zen functions, in other places I just used what you already had. You might want to continue using Zen functions, and maybe even put in more places where it auto-displays what the user had entered in case they get an error message.... by using the $_POST info... etc...

Hope it helps.

14 Jul 2004, 8:34 AM
#24
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

It's helped a lot, still a little intimidating but I'm looking at it, If I have any problems I'll be in touch.

You ROCK! Thanks again!

14 Jul 2004, 8:51 AM
#25
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: custom forms - data collection

waynerd:

It's helped a lot, still a little intimidating but I'm looking at it
Well, keep in mind that what you have there is the result of 2+ hours of coding, customizing, and testing, and it's not really done completely "right" (see previous post).... so, it's not something to take lightly.

However, it does do the job ... right within the store !

14 Jul 2004, 9:05 AM
#26
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

Yeah, I'm going through it very carefully trying to see everything that needs to be changed for the duplicate form, at this point I think I have it working, except for the header,..looking right now for what I missed.

14 Jul 2004, 9:22 AM
#27
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

Hey Doc, we have one minor problem,

Since I added the new pages/forms every page that is linked from the information box has a new header of Band Sign-Up, where do I go to fix this one? :huh:

14 Jul 2004, 9:52 AM
#28
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

Also Doc, I've tested the forms and don't get any messages saying either that the message was sent or that the message failed, i've tried both.

I didn't get a message after the forms were filled out properly.

Any thoughts on this??

Basically everything is there, just have to get the headers to work properly and the forms to send.

Thanks again for all the wicked help.

14 Jul 2004, 6:23 PM
#29
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

Any Ideas? I'm no php guru so I'm lost.

14 Jul 2004, 7:08 PM
#30
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: custom forms - data collection

waynerd:

Since I added the new pages/forms every page that is linked from the information box has a new header of Band Sign-Up, where do I go to fix this one?
You've changed the heading title somewhere you shouldn't have.

Search your languages/english.php for "Band Sign-Up" and see where you have it.

The only place you should have it is in something like this: define('BOX_INFORMATION_BAND_SIGNUP','Band Sign-Up');

14 Jul 2004, 7:10 PM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: custom forms - data collection

waynerd:

I've tested the forms and don't get any messages saying either that the message was sent or that the message failed, i've tried both.
Something's not right in your files.
I've tested it fine on a base v1.1.4 install here, and it works great.

Perhaps re-grabbing the "header_php.php" and making sure you have it complete would be a starting point.

14 Jul 2004, 7:13 PM
#32
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: custom forms - data collection

I did make one small edit to the header_php.php and tpl_band_signup_default.php files as posted ... just to change how the checkbox for terms and conditions was handled... there was a bug. To fix it on the second form you made, change the 'value="checked"' on your template to 'value="1"' instead.

15 Jul 2004, 1:06 AM
#33
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

DrByte:

You've changed the heading title somewhere you shouldn't have.

Search your languages/english.php for "Band Sign-Up" and see where you have it.

The only place you should have it is in something like this: define('BOX_INFORMATION_BAND_SIGNUP','Band Sign-Up');
Hey guys, so the only place in the english.php is shown like this, with the second additional form page listed below it. The odd thing is this says the same as the sidebox link but the header is showing as simply "band Sign-up :blink:

define('BOX_INFORMATION_BAND_SIGNUP', 'Band Sign-Up Form');
define('BOX_INFORMATION_ENDORSEMENTS', 'Band Endorsments Form');

15 Jul 2004, 1:25 AM
#34
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

DrByte:

I did make one small edit to the header_php.php and tpl_band_signup_default.php files as posted ... just to change how the checkbox for terms and conditions was handled... there was a bug. To fix it on the second form you made, change the 'value="checked"' on your template to 'value="1"' instead.
I've re-copied and uploaded both these files and all the others you posted, I'm still not having any luck with either of these two issues. ::frust

15 Jul 2004, 1:30 AM
#35
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

This is my modules/sideboxes/information.php this is the only file that looks a little odd to me but is the way you told me to set it up, is this right?

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                    |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers              |
// |                                   |
// | http://www.zen-cart.com/index.php                  |
// |                                   |
// | Portions Copyright (c) 2003 osCommerce                |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,    |
// | that is bundled with this package in the file LICENSE, and is    |
// | available through the world-wide-web at the following url:      |
// | http://www.zen-cart.com/license/2_0.txt.               |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to    |
// | [email][email protected][/email] so we can mail you a copy immediately.     |
// +----------------------------------------------------------------------+
// $Id: information.php,v 1.2 2004/01/13 15:28:17 wilt Exp $
//

 $information[] = '<a href="' . zen_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>';
 $information[] = '<a href="' . zen_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a>';
 $information[] = '<a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>';
 $information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>';
 $information[] = '<a href="' . zen_href_link(FILENAME_BAND_SIGNUP) . '">' . 'Band Signup Form' . '</a>';

 // only show GV FAQ when installed
 if (MODULE_ORDER_TOTAL_GV_STATUS=='true') {
  $information[] = '<a href="' . zen_href_link(FILENAME_GV_FAQ) . '">' . BOX_INFORMATION_GV . '</a>';
 }

 require($template->get_template_dir('tpl_information.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_information.php');

 $title = BOX_HEADING_INFORMATION;
 $left_corner = false;
 $right_corner = false;
 $right_arrow = false;
 $title_link = false;

 require($template->get_template_dir('tpl_box_default.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_box_default.php');
?>
15 Jul 2004, 5:55 AM
#36
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

I found a misnamed file that fixed the Band Sign-up header from displaying on all the extra pages, but now I get HEADING_TITLE as a header on the two new ones?

Where do I check for this one? :blink:

15 Jul 2004, 12:00 PM
#37
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: custom forms - data collection

The /includes/languages/english/YOURTEMPLATENAME/band_signup.php either doesn't exist or isn't being found. (HEADING_TITLE is defined there, as you'll see in the post of that file's contents earlier).

You could try just placing that file in /includes/languages/english instead.

15 Jul 2004, 9:02 PM
#38
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

This is the file both in my "custom" template directory and the main english directory.

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                   |
// +----------------------------------------------------------------------+
// | Copyright © 2003 The zen-cart developers             |
// |                                   |
// | http://www.zen-cart.com/index.php                  |
// |                                   |
// | Portions Copyright © 2003 osCommerce               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,   |
// | that is bundled with this package in the file LICENSE, and is    |
// | available through the world-wide-web at the following url:     |
// | http://www.zen-cart.com/license/2_0.txt.              |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to   |
// | [email][email protected][/email] so we can mail you a copy immediately.     |
// +----------------------------------------------------------------------+
// $Id: band_signup.php,v 1.0 2004/07/14 00:00:00 DrByteZen Exp $
//

define('HEADING_TITLE', 'Band Sign-Up');
define('NAVBAR_TITLE', 'Band Sign-Up');
define('TEXT_SUCCESS', 'Your message has been successfully sent.');
define('EMAIL_SUBJECT', 'Sign-up from Bionic Banana!');

define('ENTRY_NAME', 'Full Name:');
define('ENTRY_EMAIL', 'E-Mail Address:');
define('ENTRY_ENQUIRY', 'Message:');

define('SEND_TO_ADDRESS','[email protected]');
define('SIGN_US_UP','SIGN US UP!');
?>

still getting the same thing

15 Jul 2004, 9:20 PM
#39
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,611
Plugin Contributions:
0

Re: custom forms - data collection

Uh...Waynerd... is this what you have in the template?

$title = BOX_HEADING_INFORMATION;

and this is your define?

define('HEADING_TITLE', 'Band Sign-Up');

See the problem? :D

15 Jul 2004, 11:03 PM
#40
waynerd avatar

waynerd

New Zenner

Join Date:
Jun 2004
Posts:
45
Plugin Contributions:
0

Re: custom forms - data collection

Okay yes,
In my "information.php" the code is this:

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                    |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers              |
// |                                   |
// | http://www.zen-cart.com/index.php                  |
// |                                   |
// | Portions Copyright (c) 2003 osCommerce                |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,    |
// | that is bundled with this package in the file LICENSE, and is    |
// | available through the world-wide-web at the following url:      |
// | http://www.zen-cart.com/license/2_0.txt.               |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to    |
// | [email][email protected][/email] so we can mail you a copy immediately.     |
// +----------------------------------------------------------------------+
// $Id: information.php,v 1.2 2004/01/13 15:28:17 wilt Exp $
//

 $information[] = '<a href="' . zen_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>';
 $information[] = '<a href="' . zen_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a>';
 $information[] = '<a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>';
 $information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>';
 $information[] = '<a href="' . zen_href_link(FILENAME_BAND_SIGNUP) . '">' . 'Band Signup Form' . '</a>';
 $information[] = '<a href="' . zen_href_link(FILENAME_ENDORSEMENTS) . '">' . 'Band Endorsement Form' . '</a>';

 // only show GV FAQ when installed
 if (MODULE_ORDER_TOTAL_GV_STATUS=='true') {
  $information[] = '<a href="' . zen_href_link(FILENAME_GV_FAQ) . '">' . BOX_INFORMATION_GV . '</a>';
 }

 require($template->get_template_dir('tpl_information.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_information.php');

 $title = BOX_HEADING_INFORMATION;
 $left_corner = false;
 $right_corner = false;
 $right_arrow = false;
 $title_link = false;

 require($template->get_template_dir('tpl_box_default.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_box_default.php');
?>

I've tried to change the two variable to BOX_INFORMATION_BAND_Signup to match all the others but that did not work either.

Call me dumb (i'm getting used to it) but I can't see what I'm doing wrong.