It works fine in a modal, but my form is ajaxed in and I need to run a different js function when the Cancel button is clicked.
It looks like the only js option for the cancel button is to close a simple-modal.
Is there any other way to add a js function to the cancel button during form creation?
Thanks
line 3370 of form.php:
// and cancel button
if ($cancel_value || $cancel_url) {
if (!$cancel_value) {
$cancel_value = $_lang['jrCore'][2];
}
if ($cancel_url == 'referrer') {
$cancel_url = jrCore_get_local_referrer();
}
if ($cancel_url == '$.modal.close();') {
$html .= ' ';
}
elseif (jrCore_checktype($cancel_url, 'url')) {
$html .= ' ';
}
else {
$cancel_url = jrCore_get_last_history_url();
$html .= ' ';
}
What I want to be able to do is:
$cancel = "myModule_update_div();";
$_tmp = array(
'submit_value' => '13,
'cancel' => $cancel,
'values' => $_rt
);
jrCore_form_create($_tmp);
--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
updated by @ultrajam: 01/19/14 04:27:56PM