Hi,
The following Multi Page works but I don't know how to save the iterated values?
I have a Multi Page where you can select a course in the first page and if you want to add another course on the next page.
[list=]If YES then get returned to the first page (with event switch). [/list][list=]If you chose FINISH, you will go to the next page to enter your info and submit the form.[/list]
This flow works and I can save the last page (with lastname and firstname) in a TABLE. But I'd like to save the iterations in a separate TABLE with the user-id (not joomla's userid)
Here you see an example of what I'd like to accomplish. (the two tables are just an example)
Like I said the Lastname and Firstname I can save in DB with SAVE DATA in the SUBMIT-event after the Multi Page
Since a guest-user can decide to quit before the last submit button where he enters his/her name, I think the following should happen:
[list]after last submit is pressed on page 3, the userdata should be saved in the table with info about the student. That way we have an id[/list][list]iterate over the chosen courses somehow and save it in another table with the courses and the foreign-key of the userid (not joomla user)[/list]
How can we save the iterations when the users click on ADD ANOTHER COURSE? I suppose there is a way to store it in array?
How can we iterate through the array after the save of the first table and how can we retrieve the userid generated in the first table?
PS: users don't have to log-in, so that's what I mean with "not joomla userid)
Thanks!
The following Multi Page works but I don't know how to save the iterated values?
I have a Multi Page where you can select a course in the first page and if you want to add another course on the next page.
[list=]If YES then get returned to the first page (with event switch). [/list][list=]If you chose FINISH, you will go to the next page to enter your info and submit the form.[/list]
This flow works and I can save the last page (with lastname and firstname) in a TABLE. But I'd like to save the iterations in a separate TABLE with the user-id (not joomla's userid)
Here you see an example of what I'd like to accomplish. (the two tables are just an example)


Like I said the Lastname and Firstname I can save in DB with SAVE DATA in the SUBMIT-event after the Multi Page
Since a guest-user can decide to quit before the last submit button where he enters his/her name, I think the following should happen:
[list]after last submit is pressed on page 3, the userdata should be saved in the table with info about the student. That way we have an id[/list][list]iterate over the chosen courses somehow and save it in another table with the courses and the foreign-key of the userid (not joomla user)[/list]
How can we save the iterations when the users click on ADD ANOTHER COURSE? I suppose there is a way to store it in array?
How can we iterate through the array after the save of the first table and how can we retrieve the userid generated in the first table?
PS: users don't have to log-in, so that's what I mean with "not joomla userid)
Thanks!
I also added this image where you can see the details of the setup page. In the first post you see the compact version.
I think that in the SUBMIT-event after the SAVE DATA for the student-information, I have to do something like in the manual on page 26 where a LOOP EVENT is used and a SAVE DATA in the BODY.
So the question is how to store EACH iteration in a MODEL (when a user clicks on "add another course")?
And how to retrieve the saved id for the student-information so that it can be saved as foreign key?
Cheers
I think that in the SUBMIT-event after the SAVE DATA for the student-information, I have to do something like in the manual on page 26 where a LOOP EVENT is used and a SAVE DATA in the BODY.

So the question is how to store EACH iteration in a MODEL (when a user clicks on "add another course")?
And how to retrieve the saved id for the student-information so that it can be saved as foreign key?
Cheers
This topic is locked and no more replies can be posted.