Skip Navigation

[Closed] current post data to another post type form

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 8 replies, has 2 voices.

Last updated by Waqar 11 months ago.

Assisted by: Waqar.


On my custom post(type Product) page CRED post form creates new post(type Order) .
How to get current Product data into form and post it?

For example:
We are on my Sample Product page and composing order(filling CRED form).
Form fields like customer name, mail etc are there.
Wish to add automatically product name and price to order.



Thank you for contacting us and I'd be happy to assist.

To automatically populate the data in the form fields, you can use relevant Toolset shortcodes in the default value option in the form field settings.

For example, to get the current logged-in user's data, you can use the 'wpv-user' shortcode:

Likewise, to get the data from the current product (whose single product page is being used), you can use the shortcodes like 'wpv-post-title', 'wpv-post-field' etc:

I hope this helps and please let me know if you need further assistance.



Can You give me a sample piece of code to populate my product SKU(custom field slug is 'prod-sku') in to form field 'tel-sku'.
Here is the row in my order form:

[cred_field field='tel-sku' placeholder='SKU' force_type='field' class='form-control' output='bootstrap']

Yes, you'll include the field's value shortcode [types field='prod-sku'][/types] in the 'value' attribute like this:

[cred_field field='tel-sku' placeholder='SKU' force_type='field' class='form-control' output='bootstrap' value='[types field='prod-sku'][/types]']

Related documentation links:


Thanks Waqar,

This works fine. Help me also to post some Product field values to Orders if checkbox checked.


For example Product field Installation cost(field='installation') I wish to save into Order field Extras(field='extras') if customer checks checkbox.


Glad I could help.

For something like this you can use the 'cred_save_data' hook:

This hook can be used to fire a custom function that executes when the form's data (order) has been saved to the database.

In your function, you can check if the checkbox has been checked or not. And if checked, you can get the required custom field values from the product and save them in the 'extras' field of the order itself.


Looks good, but I am still processing.
Let's keep this ticket open for some time.


Sure, please take your time and the ticket will stay open for a couple of weeks.

The topic ‘[Closed] current post data to another post type form’ is closed to new replies.