0

Is it possible to assign a type value to a Lightning button? For example, type="submit?

<lightning:button variant="base" label="Base" title="Base action" />

I have a submit button in a form, and default behavior for type="submit" is the form can be submitted on keyboard Enter. Can I add the type attribute to the component?

2

Yes, you can.

From specification:

Specifies the type of button. Valid values are button, reset, and submit. This value defaults to button.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.