Can't override button configuration when using renderTag
#1553
Unanswered
webrgp
asked this question in
Questions & Answers
Replies: 1 comment 1 reply
-
I'm sorry for the delay @webrgp, I tried testing this on my end in Freeform 5.6.3 and it seems to always pass the class to the Submit button for me. Is this still happening for you? 🙂 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
When rendering a form using
renderTag
andrenderClosingTag
, thebuttons
configuration is not being passed to the form object.The following works as expected:
But the following won't work:
I've got around this issue in the past with this work around:
But now prevents me from correctly render anything that renders using the
EVENT_RENDER_BEFORE_CLOSING_TAG
event. For now I am using Retcon to add my classes to the submit button, but a more permanent solution is needed.When I inspect the
$form
variable in the renderButtons, I can see the configuration is being passed to the form's$propertyBag
.But when I inspect the
$page
variable, the form I get from the$page->getForm()
method does not appear to have the configuration in the$propertyBag
.Overriding other props like
attributes
,fields
andcaptchas
work as expected.Errors and Stack Trace (if available)
No response
How can we reproduce this?
renderTag
andrenderClosingTag
buttons
propFreeform Edition
Pro
Freeform Version
5.5.8
Craft Version
4.11.5
When did this issue start?
After upgrading from older Freeform version
Previous Freeform Version
4.1.14
Beta Was this translation helpful? Give feedback.
All reactions