Skip Navigation

[Resuelto] How can i add toolset shortcode in gravity form text field as a default value

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

Add toolset shortcode in gravity form text field as a default value

Solution:

It depends on gravity form plugin, Toolset Types/Views shortcodes are also using WP function add_shortcode() to register shortcodes, so if other shortcodes work in gravity form plugin, Toolset Types/Views shortcodes should be able too.

For example:

https://toolset.com/forums/topic/how-can-i-add-toolset-shortcode-in-gravity-form-text-field-as-a-default-value/#post-1713425

Relevant Documentation:

https://developer.wordpress.org/reference/functions/add_shortcode/

This support ticket is created hace 4 años, 4 meses. There's a good chance that you are reading advice that it now obsolete.

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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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/Hong_Kong (GMT+08:00)

Este tema contiene 4 respuestas, tiene 3 mensajes.

Última actualización por lanaG hace 4 años, 4 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#1713381

How can i add toolset shortcode in gravity form text field as a default value

#1713425

Hello,

It depends on gravity form plugin, Toolset Types/Views shortcodes are also using WP function add_shortcode() to register shortcodes, so if other shortcodes work in gravity form plugin, Toolset Types/Views shortcodes should be able too.

For example, you can create a simple shortcode:

add_shortcode( 'my-shortcode', 'my_shortcode_func' );
function my_shortcode_func( $atts, $content ) {
    return "It is my shortcode";
}

Then use above shortcode [my-shortcode] in gravity form plugin plugin, if it does not work too, you will need to check gravity form support.

More help:
https://developer.wordpress.org/reference/functions/add_shortcode/

#1714357

I will ask the guys from gravity forms. Thanks a lot!

#1743797

Hi marcB-6 - I'm doing the same thing with Gravity and Types now too.

Could you please let me know if / how you got it working please?

Thanks so much

#1743809
Screen Shot 2020-08-19 at 1.41.01 pm.png

Don't worry I got it working 🙂