Button for changing a field's value, save and close the form
Posted: 05 Dec 2019
Hello !
I have an issue form, and I want to add a button "Close the case", a button that changes the value of the "Status" field, do some other things, saves and closes the form.
I added a button, added this code in OnClick :
fd.field('Status').value('RĂ©solu');
fd.save().click();
But it doesn't work.
It sets the status value well, and refreshes the form.
But :
_ The form is still open.
_ And if I close the form (just close, with the little red cross in the top right corner of the form box), it appears the Status field's value is always the previous value ! So the submission doesn't work.
Can you help me ?
Thank you in advance !
I have an issue form, and I want to add a button "Close the case", a button that changes the value of the "Status" field, do some other things, saves and closes the form.
I added a button, added this code in OnClick :
fd.field('Status').value('RĂ©solu');
fd.save().click();
But it doesn't work.
It sets the status value well, and refreshes the form.
But :
_ The form is still open.
_ And if I close the form (just close, with the little red cross in the top right corner of the form box), it appears the Status field's value is always the previous value ! So the submission doesn't work.
Can you help me ?
Thank you in advance !