Add Textfield depending on the input selected from dropdownfield

Hi all, How can I add text field depending on the input select from dropdownfield:

DropdownField::create(‘UpdateSignUp’, ‘Update Signup?’, array(1 => ‘Yes’, 0 => ‘No’), $this->UpdateSignUp);

so if user select yes, I want to add textbox field for email using ajax request.

It may be worth giving the display logic module a look… that handles conditional form fields: