3

I need add two action into submit button, I succeed on that but because I can't find correct function from API, there is two buttons. Like this

What i get

I want it like this:

Example working buttoin

What I have tried

form.addSubmitButton({ label: 'Action 1'});
form.addSubmitButton({ label: 'Action 2'});

And

form.addSubmitButton({ id : 'action', label: 'Action 1'});
form.addSubmitButton({ id : 'action', label: 'Action 2'});

And

form.addSubmitButton({ id: 'action1', label: 'Action 1'});
var test = form.addSubmitButton({ id: 'action2', label: 'Action 2'});
test.isHidden = true;
Evus
  • 400
  • 4
  • 12
  • Just a thought... Can you not have a single action that runs a function. Then in that function call your two different actions that you need to perform? – w3bguy Jul 07 '17 at 12:41

1 Answers1

0

Something that worked for me was adding the name attribute to each submit button using client script. That way when the user clicks it will send the name as a parameter.

Devela
  • 564
  • 1
  • 6
  • 25