CodeIgniter Forums
reset button not working in form posting - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: reset button not working in form posting (/showthread.php?tid=22939)



reset button not working in form posting - El Forum - 09-24-2009

[eluser]sheri.nust[/eluser]
Hey,

me using form

and inside form i am using reset button

Code:
<input type="reset" name="storeReset" value="reset" />

form tag is

Code:
<form action="<?=base_url();?>index.php/controller_store/store/index/register" method="post" name="storeForm" id="storeForm"  >

so the control goes to controller, and i did validation there, it works fine

Problem is before posting form ,
if I use reset button , it works,
but after form is being posted , i click reset button , it doesn't work.


for each element of form i am using

Code:
<input name="mark_down_price" type="text" id="mark_down_price"
value="<?=$this->input->post('mark_down_price')"/>



reset button not working in form posting - El Forum - 09-24-2009

[eluser]wabu[/eluser]
Hello, are you looking for a "clear" behavior instead of a reset?

If the form's just been posted and a reset button is clicked then the restored values are the initially specified ones (as set in the control's 'value' attribute). So it would appear that no change has occurred, but the reset would be working as designed.

For more info. see:

http://www.w3.org/TR/html401/interact/forms.html#h-17.2.1