[ad_1]
[ad_2]
When I search for information regarding creating a form for a plugin, all I get is a list of WordPress plugins. Is there not a standard way to do this?
I've been trying to create a form using a shortcode but the form displays above the header. I found some information on adding some surrounding code to make it load in the right place but it's not working.
public function load_shortcode()
{
ob_start(); ?>
<h1>Information</h1>
<p>Fill out this form</p>
<form>
<input type="text" placeholder="Name">
<input type="email" placeholder="Email">
<textarea placeholder="Hello"></textarea>
</form>
<?php
$output = ob_get_contents();
ob_end_clean();
}
What is the right way to add a form to my plugin?
Thank you.

Check the WordPress developer resources website. Or ChatGPT
Why not just use a plugin? Accepting user input can be quite dangerous if you aren’t an experienced developer who’s familiar with escaping and sanitisation procedures.