spyzed
Member
I would like to add a button called "Save to draft" next to the Submit button.
Submit button will just do the submit action.
"Save to draft" will submit + change an element to = "YES"
I tried what is mentioned here:
http://fabrikar.com/forums/index.php?threads/add-custom-button-next-to-submit.46758/
I got the "Save to draft" button, able to save using that button, but the add on scripts just cannot work. Can anyone help? Thanks in advance!
Submit button will just do the submit action.
"Save to draft" will submit + change an element to = "YES"
I tried what is mentioned here:
http://fabrikar.com/forums/index.php?threads/add-custom-button-next-to-submit.46758/
I got the "Save to draft" button, able to save using that button, but the add on scripts just cannot work. Can anyone help? Thanks in advance!
JavaScript:
requirejs(['fab/fabrik'], function() {
Fabrik.addEvent('fabrik.form.submit', function (form, e, btn) {
if (btn.name === 'Submit For Approval') {
alert("Submit For Approval!");
form.formElements.get('1_abstract___ready_for_submission').update('YES');
}else{
alert("Testing...!");
}
});
});