tags:

views:

46

answers:

1

I would like to create a dialog where I am asking the user about his language skills. the construction looks as follow:

  • form
  • input
  • select language input
  • select years of experiance
  • button(add new language) {or} button(submit)
  • /form

the problem I have is that I only can pass my values to my db after I have collected all information.

I could work with static forms and but I hope that there is an easier way which I did not figured out yet. I had a look into working with the loop function but I am running here in problems as well.

does someone has an idea on how to approach this problem?

A: 

Give each input a different name. You can use one form, one submission.

e.g. language1, language2, language1_years, language2_years

<select size="1" name="language1">
    <option value="english">english</option>
    <option value="spanish">spanish</option>
</select>

Number of Years:<input type="text" name="language1" />

<select size="1" name="language2">
    <option value="english">english</option>
    <option value="spanish">spanish</option>
</select>

Number of Years:<input type="text" name="language2" />

You can also add the button: Add more languages.. with a little JavaScript/Ajax.

Codex73