Page 24 of 26 FirstFirst ... 142223242526 LastLast
Results 231 to 240 of 259
  1. #231
    Join Date
    Feb 2008
    Location
    Allen, TX
    Posts
    29
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    So why do I have to reposition my form? I am not real happy with where it is. How do I get around that?

    I love Zencart... just sayin'

  2. #232
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: custom forms - data collection

    Quote Originally Posted by tiffbrink View Post
    So why do I have to reposition my form? I am not real happy with where it is. How do I get around that?
    You can't nest multiple <form> elements inside each other.
    You have to close one before you can open another.

    ie: This is bad:
    <form><form></form></form>

    this is good:
    <form></form><form></form>
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #233
    Join Date
    Feb 2008
    Location
    Allen, TX
    Posts
    29
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    I checked form in the source code but did not see any. I tried inserting an extra close form to be safe but still no luck. Is it invisible : ) a ghost in the machine?

  4. #234
    Join Date
    May 2011
    Posts
    67
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Quote Originally Posted by ladybugmom View Post
    I received an email back from the UPLOAD-POINT in regards to selecting only certain file extensions to be uploaded and this was his reply. I have not used it yet, but wanted to pass it on to those who wanted to used it.



    Code:
    In index.php after line 306 is: // Path from domain name to upload 
    directory and line 315 is: // Redirect to upload page. 
     
    Replace the current code between these lines with this: 
     
    $file_ext = basename($_FILES['ftp_file']['name']); 
    $ext = substr($file_ext, strrpos($file_ext, '.') + 1); 
    $upload_dir = ($_SERVER['DOCUMENT_ROOT'] . "/$fileupload_dir_name/"); 
    $target_path = $upload_dir . basename( $_FILES['ftp_file']['name']); 
    if (($ext == "ai") || ($ext == "eps") || ($ext == "psd") || ($ext == 
    "pdf") || ($ext == "png") || ($ext == "gif") || ($ext == "tif") || ($ext 
    == "rar") || ($ext == "7z") || ($ext == "zip")) { 
      if (move_uploaded_file($_FILES['ftp_file']['tmp_name'], $target_path)) { 
      chmod($upload_dir . basename( $_FILES['ftp_file']['name']), 0644); 
      echo $p."$l_upload13 ". basename( $_FILES['ftp_file']['name']). "$p2"; 
      } else { 
      echo $p."$l_upload14 ". basename( $_FILES['ftp_file']['name']). "$p2"; 
      } 
    } else { 
      echo $p."$l_upload14 ". basename( $_FILES['ftp_file']['name']). "$p2"; 
    } 
     
    The new line 311: 
    if (($ext == "ai") || ($ext == "eps") || ($ext == "psd") || ($ext == 
    "pdf") || ($ext == "png") || ($ext == "gif") || ($ext == "tif") || ($ext 
    == "rar") || ($ext == "7z") || ($ext == "zip")) { 
     
    is where you can add or remove file types. If you just want .jpg files 
    then it should be: 
    if (($ext == "jpg")) {



    This form's working great so far (many thanks to ladybugmom!). The only problem is when I tried limiting the type of file uploads.

    I did the above instructions. Here's how my code turned out:

    // Upload
    // Path from domain name to upload directory and line
    $file_ext = basename($_FILES['ftp_file']['name']);
    $ext = substr($file_ext, strrpos($file_ext, '.') + 1);
    $upload_dir = ($_SERVER['DOCUMENT_ROOT'] . "/$fileupload_dir_name/");
    $target_path = $upload_dir . basename( $_FILES['ftp_file']['name']);
    if (($ext == "jpg") || ($ext == "jpeg") || ($ext == "psd") || ($ext ==
    "pdf") || ($ext == "png") || ($ext == "gif") || ($ext == "tif") || ($ext
    == "cdr") || ($ext == "eps") || ($ext == "tiff") || ($ext == "bmp") || ($ext == "ai")) {
    if (move_uploaded_file($_FILES['ftp_file']['tmp_name'], $target_path)) {
    chmod($upload_dir . basename( $_FILES['ftp_file']['name']), 0644);
    echo $p."$l_upload13 ". basename( $_FILES['ftp_file']['name']). "$p2";
    } else {
    echo $p."$l_upload14 ". basename( $_FILES['ftp_file']['name']). "$p2";
    }
    } else {
    echo $p."$l_upload14 ". basename( $_FILES['ftp_file']['name']). "$p2";
    }
    // Redirect to upload page.



    But when I finished uploading an image, this message appeared briefly:

    Warning: basename() expects parameter 1 to be string, array given in /home/ncom2/public_html/imuniforms.com/upload/index.php on line 307

    Warning: basename() expects parameter 1 to be string, array given in /home/ncom2/public_html/imuniforms.com/upload/index.php on line 310

    Warning: basename() expects parameter 1 to be string, array given in /home/ncom2/public_html/imuniforms.com/upload/index.php on line 321
    There was a problem uploading

    Automatically redirecting to the Upload-Page

    -----------------------------------------------

    Uploading then failed. I have about zero knowledge of php. Can somebody enlighten me?

    It would be much appreciated!

    Grateful zencarter

  5. #235
    Join Date
    May 2011
    Posts
    67
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Scratch that, alternative in post 217 is much easier....guess I should read through all the posts before I go posting myself.

  6. #236
    Join Date
    Dec 2009
    Posts
    55
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    How can you add checkbox field and dropdown field to this?

  7. #237
    Join Date
    Dec 2009
    Posts
    55
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    If I did some reading and analyzing the code I would have not needed to post.


  8. #238
    Join Date
    Jul 2011
    Posts
    23
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    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.

  9. #239
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: custom forms - data collection

    Add another zen_mail() function call using the customer's email address instead of yours, and some different content of course.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #240
    Join Date
    Jul 2011
    Posts
    23
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Quote Originally Posted by DrByte View Post
    Add another zen_mail() function call using the customer's email address instead of yours, and some different content of course.
    Really its that simple? ok I'll give it a shot. Thanks Dr.Byte.

 

 
Page 24 of 26 FirstFirst ... 142223242526 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