Leave field contents after save

A place for users and developers of the Xataface to discuss and receive support.

Leave field contents after save

Postby kedikatt » Sun Dec 25, 2011 6:35 am

User enters a serial number in a field. Then selects items in other fields. Saves record. But then the user needs to enter new items for the same serial number. I would like to have the serial number field not clear after a record save, unless the user actually enters new data in the field.
Is there a method to select certain fields to isolate them from refreshing?

My first effort with Xataface. Not going too badly. A simple database to start.
kedikatt
 
Posts: 18
Joined: Sun Dec 25, 2011 6:25 am

Re: Leave field contents after save

Postby dmdqlett » Tue Dec 27, 2011 6:38 am

still no one reply this issure .
dmdqlett
 
Posts: 1
Joined: Tue Dec 27, 2011 3:43 am

Re: Leave field contents after save

Postby ADobkin » Tue Dec 27, 2011 7:21 am

Are you saying that the user is updating the existing record with that same serial number, or are they creating a new record with the same serial number?
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA

Re: Leave field contents after save

Postby shannah » Tue Dec 27, 2011 11:34 am

There's a few ways to tackle this problem.

1. Use cookies and javascript to prefill the serial number field on page load.
2. Use session variables to store the last serial number then prefill on new form (using the fieldname__default() method).
3. Normalize the data structure so you don't have to repeat this over and over. E.g. just one one record for the serial number, then create a relationship to the records that are related to this main record - and add to that relationship using either the grid widget or the standard add related record form.
4. Create a custom action with a custom javascript form that works the way you want.

Since I don't know the specs of you're app I can't really say which solution would work best in your case.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Leave field contents after save

Postby kedikatt » Tue Dec 27, 2011 11:38 am

A new record with the same serial number. Of course it would be nicer to have one input session per serial number, but that would be a complex, big form. There is a wide variety of data to input and it is done while actively operating and observing the system that produces the data. I have droplists and checkboxes to minimize effort for all but the serial number input.
I would just like the serial number field to retain the value, till new data is actually entered via keyboard.
kedikatt
 
Posts: 18
Joined: Sun Dec 25, 2011 6:25 am

Re: Leave field contents after save

Postby kedikatt » Tue Dec 27, 2011 11:39 am

Thanks. You replied as I was writing. I think I will try option 2.
kedikatt
 
Posts: 18
Joined: Sun Dec 25, 2011 6:25 am

Re: Leave field contents after save

Postby kedikatt » Tue Dec 27, 2011 1:38 pm

Thanks for the answers to my questions. Obviously I am new to php and Xataface. I am an electronics tech, not an IT. I have done some programming back in the stone age, but went hardware instead.
I just started in a tech shop that maintains over 10,000 pieces of equipment. The current data base consists of thousands of raw spreadsheets filled in randomly. Primary key is the serial number.
So I decided to make a database. Open office is easy to use for a single PC database, but we want it accessible from multiple stations.
In 3 weeks I got Apache, MySql, PHP, phpMyAdmin and now Xataface set up and working. Never used any of them before.
With just the few answers the folks provided here, I now have a useable if not proper or fancy database running.
Luckily it is very basic in it's requirements.

Thanks for the great program and help.
kedikatt
 
Posts: 18
Joined: Sun Dec 25, 2011 6:25 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 20 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved