Functions
ugly_form_html()Pro
ugly_form_html( array $args ): string
The same as ugly_form(), but returned instead of printed. Use it when you build a string: inside a shortcode, a block or a template function that returns HTML.
add_shortcode( 'contact_form', function () {
return ugly_form_html( array(
'groups' => array( 'group_contact' ),
'post_type' => 'message',
'who' => 'anyone',
) );
} );Did this article answer your question?
Thank you. It helps us make the documentation better. Need more help?