How to make a text field box appear after clicking select option by using ajax? I have created a content type and with a field which is a select type and the options is:


Text 
Text area
File


Now, when I select text area option, then a text area box have to appear below the select field and same for text option also. And if a select file option, then a button should appear after the select field for file functionality. I heard this can be done by ajax, but don't know where to start and how to do it.
You can use the Conditional Fields module, which allows you to show/hide fields based on other field's values.
From the module description:

Conditional Fields allows you to manage sets of dependencies between fields. When a field is “dependent”, it will only be available for editing and displayed if the state of the “dependee” field matches the right condition.
When editing a node (or any other entity type that supports fields, like users and categories), the dependent fields are dynamically modified with the States API.
A simple use case would be defining a custom “Article teaser&quot; field that is shown only if a &quot;Has teaser&quot; checkbox is checked, but much more complex options are available.