Re: custom forms - data collection
I am trying to update one of text fields of the form to be a dropdown field populated with a result of my slq. I already asked couple days ago - http://www.zen-cart.com/forum/showthread.php?t=84820), but no suggestion yet, so I thought I would ask here.. This is what I have;
Code:
<?
$query = mysql_query("SELECT products_description.products_name'
. ' FROM products_description LEFT JOIN products_to_categories ON products_description.products_id = products_to_categories.products_id'
. ' WHERE (((products_to_categories.categories_id)=13))'
. ' ORDER BY products_description.products_name" );
$result = mysql_query ($query);
?>
<label class="inputLabel" for="band_name"><?php echo 'Select a Painting: '; ?></label>
<?php echo zen_draw_pull_down_menu('band_name', $result) . ' ' . (zen_not_null(ENTRY_REQUIRED_SYMBOL) ? '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>': '');?>
<br class="clearBoth" />
obviously I am missing something/lot (I tried different things by emulating my ASP code which I can work with), but no luck. I even tried to actually code in the values (since there will be only few at any given time), but even that did not work for me. Can some please give me help?
Thanks Veronika
Re: custom forms - data collection
Anyone have this working on 1.3.8a?
I just installed and it loads fine but when you click send it just refreshes the page and no mail is sent.
I need to create 3 custom forms for the same site so I would appreciate any advice/ tips or help.
Thanks in advance.
Re: custom forms - data collection
timed out!
Scrub my last request as I got it to work.
The problem was with the T and C's acceptance at the bottom of the page was commented out.
I removed it and now it works fine.
Re: custom forms - data collection
Bit of an update. I have everything working great except I need to add a dropdown selection.
What is the dropdown equivalent of a checkbox?
<?php echo zen_draw_checkbox_field('option1', 'Option 1', false, 'id="checkbox"');?>
Re: custom forms - data collection
OK, update again!
(once I get this working I'll post the results)
I got the pull down working but can only get it to use the manufacturers as an array (taken from the advanced search):
<?php echo zen_draw_pull_down_menu('bedrooms', zen_get_manufacturers(array(array('id' => '', 'text' => TEXT_PULLDOWN))), $sData['bedrooms']); ?>
Anyone know how I can point this to use another array besides the manufacturers?
Preferably one built in the header_php.php file with this mod.
Re: custom forms - data collection
I'm still stuck with this one.
Put simply I can get the pull down to display but it has no content.
I tried using the pull downs in advanced search and tried to adapt them, but nothing.
Anyone?
Re: custom forms - data collection
Hi
I have looked at your code and although I do not have a solution for you I altered the snippet to my requirements and it does work
Mine goes like this
<label class="inputLabel" for="book_category">Category:</label>
<?php echo zen_draw_pull_down_menu('book_category03', zen_get_categories(array(array('id' => '', 'text' => CATEGORY))), $sData['bedrooms']); ?>
My Categories do show up in the Drop down box for the User to select. The only Problem I have with this currently is that when I receive the Email with the Form Date I does not show the Category NAme but ID Nr i.e. 7 or 28 etc.
Any Idea how I can fix it
Other than that the Form works great and I have adjusted it to my needs with help from this forum and also looking at the specialorders example on the freshabundance.com site.
Regards
Manfred
Jeffreys Bay
Re: custom forms - data collection
Getting anything already built in, categories, manufacturers for example is no problem.
Getting a custom list, so far for me, is a problem.
Re: custom forms - data collection
Quote:
Originally Posted by
DrByte
The contact us form consists of the following files:
This one handles the layout, including all the fields you want to collect info for.
I'd take out the "SEND_TO_TEXT" one, and set the default like you do in your regular email form.
Then everything from "ENTRY_NAME" down to "ENTRY_ENQUIRY" would get replaced with your form.
This file checks for logic, errors, etc, and if OK, sends the message off to you, by joining all the fields together into the $message variable. It reads info from the form as $_POST['variable'] names.
This contains the display-text variables to be put into your template.
Is this useful fr me to research as a way of implementing this as a module?
Thanks
Glenn
Re: custom forms - data collection
Hi,
I was able to successfully install the band form on 1.3.8. I've customized it to how I wanted it. I'm having two problems though, they should be easy fixes. When Zen Cart attempts to give the success message it directs the user to a page that is non existent. Should I create an EZ page and direct it there? If so how can I do that?
Also, when I receive the email. Only 3 out of the 7 fields I am using are filled in. The customer name and email both show "Not logged in".
Oh, and one more thing. I didn't notice the question about what to replace ENTRY_REQUIRED_SYMBOL with if you dont need the customer to fill out that field get answered. Anybody have any instructions on what to do?
Thanks!