wrathican Posted June 22, 2008 Share Posted June 22, 2008 hey people. i have very limited knowledge of JS and what i have at the moment is an image upload form. i want to change this single image upload to a multiple image upload. in the form i have three 'box's'. i have a text input, file input and a textarea. the two inputs cannot be empty but the textarea can be. what i want to happen is that when the file input has been filled and the other input i want another set of these three 'box's' to be displayed. but i only want this to happen a maximum of five times so only five files are to be uploaded. i can check the form once but then i have no idea what to do/how to it next. so far i have gotten this far: function displayFields() { var name=form.name.value; var file=form.pic.value if ((name!="") && (file!="")) //i guess i show the extra fields here? } </script> Quote Link to comment https://forums.phpfreaks.com/topic/111333-javascript-function-to-show-extra-form-fields/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.