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

Submit button field #26

Merged
merged 2 commits into from
Aug 8, 2016
Merged

Submit button field #26

merged 2 commits into from
Aug 8, 2016

Conversation

icebob
Copy link
Member

@icebob icebob commented Aug 8, 2016

Issue: #22

Sample schema:

        {
            type: "submit",
            label: "",
            caption: "Submit form",
            validateBeforeSubmit: true,
            onSubmit(model, schema) {
                console.log("Form submitted!", model);
                alert("Form submitted!");
            }
        }

@coveralls
Copy link

coveralls commented Aug 8, 2016

Coverage Status

Coverage increased (+0.2%) to 87.245% when pulling 7b575c3 on submit-field into 912b833 on master.

@icebob icebob merged commit be71007 into master Aug 8, 2016
@icebob icebob deleted the submit-field branch August 8, 2016 13:37
This was referenced Aug 8, 2016
@mel-florance
Copy link

Awesome, i can't wait to use it ! Thanks !

@icebob
Copy link
Member Author

icebob commented Aug 8, 2016

You're welcome. Fiddle example: https://jsfiddle.net/icebob/vb2gf4dz/

@Isomorpheus
Copy link

Isomorpheus commented Jun 9, 2017

How do I call a method from the submit button?

I tried this:

{ type: "submit", label: "Submit", validateBeforeSubmit: true, onSubmit(model, schema) { this.testmeth() console.log("Form submitted!", model) }

with method:

testmeth: function() { console.log('test') }

but I get this error in the console:

App.vue?9074:133 Uncaught TypeError: this.testmeth is not a function

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.

4 participants