framework7io / framework7io/framework7

Submit Button-Value is not submitted on ajax-form-submit

Open
#1,223 7 comments 0 reactions 1 assignee View on GitHub

@nolimits4web is already working on this.

Since Mar 12, 2017.

Bug confirmed Feature Request Need Details
Dominant language
JavaScript
Stars
18.8k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • Framework7 Version: 1.5

  • Platform and Target: Android/iOS

I have a form with class="ajax-submit" and a submit button with a name and a value. The name-value pair of the submit button is not sent as it would be on a normal form-submit. If a submit-button is pressed, the value of that button should be submitted. If the form is submitted in another way like pressing "enter", the value of the first submit-button should be used.

I even display the page after the submit - it would be nice, if there would be a special class name for doing something like that automatically:

myApp.onPageInit('*', function(){
	$('form.ajax-submit').on('submitted', function (e) {
		mainView.router.loadContent(e.detail.data);
	});
});

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.