<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15450</bug_id>
          
          <creation_ts>2012-01-07 11:41:50 +0000</creation_ts>
          <short_desc>needed method to set &quot;current state&quot; of a form as the &quot;default state&quot;</short_desc>
          <delta_ts>2016-04-18 21:04:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Giorgio">giorgio.liscio</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>ian</cc>
    
    <cc>kornel</cc>
    
    <cc>lrosenth</cc>
    
    <cc>mackenzie</cc>
    
    <cc>mike</cc>
    
    <cc>plh</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
    
    <cc>travil</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62371</commentid>
    <comment_count>0</comment_count>
    <who name="Giorgio">giorgio.liscio</who>
    <bug_when>2012-01-07 11:41:50 +0000</bug_when>
    <thetext>my case is, briefly

&lt;form&gt;
    &lt;input name=&quot;aaa&quot; value=&quot;XXX&quot;&gt;
    &lt;input type=&quot;submit&quot; value=&quot;Save&quot;&gt;
    &lt;input type=&quot;reset&quot; value=&quot;Reset&quot;&gt;
&lt;/form&gt;

user changes value of &quot;aaa&quot; from XXX to YYY

in a &quot;web 1.0&quot; form the page will be reloaded and this is ok.

but in my case, this form will be sent by xhr,
then if &quot;save&quot; will be successful I have to loop manually over every data holder (texts, checkboxes, selects...) and set:

theinput.defaultValue = theinput.value;

otherwise the Reset button will reset the &quot;aaa&quot; value to &quot;XXX&quot;,
thats not what I want, because I&apos;ve saved the form.

so a form&apos;s interface method like

HTMLFormElement.setCurrentValuesAsDefaultValues();

would be really cool.

I hope this helps</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62435</commentid>
    <comment_count>1</comment_count>
    <who name="Kornel Lesinski">kornel</who>
    <bug_when>2012-01-09 22:30:40 +0000</bug_when>
    <thetext>I&apos;m curious what is your use case for including Reset button in the form? Is saving of entire form granular enough? 

If you&apos;re already using JavaScript to serialize the form, why not use that to restore previous values? Are there existing libraries (jQuery plugins, etc.) that solve this problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63622</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-02-03 06:28:48 +0000</bug_when>
    <thetext>I&apos;ve run into this too — in particular, Firefox seems very eager to fill in form fields and restore form control state even when they&apos;re not in &lt;form&gt;s, including button disabled states, etc, so that you can basically never guess when the page loads what state a form control is going to be in.

It&apos;s kinda annoying.

Not sure what to do about it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70097</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 06:53:49 +0000</bug_when>
    <thetext>This bug was cloned to create bug 17813 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81731</commentid>
    <comment_count>4</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2013-01-21 15:59:40 +0000</bug_when>
    <thetext>Mass move to &quot;HTML WG&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81849</commentid>
    <comment_count>5</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2013-01-21 16:02:26 +0000</bug_when>
    <thetext>Mass move to &quot;HTML WG&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125893</commentid>
    <comment_count>6</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2016-04-18 21:04:00 +0000</bug_when>
    <thetext>HTML5.1 Bugzilla Bug Triage: Incubation needed

This bug constitutes a request for a new feature of HTML. Our current guidelines, rather than track such requests as bugs or issues, is to create a proposal for the desired behavior, or at least a sketch of what is wanted (much of which is probably contained in this bug), and start the discussion/proposal in the WICG (https://www.w3.org/community/wicg/). As your idea gains interest and momentum, it may be brought back into HTML through the Intent to Migrate process (https://wicg.github.io/admin/intent-to-migrate.html).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>