Page 15 of 26 FirstFirst ... 5131415161725 ... LastLast
Results 141 to 150 of 259
  1. #141
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: custom forms - data collection

    Well I may have been confused by the array section of this code, but I understood enough of this post to figure out how to adapt the validation portion of this code for my own form's dropdowns..


    PHP Code:
    // do you want to set a default selection?  if not, use '0':
    $default_pulldown_selection '2';

    //For validation, you're looking for the contents of the $_POST['my_pulldown_menu'] variable
    // this is only set after "submit" is clicked.
    $pulldown_selected_item = (isset($_POST['my_pulldown_menu'])) ? $_POST['my_pulldown_menu'] : $default_pulldown_selection ;


    //build an array of entries to be displayed on the template:
        
    $pulldown_contents[] = array('id'=>'0''text'=>'Please Select');
        
    $pulldown_contents[] = array('id'=>'1''text'=>'Choice Number 1');
        
    $pulldown_contents[] = array('id'=>'2''text'=>'Choice Number 2');
        
    $pulldown_contents[] = array('id'=>'3''text'=>'Choice Number 3');
        
    $pulldown_contents[] = array('id'=>'4''text'=>'Choice Number 4');
        
    $pulldown_contents[] = array('id'=>'5''text'=>'Choice Number 5');


    // you could add some validation here.
    if ($pulldown_selected_item==0) { 
      
    $messageStack->add_session('header','Please select an option from the pulldown menu','error');

    From this I added the following to my own form handler:
    Code:
    if ($question4==0) { 
      $error = true;
      $messageStack->add('customer_questionnaire','Do you prefer virgin hair?: Please select an option from the pulldown menu');
    }  
    if ($question5==0) { 
      $error = true;
      $messageStack->add('customer_questionnaire','Have you had experience with premium hair?: Please select an option from the pulldown menu');
    }
    I've seen the question on how to add dropdowns in this thread a bit.. So I wanted to share what I did in case it is of use to someone else.

    Plus I also wanted to share the rest of the code posted here because someone with REAL coding skills might be able to use this information the way it's meant to be used..

  2. #142
    Join Date
    Jul 2009
    Posts
    21
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Hey I just downloaded the mode, and I have been trying to figure out what went wrong. Basically all I needed was the name, Email, mailing address, city, zip code and order description. Anyways, I have went thru the tpl_Band_signup_default,php file and removed all the code that gathered information I didnt need. Well, then for my page (Local Orders) using EZ pages I have set up "index.php?main_page=band_signup"

    Well the form shows up on that page, when I fill it up though it shos me whole bunch of errors about the required fields I have st up. Bascially why does it still follow those fields if i deleted them and how can I fix this problem?

    Also, why this band mode doesnt show up in "define pages"??



    thanks!

    here is the link:
    http://www.stephenmendenhall.com/del...ge=band_signup

    PS O also dont need terms and conditions..

  3. #143
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: custom forms - data collection

    Quote Originally Posted by Orange Wacko View Post
    Hey I just downloaded the mode, and I have been trying to figure out what went wrong. Basically all I needed was the name, Email, mailing address, city, zip code and order description. Anyways, I have went thru the tpl_Band_signup_default,php file and removed all the code that gathered information I didnt need. Well, then for my page (Local Orders) using EZ pages I have set up "index.php?main_page=band_signup"

    Well the form shows up on that page, when I fill it up though it shos me whole bunch of errors about the required fields I have st up. Bascially why does it still follow those fields if i deleted them and how can I fix this problem?

    Also, why this band mode doesnt show up in "define pages"??



    thanks!

    here is the link:
    http://www.stephenmendenhall.com/del...ge=band_signup

    PS O also dont need terms and conditions..
    You removed the fields form the form, but failed to remove corresponding validation entries from the form handler script.. (hence the errors)

  4. #144
    Join Date
    Jul 2009
    Posts
    21
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Okay I figured out that i need to look at header_php.php and try to find whatever fields I have removed. But my other question is how is it possible to actually add content to the band form? You know I though that it was possible with Define Pages from admin, but my panel doesn't show define band_signup.

    All i want is to put some description and few pictures that will go with this form, and obviously make it work))

    thanks

  5. #145
    Join Date
    Jul 2009
    Posts
    21
    Plugin Contributions
    0

    Default HELP PLZ!!! on the last PART

    Okay I am on red DEADline .. ehh Please help me with the last part, prolly (I hope the easiest)-customization..

    I got the form working! The link below. All I need now is to be able to add additional content to the form page. I want to know what I have to do to use the Define Pages feature. Because I DO NOT see my band_signup mod anywhere in admin, it doesnt show up.. I just want to put a short guides on how to fill my form and put 3 screenshots of the Local Orders deals.

    I thought my admin would recognize this additional mode and see it in the Define Pages Editor, i guess not?

    Appreciate any help

    http://www.stephenmendenhall.com/del...ge=band_signup


  6. #146
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: HELP PLZ!!! on the last PART

    Quote Originally Posted by Orange Wacko View Post
    Okay I am on red DEADline .. ehh Please help me with the last part, prolly (I hope the easiest)-customization..

    I got the form working! The link below. All I need now is to be able to add additional content to the form page. I want to know what I have to do to use the Define Pages feature. Because I DO NOT see my band_signup mod anywhere in admin, it doesnt show up.. I just want to put a short guides on how to fill my form and put 3 screenshots of the Local Orders deals.

    I thought my admin would recognize this additional mode and see it in the Define Pages Editor, i guess not?

    Appreciate any help

    http://www.stephenmendenhall.com/del...ge=band_signup

    Add the content you want to the form you created.. Also, you might consider changing the name of the form to something other than band_signup (since it is not in fact a band signup form..)

  7. #147
    Join Date
    Jul 2009
    Posts
    103
    Plugin Contributions
    0

    Default Re: HELP PLZ!!! on the last PART

    Hello All

    I used the "specialorder" template together with the suggested CAPTCHA code and built a stunning form, but alas, it wouldn't work, not even getting to the breadcrumb!. After hours of painstaking work, I found the error to be in the CAPTCHA code at the beginning of header_php - the code suggested in this post to use is:
    Just after: ["require(DIR_WS_MODULES . 'require_languages.php');"
    $breadcrumb->add(NAVBAR_TITLE);]
    // BOF Captcha
    if(CAPTCHA_CONTACT_US != 'false') {
    require(DIR_WS_CLASSES . 'captcha.php');
    $captcha = new captcha();
    }
    // EOF Captcha
    When I comment this whole piece out, my form works like a dream. Anyone have any idea what's wrong with the CAPTCHA code?

    Cheers

    Cliff

  8. #148
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: HELP PLZ!!! on the last PART

    Quote Originally Posted by cliffvt View Post
    Hello All

    I used the "specialorder" template together with the suggested CAPTCHA code and built a stunning form, but alas, it wouldn't work, not even getting to the breadcrumb!. After hours of painstaking work, I found the error to be in the CAPTCHA code at the beginning of header_php - the code suggested in this post to use is:
    When I comment this whole piece out, my form works like a dream. Anyone have any idea what's wrong with the CAPTCHA code?

    Cheers

    Cliff
    Not trying to be a smart a$$, but you should clarify what you mean by "it wouldn't work". What didn't work?? the whole form?? just the CAPTCHA?? Both??

    That said the only thing that stands out for me in your post is this (highlighted in red):
    Just after: ["require(DIR_WS_MODULES . 'require_languages.php');"
    $breadcrumb->add(NAVBAR_TITLE);]
    // BOF Captcha
    if(CAPTCHA_CONTACT_US != 'false') {
    require(DIR_WS_CLASSES . 'captcha.php');
    $captcha = new captcha();
    }
    // EOF Captcha
    If the characters I highlighted are in your header_php.php code, then that is DEFINITELY an issue..

    Here's the code from in my original post. Those lines in your header_php.php should look like this:
    Code:
      require(DIR_WS_MODULES . 'require_languages.php');
      $breadcrumb->add(NAVBAR_TITLE);
    Hope that helps..
    Last edited by DivaVocals; 13 Aug 2009 at 05:07 PM.

  9. #149
    Join Date
    Jul 2009
    Posts
    103
    Plugin Contributions
    0

    Default Re: HELP PLZ!!! on the last PART

    Sorry, I should learn to express myself properly!

    What I meant is that the form fails to load completely - I just get presented with a completely blank screen, and even when I select "View Source" from my browser, it's completely blank. As soon as I comment out the Captcha script, the form loads and validates fine upon submission.

    The "[" brackets in my post was just to indicate where I pasted the captcha code after. The actual code in the PHP is correct.

    However, since my post I've realised that I don't have any captcha installed - I just assumed that it was part of the standard Zencart install. I have now downloaded "captcha_using_ttf_gd_2-9.zip" and am in the process of installing this. I suspect that this may fix the problem. Will let you know if it doesn't.

    Thanks for responding though - much appreciated.

    Cliff

  10. #150
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: custom forms - data collection

    Quote Originally Posted by cliffvt View Post
    Sorry, I should learn to express myself properly!

    What I meant is that the form fails to load completely - I just get presented with a completely blank screen, and even when I select "View Source" from my browser, it's completely blank. As soon as I comment out the Captcha script, the form loads and validates fine upon submission.

    The "[" brackets in my post was just to indicate where I pasted the captcha code after. The actual code in the PHP is correct.

    However, since my post I've realised that I don't have any captcha installed - I just assumed that it was part of the standard Zencart install. I have now downloaded "captcha_using_ttf_gd_2-9.zip" and am in the process of installing this. I suspect that this may fix the problem. Will let you know if it doesn't.

    Thanks for responding though - much appreciated.

    Cliff
    I should learn to express myself too.. It never ocurred to me to ask if you had the CAPTCHA add-on installed.. (duh!)

    I believe in my post on how to add the CAPTCHA code I included a linkto the add-on too, but lemme go look.. I may need to re-post and clarify things a bit..

    As soon as you install the CAPTCHA add-on, life should be good for you again! Would love to see the final result!

 

 
Page 15 of 26 FirstFirst ... 5131415161725 ... LastLast

Similar Threads

  1. custom survey forms
    By cpk in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 2 May 2011, 05:07 PM
  2. Custom Forms
    By wwiii in forum General Questions
    Replies: 3
    Last Post: 11 May 2009, 05:51 PM
  3. Customer's seeing other users' data in forms
    By erikcw in forum General Questions
    Replies: 5
    Last Post: 30 Jan 2008, 11:30 PM
  4. Custom Collection of Attribute Data
    By Fastcar in forum General Questions
    Replies: 0
    Last Post: 15 Jan 2008, 01:01 PM
  5. Custom Forms - Help?
    By TurtleDove in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 9 Jun 2006, 02:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR