See Announcements
requirejs(['fab/fabrik'], function() {
Fabrik.addEvent('fabrik.form.submit', function (form, e, btn) {
if (btn.name === 'Submit For Approval') {
form.formElements.get('yourtable___yourelement').update('1');
}
});
});
<?php
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<?php
if ($d->formModel->getId() == 29) {
?>
<button type="submit" class="btn btn-primary button save" name="Submit For Approval">Submit For Approval</button>
<?php
}
?>
requirejs(['fab/fabrik'], function () {
Fabrik.addEvent('fabrik.form.loaded', function (form) {
// disable the Submit button on form load
form._getButton('Route To Manager').style.display="none";
//form._getButton('Route for App_Imp').style.display="none";
//form._getButton('Submit').style.display="none";
});
});
requirejs(['fab/fabrik'], function () {
Fabrik.addEvent('fabrik.form.loaded', function (form) {
// disable the Submit button on form load
var rtm = form_147.formElements.get('itr_2___route_to_manager_flag').getValue();
if (rtm === '1') {
form._getButton('Route To Manager').style.display="none";
}
//form._getButton('Route for App_Imp').style.display="none";
//form._getButton('Submit').style.display="none";
});
});
if (this.getValue() === '1') {
this.form._getButton('Route To Manager').style.display="none";
}