Jump to content

Getting a query string into contact form textarea


Recommended Posts

I would like to pull a query string from an enquire button, which links to a contact form page and then put it into the message textarea of the contact form?

 

Any suggestions of how I can do this?

 

Example:---

 

The button sends this from a product page.

<a class="button" href="contact-form.php?id_product=1762">Enquire</a>

I then want to pull the product number into the message box with a surrounding sentance.

 

thanks

Link to comment
Share on other sites

  • 4 months later...

Hi,

try with

$yourvariable = Tools::getValue('Yourquerystring');

 

And assign it to smarty

self::$smarty->assign(array(
  'errors' => $this->errors,
  'email' => $test,
  'fileupload' => Configuration::get('PS_CUSTOMER_SERVICE_FILE_UPLOAD'),
  'yourvariable' => $yourvariable
 ));

 

Let me know!

Link to comment
Share on other sites

×
×
  • Create New...