Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6610517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:51:03+00:00 2026-05-25T19:51:03+00:00

I have a page with a form on it that the user visits to

  • 0

I have a page with a form on it that the user visits to fill in some info before he signs up for a profile. Underneath the form is a preview of what the profile will look like. I have some javascript so that as the user types into the boxes in the form, the corresponding bit of their profile fills with whatever they’re typing. IE they type into the ‘title’ form input and it will appear in the id=”title” div below.

In that form I also have a field so the user can upload a photograph. When the user chooses the pic he wants to upload and closes the dialog, I’d like a resized (so that it fits my max height/width requirements) image to also appear in the preview bit below the form. All this would happen before the profile form had been submitted.

Whats the best way to go about this? I’ve done a fair bit of googling and while there’s plenty of plugings they all seem to either do something far too complicated or miss something out. Can anyone please tell me the best way to handle this?

Thanks 🙂

If it makes any difference I’m using cakephp.

Side question – is there a way to make sure that when the choose file dialog opens, there is only the option to select image file types. IE all the .doc .xlt etc aren’t there?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:51:03+00:00Added an answer on May 25, 2026 at 7:51 pm

    As to your first question, you’ll have to upload the file. So you’d upload the image and store it in a temporary location that you can still stream back in an IMG element. When the user saves the form, you can then discard the temp image. You’ll probably also need some sort of cron/scheduled task that cleans them up if folks never save the information and just leave.

    As to your second question, nope. You can check it on the client after they have selected a file, but then I strongly recommend checking it again on the server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user form that is working perfectly. The page makes use of
I have a page which displays a form that a logged-in user can use
I have a page with a form that is submittes via ajaxSubmit() (so, without
I have a page with a form on it that needs to post to
I have a form page in PHP that reads a DBF, and conditionally converts
I have a form that when submitted successfully generates new elements on the page
I have a form that I don't render as part of HTML page but
I have got a form that posts values to a page in a wizard.
I have a html form that posts to a new page on submit. If
I have a page on a website that contains a secure form inside an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.