Frontend shortcodes require Premium or Agency and must use a feed whose Trigger Mode permits the matching button. Place buttons inside the rendered Gravity Forms <form>—normally in a Gravity Forms HTML field that processes shortcodes or in form-adjacent content that still results in the button being inside the form. This lets the plugin read current field values and fill destination fields.
Complete Text Button #
[goaif_button feed_id="123" label="Generate summary"]
| Attribute | Required | What to enter |
|---|---|---|
feed_id |
Yes | Numeric ID of an AI Text feed configured for the complete-result or either-button trigger. |
label |
No | Button text. Default: Generate. |
form_id |
No | Numeric form ID. Normally omit it because the plugin derives it from feed_id. |
The status beside the button displays Working and then the final response or error. The result is also inserted into the configured destination field or fields.
Streaming Text Button #
[goaif_stream_button feed_id="123" label="Draft while I watch"]
| Attribute | Required | What to enter |
|---|---|---|
feed_id |
Yes | Numeric AI Text feed ID configured for streamed-result or either-button use. |
label |
No | Button text. Default: Generate. |
form_id |
No | Numeric form ID; normally auto-detected from the feed. |
The status text grows as provider deltas arrive. At completion, the plugin writes the final value to the same destination fields used by a complete-result request.
Image Button #
[goaif_image_button feed_id="456" label="Generate image"]
| Attribute | Required | What to enter |
|---|---|---|
feed_id |
Yes | Numeric AI Image feed ID configured for Frontend button. |
label |
No | Button text. Default: Generate Image. |
form_id |
No | Numeric form ID; normally auto-detected from the feed. |
Image Preview #
[goaif_image_preview feed_id="456" placeholder_url="https://example.com/placeholder.png" aspect="3/2"]
| Attribute | Required | What to enter |
|---|---|---|
feed_id |
Yes | The same numeric AI Image feed ID used by the image button. |
placeholder_url |
No | Full HTTPS URL of an image shown before generation. Default: empty preview. |
aspect |
No | CSS aspect-ratio value such as 1/1, 3/2, or 16/9. Default: 1/1. |
Keep the preview in the same form when possible. If no matching preview is inside the form, the script uses the first matching preview elsewhere on the page. The placeholder and generated image fill the configured aspect-ratio box; images whose proportions differ are cropped from the center.
Important Behavior #
Each click obtains a fresh single-use token, then sends the form’s current usable field values to the server. The button is disabled while working. A frontend text result fills its target fields. A frontend image remains temporary until the visitor submits the form, at which point the plugin verifies and attaches it to the target File Upload field.