It would be very useful to have a "PHP block" kind of field. I constantly need to display the content of some PHP string in between the form fields.
Paddelboot
It would be very useful to have a "PHP block" kind of field. I constantly need to display the content of some PHP string in between the form fields.
Paddelboot
I've run across that too. To work around it, because shortcodes will be processed in the HTML block, I usually create a shortcode in my functions.php or a plugin file, and write the PHP function there. Then you can insert the shortcode in the HTML block in your Gravity Form. It will work the same way.
Sounds good, I didn't know shortcodes where enabled. But it probably means you'll have to register a shortcode for each individual block, right?
No, you don't have to register them for each hook. Shortcodes are processed in the HTML block. You don't need to do anything special at all. Just create your shortcode function and then use the shortcode and you'll be good to go.
I started doing that a long time ago when website owners wanted to use PHP in their posts, and I was not comfortable using the PHP Exec plugin to allow that. Not to mention, the visual editor messes the PHP tags up. So, I create the shortcode and let them use that. It works really well.