I have an issue with a data-bound form.
To avoid anything being down to my own errors, I've copied the exact text from https://docs.couchcms.com/concepts/databound-forms.html (where it says "The final code of our applications template") into another file on my site, and visited that page whilst logged in to admin.
I've also copied the lines:
into kfunctions.php in the couch/addons directory.
So my set up now should be exactly as expected in the databound forms tutorial. (I have one other simple template registered in the admin panel, but I don't think that should be relevant).
If I try to add an entry using the admin panel, and breach the validaton requirements (for example, leaving the surname blank), I get error messages, as expected.
If I use the form in the front end, however,
Is this a similar issue to the one in viewtopic.php?f=4&t=11746, or something else? And if there is a need to make a second success check, what is the code I need in this case?
It does seem odd that the exact code shown in the documentation would not work; does it need updating?
To avoid anything being down to my own errors, I've copied the exact text from https://docs.couchcms.com/concepts/databound-forms.html (where it says "The final code of our applications template") into another file on my site, and visited that page whilst logged in to admin.
I've also copied the lines:
- Code: Select all
require_once( K_COUCH_DIR.'addons/data-bound-form/data-bound-form.php' );
require_once( K_COUCH_DIR.'addons/cart/session.php' );
into kfunctions.php in the couch/addons directory.
So my set up now should be exactly as expected in the databound forms tutorial. (I have one other simple template registered in the admin panel, but I don't think that should be relevant).
If I try to add an entry using the admin panel, and breach the validaton requirements (for example, leaving the surname blank), I get error messages, as expected.
If I use the form in the front end, however,
- if I fail to complete the 'human' question (where the validator is in the form itself), I get an error message
- if I fail to complete the surname (a required field, set in the template) I don't get an error reported
- ...and I do get the 'Success: Your application has been submitted' message
- ...but the data has not in fact been added to the database.
- If I complete all required fields, then the form is submitted successfully.
Is this a similar issue to the one in viewtopic.php?f=4&t=11746, or something else? And if there is a need to make a second success check, what is the code I need in this case?
It does seem odd that the exact code shown in the documentation would not work; does it need updating?