I developed a module to show an "End" button on the node edit form, and it works fine.
function renew_form_alter(&$form, &$form_state, $form_id) {
$form['actions']['property_endlease'] = array(
'#type' => 'submit',
'#value' => t('End'),
'#access' => TRUE,
'#weight' => 15,
);
return $form;
}
I want that, when users click on that button, some fields are changed from jQuery code.
I tried the following code, but it doesn't show any alert, even though the form is submitted.
jQuery('#edit-property-end').click(function (event) {
alert('');
});
I want to submit the form after the jQuery code is executed.
Does anybody have an idea on how to do this?
Thanks