Saintor Posted March 20, 2013 Share Posted March 20, 2013 How can I make sure that what I enter will be the default value for the next record? Disclaimer; I am not that used in web hard coding; I use a tool that will do most of the programming for me. Here are the available events to trigger the JS/PHP code. Client side = JavascriptServer side = PHP "Insert form" works with one record / one record. The tool that I am using allows the use of a grid, inline grid. What is the recommendation to have a default value based on the prevuious entry? TIA Link to comment Share on other sites More sharing options...
justsomeguy Posted March 20, 2013 Share Posted March 20, 2013 The question is a little vague. You want to insert one record, and then when the form loads again you want the values from that record filled in automatically? Link to comment Share on other sites More sharing options...
Saintor Posted March 21, 2013 Author Share Posted March 21, 2013 Correct, some fields filled with the same values of the previous entered data. Link to comment Share on other sites More sharing options...
justsomeguy Posted March 21, 2013 Share Posted March 21, 2013 I can't really comment specifically on the application that you're using to create that, whether it uses ajax, etc, but I suppose when a record gets inserted you can add that data to the session in PHP, and then when the insert form gets displayed then one option would be to send an ajax request to PHP to retrieve that data from the session and fill out the form or, more efficiently, have PHP fill that in when it creates the form (assuming PHP produces the markup for the form). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now