Open AnneSalem opened 3 years ago
Are you on the latest released version of Form plugin? I can run fine under PHP 7.4, even PHP 7.8 with checkbox and radio fields. I'll have to get a test page with your blueprint elements though (although they look fine).
Thank you for the quick reply. Yes, the version is v4.1.2. I also tried to delete the plugin and reinstall it. In my case just one of the fields is enough to produce the error. Text inputs and textareas are working fine. Should I copy the whole form definition here?
Try writing the form in this format:
agree_to_terms:
type: checkbox
validate:
required: true
outerclasses: privacy-checkbox
agree_to_terms_text:
type: spacer
text: Ich habe die Datenschutzerklärung gelesen und bin einverstanden *
honeypot:
type: honeypot
So basically remove dash from the form fields, it's not supported.
PS: Dash format works without the key like this:
-
name: agree_to_terms
type: checkbox
validate:
required: true
outerclasses: privacy-checkbox
-
name: agree_to_terms_text
type: spacer
text: Ich habe die Datenschutzerklärung gelesen und bin einverstanden *
-
name: honeypot
type: honeypot
Thanks a lot, now it works! 🎉😊
I got the template for the (not supported) formatting from the link "Page markdown file" on the Grav documentation page: https://learn.getgrav.org/16/forms/forms/example-form
@rhukster It looks like some of the skeletons have bad blueprint markup:
That format has never been supported, so likely the form has never been properly validated.
I'm reopening this issue, CC @rhukster
Should we fix those skeletons?
I get the following RuntimeError when using checkbox, spacer or honeypot fields under PHP 7.4. Under PHP 7.3 everything works as expected without errors.
The definition of the affected fields is done on a modular page and looks as follows:
Issue exist on:
Any ideas on how to solve this issue?