data input screens

Codes here !

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 4
Joined: Tue May 22, 2012 6:32 pm

data input screens

Postby scristaldi » Tue May 22, 2012 6:53 pm

Building data input screen. Main screen would be customer screen where I enter customer
related data. Also on this screen are foreign key data entry, say 'services required'. How should
I deal with the problem a user could come upon when they want to enter data from a services
required field that is not currently in that table. Do they need to 'start over', go to 'services
required' table, enter needed data and then return to main data entry screen. Or is there a way to
add data to 'services table while entering data in customer table?

Thank in advance.

User avatar
php-forum Fan User
php-forum Fan User
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Re: data input screens

Postby Nullsig » Wed May 23, 2012 7:48 am

I would have to see the form to see the best way to handle it.

But the simplest way would be to try the insert. If it fails on the services required portion add the required fields for adding data to the other table to the form. Then re-render the form with the already submitted variables populated to the field so the user only has to enter the new data.

If the services required field is a free text field you could have an AJAX call that checks validity and on failure adds the fields for required data to your form.

The way I would handle this is have the services required listed as a drop down. Then I would add an "Other" option manually to the end of the drop down list. Using an Onchange event I would check to see if the other option was selected and then prompt the user to add the information for the new services required.

This last option makes sure that your users aren't frivolously adding services to the database due to poor spelling or laziness.

Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 3 guests