Form generator not populating fields

I was following the “Basic Add Data Form” part of @mebeingken’s course and found that the Bootstrap 4 Form Generator is not auto-populating the fields with the POST values that are in the server action. The database insert in the server action seems to be working fine:

But the form generator seems to not detect the above POST values:

Any idea why and how I can fix this?

Other misc info about my simple project:
Page: index.ejs cotent page without any layout page (only page in the project)
Database: PostgreSQL
Wapper version: 3.9.9
Design framework: Bootstrap 4
Hosting type: Docker Hosting
Server model: NodeJS
App structure (it’s minimal): Screen Shot 2021-07-09 at 9.01.52 PM

Hi and welcome aboard.

There can be multiple reasons why this is happening. One of the most common reasons is the failure to save the server actions.

Gotcha, thanks for the help, Ben!

I went back and double checked to make sure I did that: Screen Shot 2021-07-10 at 7.26.51 AM

Do you know what the next most common potential reasons for this issue are?

Does your server connect action has input fields?

Expand the “inputs” branch and check $_POST

Yessir
Screen Shot 2021-07-10 at 7.41.20 AM

Could it be Postgres? Is it common for people to use Postgres with Wappler?

I doubt it is the database flavor. Postgres is fine.

Not sure it is directly related to this issue, but you will need to have your content page in a layout. I would build again with a fresh content page attached to a basic layout. If it didn’t fix this issue, it will avoid the next one. :slightly_smiling_face:

I noticed this emphasis in your course as something we “MUST” do, but I still explored not doing this haha. I tested this to see if this was the cause of my issue, but it didn’t seem to fix it. Anyway, I created a blank layout page now and will use that as the layout for my future content pages because of the potential future issues you alluded to. Aside: What are the known issues that result from having content pages that have “None” for the layout?

After creating a new blank layout page it needs linking to the page in 2 areas, area one is on the content page by clicking app at the very top on the right, area 2 is in the routes menu for the content page.

This is important as when adding certain components to the content page the scripts actually get added into the layout page for easy use across the project.

I think it is safe to say that “all bets are off”.

1 Like

Looks to me that this is an insert to database action. So all fields in the form initially are empty until the user fills out the form. Since you say the database insert is working fine, nothing seems to be wrong here.

Here is what the form generator should be putting into the fields (screenshot of 1:44 of the “Basic Add Data Form” video in the referenced course):
Screen Shot 2021-07-10 at 10.35.37 AM

May sound a silly question but you have set up the data connection for the “populate” Query and selected in the form generator?

This is correct, and they have no value. What do you expect to happen?

Tried same settings couple of times but could really replicate this.

Could you try on different pages maybe recreate your server connect action?

If it always gives you the same empty result please restart Wappler with logging, reproduce the problem and attach the debug log. See:

1 Like

I should find “Restart with Logging” on Wappler’s tray icon, right? I don’t see it if I left click or right click:

Am I in the wrong place?

Thats the dock the tray icon is at the very top on your Mac things like you’re wifi connection and the time and date is up there too

Oh, duh; thank you haha.

Looks like my problem connecting the front-end to the database was probably caused by the fact that I initialized the project from a near empty BitBucket non-Wappler repo that had a README and gitignore in it. Re-creating the project normally in Wappler (not from a remote repo) and then linking it to an empty remote repo seems to have solved my problem.