/    Sign up×
Community /Pin to ProfileBookmark

make additional upload form fields appear

I have an upload form (which can be seen here: [url]http://kmkwebdevelopment.com/formtest/upload.php[/url]). There are currently 5 “upload” fields, and I would like to have it so that if a person requires more “upload” fields, they can click on a + sign or something and it will then show an additional “upload” field (so they can upload up to 20 files at a time).
The upload form works great, but I just don’t want to have 20 separate upload fields on the page at once. I would really like to integrate this into it: [url]http://www.maheshchari.com/multifile-upload/[/url] which allows you to click “add another” and then another “file upload” field is displayed, but I don’t know if I can integrate this Javascript solution into my current PHP form because how can you tell the submit button to do 2 different form actions at once? This is from my current PHP code:

[code=php]<form class=”uploadform” action=”<?php echo $_SERVER[“PHP_SELF”] ?>” method=”post” enctype=”multipart/form-data” onSubmit=”return CheckForm(this);”>[/code]

AND this is part of what I would have to integrate:

[code=php]<form action=”uploader.php” method=”post” enctype=”multipart/form-data” name=”mutiple_file_upload_form” id=”mutiple_file_upload_form”>[/code]

How are you supposed to tell the submit button to do both form actions??

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Captainkewl spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...