Dear SiteOrigin Team, hey community,
i’m building a custom widget and tried to use the Form Field “Widget” in it.
–> https://siteorigin.com/docs/widgets-bundle/form-building/form-fields/#heading-widget
It should use the entire form a any Widget.
As i put in the Class Name of the Layout Builder Widget ( SiteOrigin_Panels_Widgets_Layout ) to the piece of code given in the above Link destination, i get following error in the backend of my custom widget:
“SiteOrigin_Panels_Widgets_Layout is not a SiteOrigin Widget”
Can someone help me or have a good advice for me?
Thank you all in advance
Moo
Hi Moo,
I’m unsure why this is happening but I’ll look into it. Regardless, I strongly suggest using the builder form field instead.
Hey Alex,
thank you so much for your response! I gonna try that builder form field!
Greetings from Germany
I’m getting a white screen … can you reproduce that?
Hi Moo,
In relation to what? When you set the form field to an editor?
I suspect you’re experiencing a PHP error and you just can’t see it. Try enabling WP_DEBUG.
Hey Alex,
sorry for less information.
I placed that in a clean new custom widget php file:
Setting an other widget class, for example the button class it works fine. Setting the Field Builder class i got following error: “Uncaught InvalidArgumentException: SiteOrigin_Widget_Field_Base::__construct: $field_options must contain a ‘type’ field.”
Hope that can help you.
Hi Moo,
Oh, sorry! SiteOrigin_Widget_Field_Builder is a form field, not a widget. Please change the type to builder and remove the class.
To clarify, the type is whatever is after SiteOrigin_Widget_Field_.