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

[Question] Save (autosubmit) the form on field changes #11

Closed
serkandurusoy opened this issue May 27, 2016 · 7 comments
Closed

[Question] Save (autosubmit) the form on field changes #11

serkandurusoy opened this issue May 27, 2016 · 7 comments
Assignees
Labels
Type: Feature New features and feature requests

Comments

@serkandurusoy
Copy link
Contributor

What would be the canonical way to automatically submit the form on any change on any field?

Basically, I want to achieve a "buttonless" form where all user changes automatically get validated and persisted.

@radekmie
Copy link
Contributor

That's an idea for new functionality. I'll do it asap.

@radekmie radekmie self-assigned this May 27, 2016
@serkandurusoy
Copy link
Contributor Author

Wow!!!

I was just tinkering with the idea (in my head tbh) for the past few days and thinking around extending the form and using the onchange event and the state changes within the lifecycle methods.

But it would just be plain awesome if you were to implement it natively.


On a not directly related, but somewhat accompanying note:

While at it, it would also be great if you could introduce a pristine prop for both the fields and the form, meaning, if a field value has not changed after the initial render, the field is pristine: true and if none of the fields of the form has yet changed, it woud be pristine: true for the form itself or even contain a list of fields that have changed.

that would allow for fine grained validation handling.

for example, one may not want the whole form to undergo validation before its first actual submit, and then all subsequent "changes" would rerun validation.

it would be much like https://github.com/aldeed/meteor-autoform#fine-tuning-validation

@radekmie
Copy link
Contributor

radekmie commented May 27, 2016

I've also released 1.0.0-rc.7 on npm.


As to the send note - I don't really get you idea of that pristine state, but your example sounds like validate="onChangeAfterSubmit" on ValidatedForm (and descendants), doesn't it?

@serkandurusoy
Copy link
Contributor Author

@radekmie this was quick! thank you very much.

should I open another issue to further discuss the pristine topic?

@radekmie
Copy link
Contributor

Go ahead.

@radekmie radekmie added the Type: Feature New features and feature requests label May 28, 2016
@radekmie radekmie reopened this May 30, 2016
@radekmie
Copy link
Contributor

It's fixed in 1.0.0-rc.9.

@serkandurusoy
Copy link
Contributor Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New features and feature requests
Projects
Archived in project
Development

No branches or pull requests

2 participants