I need help creating a dynamic drop-down form using JavaScript. The idea is to allow users to select the type of question they want to ask and then provide the necessary information based on their selection. For example, if they choose "Multiple Choice", they will be prompted to enter multiple answers, while if they choose "Short answer", they will only need to input one answer.
<!DOCTYPE html>
<html>
<head>
<title>Quick Bump</title>
<link href="styles.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div class="center">
<h1 class="welcomeHeader">Create a Question:</h1>
<form action="http://www.example.com/profile.php">
<p class="pStyle">Please select what type of Question you'd like to ask:
<br />
<br />
<input type="radio" name="genre" value="Multiple Choice" checked="checked" /> Multiple Choice
<input type="radio" name="genre" value="Select the Best" /> Select the Best
<input type="radio" name="genre" value="Short Answer" /> Short Answer
</p>
<br />
<p class="pStyle">What is your Question?
<br />
<br />
<label>Q:<input type="text" class="resizedTextBox" name="Question" /></label><br />
</p>
<br />
<p class="pStyle">What are the answers available?
<br />
<br />
<label>A:<input type="text" class="resizedTextBox" name="Answer 1" /></label><br />
<label>B:<input type="text" class="resizedTextBox" name="Answer 2" /></label><br />
<label>C:<input type="text" class="resizedTextBox" name="Answer 3" /></label><br />
<label>D:<input type="text" class="resizedTextBox" name="Answer 4" /></label><br />
</p>
<br />
<p class="pStyle">Would you like to submit this question now?</p>
<input type="submit" class="submitLink" name="submit form" value="Submit" />
</form>
</div>
<br />
<div class="footer">
<a href="firstWebPage.html" class="links">Home</a>
</div>
</body>