Uh oh!
There was an error while loading. Please reload this page.
Set a default form_id for the subscribe pattern for testing - #1689
Conversation
|
✅ Deploy Preview for cloudfour-patterns ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
form_id for the subscribe pattern for testinggerardo-rodriguez
commented
Mar 28, 2022
@calebeby I agree, I'd be concerned the form ID would be duplicated on the page if the component existed multiple times on the same page.
I am not aware, but also Twig isn't my forte so there might be something I'm not aware of. |
gerardo-rodriguez
commented
Mar 28, 2022
@calebeby Maybe you could do something with |
calebeby
commented
Mar 28, 2022
Oh yeah that might be helpful. IDK if it's worth it, but we could probably make a error pattern that is very visible/flashy and then go through all our patterns and make them render the error pattern if any of their required props are missing |
gerardo-rodriguez
commented
Mar 28, 2022
That's an interesting idea! I can create a GH issue and we can leave it in the backlog as a nice-to-have as I imagine it'll be a lower priority through this initial phase of work. |
Conversation here: #1679 (comment)
@gerardo-rodriguez an alternate solution would be to make the twig file itself have its own default value for the form ID, but I don't know if that is the best because it would mean that the form id would be duplicated on the page if you included the subscribe component multiple times on the same page. Do you know if there is a way to make a twig prop required, so that it'll throw an error or something if the prop is missing?