Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SubmitForm Bug Fix (GET Method, Issue #217, Optional attribute) [travis-ci ERROR Itself] #362

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

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