I am looking for a way to put the submit button of a form inside the header. I saw there was another similar topic in this form which made the button to just call the function which submit the form. But the problem is that the button does not check if the required input field of the form is blank.
So there a way to make the button in header behave the same as the submit button of a form?
I just found an ugly way taking hint from Calendee’s post above that first button is taken as submit button. @kurokocon – I had the same trouble with validation and this way it work with validation code too.
I wrapped the whole code in form element and place the right header button as submit button and it works. Like so…
@vintner that’s awesome I had no idea this was so easy. Is there a way to do this dynamically? I have two forms both in tab content. Right now after seeing this I just added two buttons on the right, and then show/hide them based on the currently selected tab index. Was thinking of something like form="ctrl.getActiveForm()" using the tab delegate, but not sure what to pass as it won’t work with a string.