-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 testing
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @calebeby!
@calebeby Maybe you could do something with |
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 |
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?