• Resolved degen87

    (@degen87)


    Hi,

    Forminator is a really nice plugin and have been using it for a while, but there’s an issue.

    I’ve set up a ‘guest submission form’ to automatically generate posts with catering requests. For this I use the regular fields in Forminator and use the Post Data to display them in the post.

    How can I get the post data to display automatically in the post? Now I take the custom information and put it in the post manually and then submit the post…

    I would like all the information from the form to be posted automatically.

    I’m using Kadence with a child theme.

    • This topic was modified 2 years, 7 months ago by degen87.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @degen87,

    Not sure whether I fully understood your query, you want the post submitted via the “Post Data” field to get published automatically?

    If yes, there is already a feature for that in the Post Data Field settings. Please check the following screenshot:

    Screenshot at 18:27:16.png

    You can change the “Default status” from “Pending Review” to “Published” and any new submissions will get the post published out of the box.

    Could you please check and see whether the above helps? Looking forward to your response.

    Best Regards,

    Nithin

    Thread Starter degen87

    (@degen87)

    Hi, Thanks for reaching back 🙂

    That’s not the issue. I think all my settings regarding Forminator are correct.

    But…

    1. I submit the form on the front-end.
    2. The post is created and published.
    3. Post Title and Categories are submitted and working.
    4. But the post does not display the Post Custom Data from forminator.

    How can I get the custom information and display it in the single post template?

    Regards,
    Eric

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @degen87,

    You can use the get_post_meta function to grab and display the custom fields inside the post.

    https://developer.ww.wp.xz.cn/reference/functions/get_post_meta/

    For example:

    $custom_field_value = get_post_meta(get_the_ID(), 'custom_field_name', true); 

    In the above line, change the custom_field_name to your custom field name and inside the single page template you can use echo to display the value:

      <div class="custom-field">
          <?php echo $custom_field_value; ?> <!--The custom field data will be displayed here-->
       </div>

    I hope the above helps in moving forward.

    Kind Regards,

    Nithin

    Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @degen87,

    We haven’t heard from you in a while, we will go ahead and mark this thread as resolved. If you have any additional questions or require further help, please let us know!

    Kind regards,
    Zafer

    Thread Starter degen87

    (@degen87)

    Hi Zafer! Thanks for reminding me.

    Been trying different methods. I sort of got it to work.

    I only have the standard Post Type (Blog) set up.

    How would I insert the the post data in the template if I would like it to show both label and value in the template, as below:
    Label: Value

    I can’t believe I have a hard time not understanding the guides in ww.wp.xz.cn…

    I understand if you can’t support this issue. I will search info on YT and maybe a professional.

    Regards,

    • This reply was modified 2 years, 7 months ago by degen87. Reason: insert more information
    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @degen87,

    How would I insert the the post data in the template if I would like it to show both label and value in the template, as below:
    Label: Value

    The workflow would be still the same as suggested in the previous response here:
    https://ww.wp.xz.cn/support/topic/display-post-custam-data-in-submitted-post/#post-17172661

    The following line will grab the custom field data from the table:

    $custom_field_value = get_post_meta(get_the_ID(), 'custom_field_name', true); 

    And to display, you’ll need to edit the template file:

    <?php echo $custom_field_value; ?>

    The above will display only the data data, if you want to add a label you can change the line as:

    <?php echo "Label:".$custom_field_value; ?>


    Maybe you could refer to the following for more information and see whether it helps.

    https://perishablepress.com/wordpress-custom-fields-tips-tricks/

    Regards,

    Nithin

    Thread Starter degen87

    (@degen87)

    Hi,

    Okay thank you very much. Will try it.

    I consider it solved now and know what to do in the future. Thanks 😊

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Display Post custom Data in submitted post’ is closed to new replies.