Skip to content

Conversation

@Cow258
Copy link

@Cow258 Cow258 commented Apr 29, 2018

Fixed thing

  • GET method
    1. action attribute should be optional
    2. method attribute should be optional
    3. request.data should not repeat again after the end of the url query
  • POST method
    1. action attribute should be optional
    2. auto replace (self.location.pathname + self.location.search) when action attribute is empty
  • Support multipart/form-data for Issue Suggestion : enhance plugin with file upload support #217

GET method Issue Form tag HTML

<form id="form1" method="get">
    <input id="keyword" name="keyword" type="text" value="test"/>
    <input id="method" name="method" type="text" value="PlanA"/>
    <input id="ok" name="ok" type="submit" value="Submit">
</form>

Old Version

Url will be wrong!
smoothState will be crash!

https://localhost/undefined?keyword=test&ok=Submit&keyword=test&ok=Submit

New Version

Url will be correct!

https://localhost/?keyword=test&method=PlanA&ok=Submit

POST method Issue Form tag HTML

smoothState will be crash!

<form id="form1" method="post" enctype="multipart/form-data">
    <input id="keyword" name="keyword" type="text" value="test"/>
    <input id="method" name="method" type="text" value="PlanA"/>
    <input id="ok" name="ok" type="submit" value="Submit">
</form>

@Cow258 Cow258 changed the title SubmitForm Bug Fix (GET Method, Issue #217, Optional attribute ) SubmitForm Bug Fix (GET Method, Issue #217, Optional attribute) [travis-ci ERROR Itself] Apr 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant