This topic is locked

Add multiple records

8/8/2006 9:26:55 AM
PHPRunner General questions
T
tomstreet author

I would like for my users to be able to add multiple records without having to re-enter the data common to each. For example, there are 4 fields - Tryout to Enter, Voice Part, First Name, and Last Name. The first field will never change and the second only occasionally. Obviously the names would change. I know I can add a Copy page and use that but it is very cumbersome since you have to go back to the list and choose Copy after each entry.
What I'd like to do is to have something like an "Add Another" button and a "Finished" button so that a user could keep clicking "Add Another" and change only the data necessary and then click "Finished" to return to the list.
I'm a total php newbie so any help would be greatly appreciated.
Thanks!

J
Jane 8/8/2006

Tom,
you can use the following code as a Default value on the Edit format dialog on the Formatting tab:
@$_POST["value0"] - for the first field on that page

@$_POST["value1"] - for the second field

etc.

T
tomstreet author 8/8/2006

Thanks. Unfortunately I'm too new to php to know where to put that code. I can see in the add.php file the function CopyonLoad which I assume runs if the Copy option is selected and loads the values. Does the code you're suggesting go somewhere in the add.php?
Sorry for my ignorance.
Actually I just re-read what you suggested and the light went on. I think I know where to add the code.
Thanks again!