You pre-populate a field using the Gravity Forms shortcode in a page or post.
Here is the shortcode:
[gravityform id=1 field_values='firstname=Carl']
This shortcode would display a form id 1 and prepopulate the field with the parameter name "firstname" with the value "Carl".
Our description is accurate, we provide ways to pre-populate the data using query string parameters, API filter, shortcode or function call. We don't control or have anything to do with shortcodes created by other plugins.
In order for shortcodes to work it has to be processed by WordPress itself. Gravity Forms doesn't process the shortcodes, which is why placing a shortcode in the parameter name isn't going to work (not to mention thats a name field and not a value field).
Typically a shortcode also has a function call that can be used. Whatever you are trying to do with another shortcode/function call can be accomplished using the api filters to do so and setting the value of the field to the output of the function call (plexus) you are trying to do.
What you are trying to do is exactly what the API filters hooks are designed to be used for.
Posted 15 years ago on Tuesday October 27, 2009 |
Permalink