Element Visibility and FormInDialogue

Is there a syntax available to make an element on a form invisible AFTER having displayed a FormInDialogue?

I have a method which calls a string of existing methods ending in display of an existing form in FID. With this particular method I want to hide a particular button.

This code does NOT work:

				forms.peoDetails.newCR_BTN(); // calls a FormInDialogue
				forms.crNewCR.elements.cancel_btn.visible = false;

Answering my own question. This works:

				forms.crNewCR.elements.cancel_btn.visible = false;
				forms.peoDetails.newCR_BTN(); // calls a FormInDialogue