Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

save multiple records within subform

Questions related to using nuBuilder Forte.
benritter
Posts: 49
Joined: Wed Aug 26, 2020 10:38 pm

save multiple records within subform

Unread post 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!
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: save multiple records within subform

Unread post 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.
benritter
Posts: 49
Joined: Wed Aug 26, 2020 10:38 pm

Re: save multiple records within subform

Unread post 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
benritter
Posts: 49
Joined: Wed Aug 26, 2020 10:38 pm

Re: save multiple records within subform

Unread post 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.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: save multiple records within subform

Unread post 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.
benritter
Posts: 49
Joined: Wed Aug 26, 2020 10:38 pm

Re: save multiple records within subform

Unread post 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.
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: save multiple records within subform

Unread post 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
benritter
Posts: 49
Joined: Wed Aug 26, 2020 10:38 pm

Re: save multiple records within subform

Unread post by benritter »

I will do that ASAP. Do I need to manually make a field in the subform for the foreign key?
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: save multiple records within subform

Unread post 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.
benritter
Posts: 49
Joined: Wed Aug 26, 2020 10:38 pm

Re: save multiple records within subform

Unread post 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.
Post Reply