0

What I am trying to do is very similar to this question:
Using jQuery to dynamically add form fields (or fieldsets) based on a dropdown box value

Specifically, I want to use a drop down box value to add that number of input boxes to a fieldset.

I do not know jQuery so the answer I am linking to hasn't answered my question, I would like to know how to do this in JavaScript?

1 Answer 1

1

There are lots of instructions on how to use JQuery. I suggest that you go to http://docs.jquery.com to learn it rather than looking here for a specific answer to your question. Spending the time to figure it out for yourself will be far more useful than a copy-paste answer.

You'll follow some basic steps. Tackle each one individually.

  • Read the value from the drop-down when it changes.
  • Find the element to contain the new input boxes.
  • Loop through the number of values
  • Insert the appropriate HTML for each loop iteration.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.