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:
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):
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.
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.
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.
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.