This topic is locked

how can i stop losing form data

9/15/2006 11:47:42 AM
PHPRunner General questions
kujox author

When a user adds a new customer and they give that customer an account number which is unique, if the data is rejected due to duplicate account number it empties the form data.
Is there a way I can populate the input boxes in the case of the above error so they don't have to retype all the info in again . I know I can save the data in before add event but can't see a way to place them into the form boxes.

T
thesofa 9/15/2006

When a user adds a new customer and they give that customer an account number which is unique, if the data is rejected due to duplicate account number it empties the form data.

Is there a way I can populate the input boxes in the case of the above error so they don't have to retype all the info in again . I know I can save the data in before add event but can't see a way to place them into the form boxes.



see this post here

topic about the same thing, just read the last couple of posts
You could also use a bit of code to show the existing account numbers from the tables.

If you use the help file and look in the Advanced topics, events, sample code area, there is an example to Show list of all orders placed by this customer on Order Edit page

I have adapted it to show similar data before altering a record.

HTH

kujox author 9/15/2006

That does seem to be what I want.

Sergey Kornilov admin 9/15/2006

In PHPRunner 3.1 use postvalue("value_fieldname") as a Default value. Replace fieldname with the actual field name.

kujox author 9/16/2006

In PHPRunner 3.1 use postvalue("value_fieldname") as a Default value. Replace fieldname with the actual field name.


I don't seem to be having much luck with the postedit array in V3, but the update in 3.1 does make life easier, i'll give that a try, ta