Hello,
Consider following formButtons: formButtons: [{text: 'Cancel',action: function () {this.close();},},'Delete',],
Is there a way to show 'Delete' button only if a certain condition applies?
Hi @colin ,
That example doesn't seem to be working. 'Create' button is enabled all the time.
Is there a way I can reinitialise formButtons after the form has opened?
Hi @colin ,
That was helpful. I am going to trick you a bit more
What if there are two buttons and I want to hide only one. Please refer to this example.
If Office is empty, can I keep the 'Cancel' button and hide 'Update'?
Regards,
Harsha
Answers
Hi @hnhegde ,
My last example on this thread should help - it's not showing/hiding, but enabling/disabling, but the same principle would apply.
Cheers,
Colin
Hi @colin ,
That example doesn't seem to be working. 'Create' button is enabled all the time.
Is there a way I can reinitialise formButtons after the form has opened?
Regards,
Harsha
Hi @hnhegde ,
This was the example here - it disables the Edit's update button when the office field is empty (my description when a bit wonky on the other thread).
I modified it here so that in the same Edit scenario, it's removing the button. Hope that helps.
I don't believe so, the buttons are created when the form is opened.
Cheers,
Colin
Hi @colin ,
That was helpful. I am going to trick you a bit more
What if there are two buttons and I want to hide only one. Please refer to this example.
If Office is empty, can I keep the 'Cancel' button and hide 'Update'?
Regards,
Harsha
Yep, you can use a selector for that - see here.
C
That worked! Thanks @colin Much appreciate your quick response!
Regards,
Harsha