Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Jan 2011
    Location
    Ohio
    Posts
    113
    Plugin Contributions
    0

    red flag Auto-Populate product_name In A Form Field?

    Hi All,

    Building a store that is a "Showcase w/o prices", where the price of all products are custom quoted!

    I've created a page that has a "custom email form" with fields for the custom quote. The product info page has a button under the image that takes the customer to the quote form page.

    The "product_id" is displayed in the URL on the quote form page, but trying to directly relate that to the "product_name" and auto-populate that in the top form field!

    I hope I explained that correctly.....

    So.... ZC 1.3.9h with a custom template.

    Product Info Page Example (Design Quote Button under image)

    Custom Quote Form (When button is clicked from product info page)

    I seem to be able to easily echo the "products_id" on the form page, but would like to display the Product_name" that is related to the "product_id"!

    Probably something simple that I'm missing!

  2. #2
    Join Date
    Jan 2011
    Location
    Ohio
    Posts
    113
    Plugin Contributions
    0

    Default Re: Auto-Populate product_name In A Form Field

    Any Ideas on this one? Anyone?

    If it helps, the "custom quote button" is added to... and the "products_id" is gotten from....

    tpl_product_info_display.php

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Auto-Populate product_name In A Form Field

    zen_get_products_name(id)
    .

    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.

  4. #4
    Join Date
    Jan 2011
    Location
    Ohio
    Posts
    113
    Plugin Contributions
    0

    Default Re: Auto-Populate product_name In A Form Field

    Quote Originally Posted by DrByte View Post
    zen_get_products_name(id)
    Outstanding, DrByte! Thanks so much...

    A little variation, but worked like a charm!
    $designname = zen_get_products_name($_GET['products_id']);

    Thanks once again for your help!

 

 

Similar Threads

  1. Replies: 6
    Last Post: 24 Nov 2022, 08:51 PM
  2. v151 How to pre-populate hidden field in php email form?
    By frank18 in forum General Questions
    Replies: 3
    Last Post: 18 Nov 2013, 06:47 AM
  3. Auto Populate Qty
    By Voltron in forum General Questions
    Replies: 1
    Last Post: 29 Jun 2010, 07:56 PM
  4. Auto populate contact page.
    By Tors12 in forum General Questions
    Replies: 1
    Last Post: 10 Jan 2009, 11:52 AM
  5. Auto-Populate Referral Code Field from URL parameter?
    By expitrans in forum General Questions
    Replies: 0
    Last Post: 13 Nov 2008, 01:56 AM

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