Add Textfield depending on the input selected from dropdownfield

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

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: