Closed KarolJurczykDS closed 6 months ago
I've added handling for both of those. Note that some checks like the required user might be tricky with headless scenarios and maintaining a user session.
To get this early, run composer require verbb/formie:"dev-craft-4 as 2.0.44.1"
.
Works like a charm, thanks, can close it now
Updated in 2.0.45
Describe the bug
When sending custom ajax form
isWithinSubmissionsLimit
method is not triggering, most likely because there is nodraft/incomplete
flag set in this scenario (other two checks - requireUser and scheduleForm - are working fine): https://github.com/verbb/formie/blob/craft-4/src/elements/Submission.php#L440When rendering custom ajax form
isAvailable
and/or it's inner methods are not available in graphql schema, so it's impossible to check if it should be rendered or not https://github.com/verbb/formie/blob/craft-4/src/elements/Form.php#L2078Steps to reproduce
FORM Limit Submissions = true Number of Submissions = X total
POST /actions/formie/submissions/submit
PAYLOAD fields[firstName]: Karol fields[lastName]: DS ... handle: testForm```
/admin/graphiql
Form settings
Craft CMS version
4.5.5
Plugin version
2.0.36
Multi-site?
No
Additional context
We're using NextJS with custom formie component
/api
endpoint/actions/formie/submissions/submit
endpoint