I created cumstom module for seller registration in magento.
On email validation if email is already available…my form reloading with error email already available…
On that time my form whole value goes empty….
I need to know that how to repopulate data in fields on …error in magento..on form reloading…
my one line html is..
<li>
<label for="name" class="required"><em>*</em><?php echo $this->__('Enter Your Name') ?></label>
<div class="input-box">
<input type="text" name="vname" id="vname" value="" title="<?php echo $this->__('Enter Your Name') ?>" class="input-text required-entry" />
</div>
</li>
<li>
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
<div class="input-box">
<input type="text" name="email" id="email_address" value="" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
</div>
</li>
Best Answer
One way to accomplish this is to save the info to your session, take a look at Magento - Wiki - Custom Module with Custom Database Table
Note : Although this example is base off admin form it can be adjusted for any situation.
On error save to session
Display info in form