I am making a CRUD app for a client
He has asked that I have input fields across multiple screens
The user inputs to a couple of fields - hits the next button and proceeds to the next screen
In all there are 7 input screens and a save to database button on the last screen
I have put each screen into its own activity so the user can use the back button of the device
The add (to database) is a sub on the first activity - I can use callsub on the last activity to call this
But I am thinking if each screen (activity) has some input of the fields how do I get the add sub in the first activity to get the field data from those other activities?
I am just looking in the following for an answer:
https://www.b4x.com/android/forum/threads/passing-a-parameter-from-activity-a-b.9763/
https://www.b4x.com/android/forum/threads/two-activities-example.6611/#post38609
https://www.b4x.com/android/forum/threads/android-process-and-activities-life-cycle.6487/#post37980
He has asked that I have input fields across multiple screens
The user inputs to a couple of fields - hits the next button and proceeds to the next screen
In all there are 7 input screens and a save to database button on the last screen
I have put each screen into its own activity so the user can use the back button of the device
The add (to database) is a sub on the first activity - I can use callsub on the last activity to call this
But I am thinking if each screen (activity) has some input of the fields how do I get the add sub in the first activity to get the field data from those other activities?
B4X:
Sub AddEntry
Dim Query As String
Query = "INSERT INTO User VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
SQL1.ExecNonQuery2(Query, Array As String(rdbMr.Checked , rdbMrs.Checked, rdbMiss.Checked, rdbElecInsp.Checked, rdbSparky.Checked, _
rdbTech.Checked, rdbOther.Checked, txtFirstName.Text, txtMidName.Text, txtLastName.Text, txtPersEmail.Text, _
txtPerPh.Text, txtPerCell.Text, txtPerWork.Text, txtStreet.Text, txtCity.Text, txtSuburb.Text, txtRego.Text, txtEmpComp.Text, _
txtCompAddress.Text, txtEmpTown.Text, txtContact.Text,txtCompPhone.Text, txtCompEmail.Text, rdbNN.Checked, rdbCR.Checked, txtSiteSf.Text))
ToastMessageShow("Entry added", False) ' confirmation for the user
End Sub
I am just looking in the following for an answer:
https://www.b4x.com/android/forum/threads/passing-a-parameter-from-activity-a-b.9763/
https://www.b4x.com/android/forum/threads/two-activities-example.6611/#post38609
https://www.b4x.com/android/forum/threads/android-process-and-activities-life-cycle.6487/#post37980
Last edited: