Hi, I've searched the forum with no luck.
I have a
HTML page that has one form, but as of now would require two actions.
I'm using multiple text input fields that all have the same action (link to
php), but I also would like to have the option for the USER to add more 'textarea' fields with headlines of his liking.
I found
this neat solution for adding 'textarea' fields, but that has another action than I´m using.
And I would like to avoid having to split this page in two!
Here is a sample of what I´m currently working on:
- HTML: Select all
<FORM METHOD=POST ACTION="form_dyr.php" enctype="multipart/form-data">
<input type="text" name="form_a" /> //text field 1
<input type="text" name="form_b" /> //text field 2
<input type="radio" name="utrymingar1" value="A" /> // Radio button 1
<input type="radio" name="utrymingar2" value="B" /> // Radio button 2
<input type="radio" name="utrymingar3" value="C" /> // Radio button 3
<select name="select_fra" id="select_1"> // Menu select 1
<option>A</option>
<option>B</option>
<input type="file" name="mynd_dyr" id="mynd_dyr" accept="image/*" /> // File upload 1
And then here is the new action that has to be added (see also link above):
- HTML: Select all
<form method="post" action="/cgi-bin/show_params.cgi">
<span id="writeroot"></span>
<input type="button" id="moreFields" value="Give me more fields!" />
<input type="submit" value="Send form" />
</form>
Does anybody have a solution for these two actions?
The second action is dynamic (page doesn't reload) so running both actions trough a javascript might not be any help, or will it?
If there is a different approach for adding teaxt areas , please feel free to comment.