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

custom forms - data collection

Sticky

Views: 221,970

Results 241 to 259 of 259
2 Feb 2012, 4:14 PM
#241
glitzsfa avatar

glitzsfa

New Zenner

Join Date:
Jan 2012
Location:
Fort Worth, Texas
Posts:
14
Plugin Contributions:
0

custom forms - data collection

Hey Jacque,

Your form looks awesome! I'm trying to create something similiar. I see your page is called like other EZ pages via "main_page=SOMETHINGHERE", but I don't really understand how that works. Is "specialorder" a physical file?

Also, do you write to the database? Do you only allow logged in users to submit?

Thanks

Paul

7 Feb 2012, 4:19 PM
#242
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: custom forms - data collection

I use code in this thread in conjunction with the About_Us mod in 139h and am wondering whether either needs to be upgarded for v150.

However, due to the diverse applications of the code and mod, I am not seeking any specific solution as yet, but rather am just enquiring into the issue.

TIA

9 Feb 2012, 9:06 PM
#243
clsmky avatar

clsmky

New Zenner

Join Date:
Jul 2011
Posts:
23
Plugin Contributions:
0

Re: custom forms - data collection

One more question

what zen string do I use to add a standard state dropdown field to my form?

9 Feb 2012, 9:19 PM
#244
clsmky avatar

clsmky

New Zenner

Join Date:
Jul 2011
Posts:
23
Plugin Contributions:
0

Re: custom forms - data collection

clsmky:

Ok sorry If I missed it, but I read this entire thread and couldnt find my answer.

Has anyone figured out how to send a confirmation email to the customer after the "you message has been sent" success page?

I have no complaints other than now I want to have a confirmation email sent. I'm using this for a physical catalog request (you can see it here) and I've got it to work perfectly. I get all the correct info and everything lands where its supposed to when its sent. It even checks if the patron is logged into the site to fill in some of the fields. Once the form is submitted, it goes to a page that states that the request has been sent. I would like it to send a confirmation email to the customer thanking them for their interest in the company and so on.

How do I do that? Just need to be pointed in the right direction is all.

I guess I should contribute to this thread since Dr. Byte was able to help me out so quickly.

under the header.php file for my form I added the following under the line that says

$email_html = nl2br($email_text);

This is my custom code:

//assemble customer email contents:
	  $customer_email_text = 
	    CUSTOMER_EMAIL_GREETING . '' . $full_name . ',' . "\n" .
	    "\n" .
		CUSTOMER_EMAIL_BODY_TEXT . "\n" .
		"\n" .
		CUSTOMER_EMAIL_BODY_QUESTIONS . "\n" .
		"\n" .
		CUSTOMER_EMAIL_BODY_THANKS . "\n\n" .
		
      $customer_email_text = zen_output_string_protected($customer_email_text);
      $customer_email_html = nl2br("\n" . $customer_email_text);

then after the line that starts with "zen_mail(STORE_NAME...." I added the following:

//send email to customer
      zen_mail($full_name, $email_address, CUSTOMER_EMAIL_SUBJECT, $customer_email_text, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS, array('EMAIL_MESSAGE_HTML' => $customer_email_html), 'catalog_req');

to my languages file I added:

define('CUSTOMER_EMAIL_GREETING','Hello ');
define('CUSTOMER_EMAIL_SUBJECT', 'Your Catalog is on its way!');
define('CUSTOMER_EMAIL_BODY_TEXT', 'Thank you for your interest in our company and its products. We will mail out a copy of our 2011 catalog for you today and you should be receiving it in a matter of a few days. ');
define('CUSTOMER_EMAIL_BODY_QUESTIONS', 'If you have any questions regarding our company or any of the products you see in the catalog or online, please feel free to contact us through this email address or call us toll free at <removed phone number>  .');
define('CUSTOMER_EMAIL_BODY_THANKS', 'Thanks again and have a great day!');

For the html email template (catalog_req) I simply made an html file that consists of a table containing our logo, information (just like a letterhead) and the $EMAIL_MESSAGE_HTML so that it would populate what is defined in the language files.

If you want to create or take a look at my files, I can send them to you through email. I dont want to post them here because I originally worked off of a TM file (per my boss) that I completely hacked and virtually started from scratch. So most of the code is for my custom template but I don't mind sharing with those that want it anyway.

20 Apr 2012, 1:25 PM
#245
ljdream00 avatar

ljdream00

Zen Follower

Join Date:
Jun 2007
Location:
Michigan
Posts:
168
Plugin Contributions:
0

Re: custom forms - data collection

:cool: WOW.... this 3 year old post, just MADE MY FREAKIN DAY:clap:

I was able to finally create my contact page with a Dropdown in the Subject Line and have it actually show up in the email correctly.
Thanks so much for posting. This COMPLETE THREAD HAS BEEN HEAVEN SENT!!

Actual Contact Page:

Attachment 10340

This is the Email Rendering after I hit the send button:
Attachment 10341

If you like the Event Date little dropdown, I found it on another Zen Thread, but the script can be found at http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm

OFFICIALLY TIME TO DONATE*
:lookarounBut Where in the World is the Donate Button Now... gotta find it, Not use to this new format yet LOL


cliffvt:

Diva hope you're good today!! Yes, you guessed it, today I am struggling with "pull_down menus" - implemented this suggested code, but on the form it displays a blank drop-down menu. If I leave all fields blank and then press "Submit" , as expected, it brings up errors for all the other fields, NOT the drop-down one, but viola!, the pulldown field is magically populated. Any ideas on what I am doing wrong here, seeing that you've mastered it?

here is my code:

HEADER_PHP:
TEMPLATE:
Any ideas at all?

Cheers

Cliff

20 Apr 2012, 2:38 PM
#246
clsmky avatar

clsmky

New Zenner

Join Date:
Jul 2011
Posts:
23
Plugin Contributions:
0

Re: custom forms - data collection

ljdream00:

:cool: WOW.... this 3 year old post, just MADE MY FREAKIN DAY:clap:

I was able to finally create my contact page with a Dropdown in the Subject Line and have it actually show up in the email correctly.
Thanks so much for posting. This COMPLETE THREAD HAS BEEN HEAVEN SENT!!

Actual Contact Page:

Attachment 10340

This is the Email Rendering after I hit the send button:
Attachment 10341

If you like the Event Date little dropdown, I found it on another Zen Thread, but the script can be found at http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm

OFFICIALLY TIME TO DONATE*
:lookarounBut Where in the World is the Donate Button Now... gotta find it, Not use to this new format yet LOL


I'm glad you were able to get your form up and running like you wanted. I threw my arms up in the air once I did it.

20 Apr 2012, 6:06 PM
#247
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: custom forms - data collection

I just use Appnitro's MachForm system and can create ANY form you care to mention (and embed it on my ZC sites) in under 3 minutes...

20 Apr 2012, 7:58 PM
#248
ljdream00 avatar

ljdream00

Zen Follower

Join Date:
Jun 2007
Location:
Michigan
Posts:
168
Plugin Contributions:
0

Re: custom forms - data collection

Thanks Schoolboy for that info. I will keep that in mind next time. I think I saw it mentioned in this thread when I was reading, but when they said it was a paid form, I quickly let that thought go.

20 Apr 2012, 8:02 PM
#249
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: custom forms - data collection

The software costs a few dollars. Think of the HOURS it takes to create one custom form in ZC... If you value your time at $30 / hour, how much have you spent?

21 Apr 2012, 8:50 PM
#250
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: custom forms - data collection

schoolboy:

The software costs a few dollars. Think of the HOURS it takes to create one custom form in ZC... If you value your time at $30 / hour, how much have you spent?

And factor in the fact that anyone building sites for clients for money should be able/willing to invest in tools to assist the site build process. There are serveral tools I have invested in to assist me in my efforts.. this sounds like another one I shall investigate investing in.. Saving my time is worth the investment IMHO..

23 Apr 2012, 9:42 PM
#251
ljdream00 avatar

ljdream00

Zen Follower

Join Date:
Jun 2007
Location:
Michigan
Posts:
168
Plugin Contributions:
0

Re: custom forms - data collection

Yep!!!
I took into consideration what schoolboy was saying which was the absolute TRUTH.
I actually went ahead and bought the unlimited version of MachForm.:blush:

24 Apr 2012, 8:14 AM
#252
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: custom forms - data collection

MachForm is one of our "lifesaver" additions. This week, we landed a contract where the site needed FIFTEEN CUSTOM FORMS. We had all the forms built, styled, configured, tested and embedded in under 20 minutes.

29 May 2012, 2:52 PM
#253
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: custom forms - data collection

schoolboy:

MachForm is one of our "lifesaver" additions. This week, we landed a contract where the site needed FIFTEEN CUSTOM FORMS. We had all the forms built, styled, configured, tested and embedded in under 20 minutes.

Hi Schoolboy

Have you used Machform to write data to a zencart mysql database?

Does Machform create the necessary tables and fields in a zencart mysql database, or must this be done separately?

TIA

29 May 2012, 3:39 PM
#254
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: custom forms - data collection

dw08gm:

Hi Schoolboy

Have you used Machform to write data to a zencart mysql database?

Does Machform create the necessary tables and fields in a zencart mysql database, or must this be done separately?

TIA

No, we have not tried to "merge" or "blend" the functions of MachForm to read/write to zencart tables/fields. While it MIGHT be possible, we have been content to use the forms purely as a means of collecting info that our sites' visitors need to communicate to us.

MachForm has its own database - so the data is stored, and can actually be "parsed" into a CSV of XLS file format.

There is an argument for the system having certain FUNCTIONAL limitations, for example... Such as when a person is logged into ZC, their name and email addresses will self-populate in the standard ZC contact_us form. Of course, this will not be recognised in the MachForm forms, because there is no "user login" feature for these forms.

But we don't mind about this... we have not yet had a need to look at "merging" or even "bridging" the databases.

21 Aug 2012, 9:08 PM
#255
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: custom forms - data collection

Is the following code, placed at the beginning of includes/modules/pages/myform/header_php.php, all that is needed to ensure a user is logged in before completing form:

  if (!$_SESSION['customer_id']) {
    $_SESSION['navigation']->set_snapshot();
    zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
  }

Thanks

3 Apr 2013, 12:00 PM
#256
whot avatar

whot

New Zenner

Join Date:
Oct 2012
Posts:
13
Plugin Contributions:
0

Re: custom forms - data collection

I have a fully working custom form to take bulk orders. However, I have hardcoded the dropdown for the products we have in our store. But it is becoming apparent that this is becoming a choir when we take items off the site as active. Is their a function built in zencart to auto populate the product array of products marked as instock only?

I found this function below that is used with country and manufacturers and want to know what needs to be enclosed in the parentheses to array the products.

zen_draw_pull_down_menu
10 Aug 2013, 10:31 PM
#257
lilleypadgifts avatar

lilleypadgifts

Totally Zenned

Join Date:
Jan 2007
Location:
Southern California
Posts:
550
Plugin Contributions:
0

Re: custom forms - data collection

Well, I think this is the place I want to be.... I need a Registration Form for my site. Not to be confused with a Customer Registration. I do fundraising, so I need a form for the Teams/Groups/Charities to register with my site and then I will manually add them to the list so that they are a option when customers are buying and choosing who to give their 20% to. I only need certain info and then for it to be emailed to me once completed. I thought about using a copy of Contact Us page, but I'm concerned I won't know where exactly to edit everything in every file and it will break my site which is almost completed. Again, this will have nothing to do with my actual customers who are there to buy and will register the usual way. Thanks! P.S. does anyone know why I have to type all in one paragraph now in this box instead of hitting return and going to a new line ? This is a recent issue and its driving me nuts! :-)

11 Aug 2013, 1:13 PM
#258
tinadad avatar

tinadad

New Zenner

Join Date:
Apr 2008
Posts:
39
Plugin Contributions:
0

Re: custom forms - data collection

What I finally did is to use an external form processor, on completion it simply sends the user to a link on Zen Cart. We are an Amateur Radio Organization and do membership apps, renewals and sometimes convention registrations. Works fine 3200 + transactions at this point.

Mel

19 Aug 2013, 12:32 AM
#259
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: custom forms - data collection

The purpose of this entire thread is to provide info on what is required to create a custom form for your site.. there is even a set of sample files to help you see how its done. You really will need to read through this thread if you want to tackle this task..> LilleyPadGifts:

Well, I think this is the place I want to be.... I need a Registration Form for my site. Not to be confused with a Customer Registration. I do fundraising, so I need a form for the Teams/Groups/Charities to register with my site and then I will manually add them to the list so that they are a option when customers are buying and choosing who to give their 20% to. I only need certain info and then for it to be emailed to me once completed. I thought about using a copy of Contact Us page, but I'm concerned I won't know where exactly to edit everything in every file and it will break my site which is almost completed. Again, this will have nothing to do with my actual customers who are there to buy and will register the usual way. Thanks! P.S. does anyone know why I have to type all in one paragraph now in this box instead of hitting return and going to a new line ? This is a recent issue and its driving me nuts! :-)