|
| |||||||
![]() | Welcome to iWEBTOOL Talk, where you talk about
webmaster-related stuff.
1 Register
2 Browse the board
3 Discuss whatever may interest you! | |||||||||||||
![]() |
| | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| Junior Member Join Date: Apr 2007
Posts: 92
![]() | I'm going a little nuts over this. I'm creating a form for people to enter comments. The issue I'm having is when someone clicks the submit button and a required field isn't filled out, all the fields reset. I looked into sticky forms, and I finally got them not to reset, now the only problem I'm having is they after everything is submitted, the fields don't reset. I just need a happy medium. If they miss a required field, keep the data intact, if they fill in everything, reset the form. I can't find an answer, someone please help. Thanks! PHP Code:
__________________ Build Your Web Presence Last edited 04-09-2008 at 08:26 PM. Reason: adding code |
| | |
|
| |||||||
| | #2 |
| Smurf Join Date: Mar 2008
Posts: 20
![]() | It isn't really bad if the fields don't reset. It happens on a lot of sites, and is a lot less annoying than the fields actually resetting. Without even reading your code, I can tell you to just put an if statement around the code that fills in the fields PHP Code:
__________________ A passion for learning and a motivation to share the knowledge you obtain will make you truly understand what font your site's text should be. Seriously, help me. |
| | |
| | #3 | |
| Smurf | Alternatively, you could get into the habit of laying out all the different stages of the form processing clearly and distinctly so as to make your life a lot easier, especially for when your forms get more complex. Another benefit of going with this altered structure is that you can use the same page for adding new records and updating existing ones. Also, excuse me if I have totally gone over the top on the answer, my feeling is that bad form processing gives PHP a bad name, too many security problems et al. Quote:
| |
| | |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Where can I purchase a sticky?? | pc_s | Help and Support | 8 | 11-28-2007 11:28 PM |
| When do top sites rankings reset | buldozerceto | Help and Support | 1 | 11-04-2007 09:02 PM |
| Sticky Link Territory-Bidding Directory | Sticky | Advertise your website | 0 | 09-24-2007 08:08 AM |
| Sticky sites, traffic and Google's algo | jfranktoo | 5 | 07-03-2007 06:31 PM | |
| Suggest of New Section which is sticky also. | davidcheong | Suggestions & Feedback | 0 | 03-11-2007 04:57 PM |