Get Post URL on Create Post Action

By: Mohit Manderna | Asked: 07/17/2025
ForumsCategory: How-toGet Post URL on Create Post Action
Mohit Manderna asked 6 months ago

Hi.

I am using the "Create Post" action in FF. I want to get the URL of the post that gets created. Is it possible to get this?

My goal is to save this in the google sheet.

Please help.

1 Answers
Victor Font Staff answered 6 months ago

Create a hidden field on the form and populate it after the form has been created. Set a default value on the hidden field to assure the field is saved to the database.Here's a code snippet that you can use: https://gist.github.com/vfontjr/63920dd262e9027edafbe5b382888964

Mohit Manderna
replied 6 months ago

Thanks for your help. Can you also share the text I need to add as the default value in the field? Is it "[post_url]"? Also, is there a need to add an API trigger to populate the field?

Victor Font
Staff replied 6 months ago

A default is just a placeholder for a value. Formidable doesn’t save fields that don’t have a value. Hidden fields don’t have values unless you give them a default value or write custom code or use a shortcode to fill them in. The code I wrote for you won’t work unless the field is in the database, so you need to give it a default value. Here’s a link that explains how to use dynamic default values in fields: https://formidableforms.com/knowledgebase/using-dynamic-default-values-in-fields/

API? Why would you want an API?

Mohit Manderna
replied 6 months ago

Thank you so much. This helped a lot!

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right