Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ProxiBlue committed Jul 30, 2015
1 parent 9b06175 commit 48fd8f0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,18 @@ Contact Us Captcha

<?php echo $this->getChildHtml('recaptcha'); ?>

Unfortunately magento core templates do not accomodate reloading teh posted form data, back into the contacts form.
Unfortunately magento core templates do not accomodate reloading the posted form data.
This means that if the captcha was incorrect, the user will be given a new blank form.
This is obviously not ideal.
Obviously not ideal.

The captcha extension places the form data into the customer session, aptly named formdata, using the following line of code
The captcha extension places the form data into the customer session, aptly named 'formData', using the following lines of code

$data = $controller->getRequest()->getPost();
Mage::getSingleton('customer/session')->setFormData($data);

You can re-populate the form data using the information stored in the session. This will require you to make changes to the form.phtml file. It is really up to you, how you will retrieve the session data, and use it.
You can re-populate the form data using the information stored in the session.
This will require you to make some changes to the form.phtml file.
It is really up to you how you will retrieve and use the session data.
As an example, you can do this at the top of the template form.phtml:

$formData = new Varien_Object();
Expand Down

0 comments on commit 48fd8f0

Please sign in to comment.