Jump to content

[SOLVED] Multi-part Form Upload


shazman

Recommended Posts

I am trying to create a form where I can upload desktop backgrounds to my site.

Since desktop backgrounds have a few different sizes, I want to make an upload field for each size but I don't want the fields to show up until the correct check box is checked.

 

Example:

I have a background in 800x600, 1024x768, and 1152x864 and I want to check those boxes and then have the upload fields show up underneath.

 

[c]800x600

[c]1024x768

[c]1152x864

[ ]1280x1024

[ ]1600x1200

 

[________________] [upload] 800x600

[________________] [upload] 1024x768

[________________] [upload] 1152x864

 

Did I explain this well enough or are people confused?

Link to comment
https://forums.phpfreaks.com/topic/111682-solved-multi-part-form-upload/
Share on other sites

This would be JavaScript.

 

If you have Prototype, you could use Toggle, which is very simple.

 


<a href="#" onclick="javascript:Toggle.display('elementid'); return false;">1024x768</a>

<input type="text" id="elementid" style="display:none" />

 

 

This hides the input field by default but when the link is clicked, Prototype (which is a JS framework) does the dirty work, and changes the element to be visible. Vice versa. Hides and shows.

 

 

Hope this helps

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.