We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

First scaffold application not working as expected.

I'm brand new to phalcon and fairly new to programming.

I created a basic scaffold application, but when creating new records, I type in a value, click save, and I get a message that a value is required.

It is as though it's not seeing what I typed in the field.

Can someone please tell me what I'm doing wrong!

Hi @dvicknair share a snippet of code helps you

Also check that the model is passed in the form and that you are correctly mapping the field, in addition check the fields that do not allow nulls in the table

Good luck

I feel like it's something in the database, because I run "phalcon create project" and "phalcon scaffold tablename" only. I do not alter any code and get the result mentioned...

Running "phalcon create-project crud", updating config with database name and credentials, and running "phalcon scaffold tablename" should result in a working crud application, right?



544
Accepted
answer

Problem SOLVED!!

The phalcon scaffold tool capitalizes the first letter of the field names where the object is created in the controller's createAction method. This must be a bug in the scaffold tool.

After changing the first letters to lowercase, the create form now works.