I created a custom post type, with an associated custom meta box as per your guidance in here:
On the back-end I can see the meta box and everything works well.
My question is in regards to the front end, how can I display the form generated from the metabox?
If I use ACF fields, it’s quite simple, I can do the below for example.
But it would be much better if I can use the existing functionality of Hivepress rather than another plugin.
Yes, it can be done, but it will require advanced customization. The easiest option is to create a HivePress form (by creating a custom extension: Create a custom HivePress extension - Developer Docs) and add the $form->render() function. You can additionally view how the forms are made at this link: hivepress/includes/forms at master · hivepress/hivepress · GitHub. If the names of the meta fields with the hp prefix match, then you can use ACF without any problems, and if the validation is the same for the fields, then everything should be synchronized.
Unfortunately there’s no way to call this function via a shortcode because it doesn’t execute custom PHP code, you’d have to create a custom shortcode and run any custom code in the shortcode callback function. If the form is already created via a custom HivePress extension then yes, it can be rendered via the template part or you can try using the “content” block type and provide the rendered form HTML in the “content” parameter of the block.