Page 1 of 2

save multiple records within subform

Posted: Fri Sep 04, 2020 5:12 pm
by benritter
Hi,
I am making a public-facing app for people to sign up for free food assistance from a charity. I want new potential "clients" to be able to navigate to a landing page where they create a user account. I would set the account privileges to only access records associated with id of the user who signs in. I have everything in one form called "client" that asks for basic contact information for the main point of contact for each household. Then I have a subform where I want them to enter information about each individual who will receive assistance at this address. What I can't figure out is, how can one client enter multiple family members in the subform without hitting "save" on the main form and starting over?
Thanks!

Re: save multiple records within subform

Posted: Fri Sep 04, 2020 5:22 pm
by kev1n
benritter wrote: What I can't figure out is, how can one client enter multiple family members in the subform without hitting "save" on the main form and starting over?
I don't quite understand the problem. If something is entered in the last row of a subform, a new line is automatically added.

Re: save multiple records within subform

Posted: Fri Sep 04, 2020 9:09 pm
by benritter
....so it does. thanks for your patience with noobs like myself.
But to clarify, keeping all input as subforms of the main "client" form will make it so the user who is logged in can only see their own family info right?
And where is input to the subform saved? I can't find it in any tables in PHPmyadmin.
Thanks

Re: save multiple records within subform

Posted: Sat Sep 05, 2020 12:00 am
by benritter
I tried creating a new subform with the fast form builder. Following the instructions on youtube, I made a test subform to make sure I hadn't accidentally done something wrong with my subform the first time. I still can't see where information entered in a subform is stored. The fast form builder didn't make a new table in phpmyadmin.
I know this is probably something rudimentary for more advanced developers, but I've been searching everywhere for the answer and getting nowhere.
Thanks.

Re: save multiple records within subform

Posted: Sat Sep 05, 2020 7:24 am
by kev1n
Normally a new table should be created by the Form Builder (Fast Form)
Please take a screenshot of your Form Builder right before clicking on the "Build Fast Form" button and upload it here.

Re: save multiple records within subform

Posted: Tue Sep 08, 2020 5:20 pm
by benritter
form builder srcnsht.png
Ok, I tried this again, after going into PHPmyadmin and DROP TABLE - ing all the previous attempts, I made a new subform with form builder, as seen in the screenshot. I opened "form object list" for the form "client", chose "subform". chose the table name for the subform and its primary key etc. I went to the form under user/home. set up the objects in the subform.. When I enter and save information, the main form "client" stores everything. But the subform "recipients" does not seem to save any entered info in the table. SELECT * FROM recipients; returns nothing.

Re: save multiple records within subform

Posted: Tue Sep 08, 2020 5:47 pm
by kev1n
Is it possible to upload a dump of your database here (zip it first)? Then I'll have a look at it.
Remove/replace any confidential data, if there are any.
Export instructions if you don't know how to do it:: https://www.inmotionhosting.com/support ... phpmyadmin

Re: save multiple records within subform

Posted: Tue Sep 08, 2020 6:08 pm
by benritter
I will do that ASAP. Do I need to manually make a field in the subform for the foreign key?

Re: save multiple records within subform

Posted: Tue Sep 08, 2020 6:12 pm
by kev1n
benritter wrote:Do I need to manually make a field in the subform for the foreign key?
No, the form builder will create it.

Re: save multiple records within subform

Posted: Tue Sep 08, 2020 7:24 pm
by benritter
That's what I thought. Just eliminating possibilities.
When I try to export the database (quick mode, as SQL) phpmyadmin crashes. Then when I try to open it again I get "Fatal error: Maximum execution time of 120 seconds exceeded in C:\xampp\phpMyAdmin\libraries\classes\Session.php on line 188"
And an empty file with the name of the DB is in my downloads folder.