# formidable/trunk/classes/views/frm-fields/back-end/generate-options-with-ai.php

Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes &amp; More, version trunk. 22 lines.

- Page: https://pluginprobe.com/plugins/formidable/trunk/code/classes/views/frm-fields/back-end/generate-options-with-ai.php
- Raw: https://pluginprobe.com/plugins/formidable/trunk/raw/classes/views/frm-fields/back-end/generate-options-with-ai.php
- Modified: 2026-05-27T15:12:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/formidable/trunk/code/classes/views/frm-fields/back-end/generate-options-with-ai.php#L10-L20`.

```php
<?php
/**
 * Generate options with AI button.
 *
 * @package Formidable
 *
 * @var array $args       Arguments including 'button_text' and 'show_pill'.
 * @var array $attributes HTML attributes for the button.
 */

if ( ! defined( 'ABSPATH' ) ) {
	die( 'You are not allowed to call this page directly.' );
}
?>
<button <?php FrmAppHelper::array_to_html_params( $attributes, true ); ?>>
	<?php FrmAppHelper::icon_by_class( 'frmfont frm-ai-form-icon frm_svg15', array( 'aria-label' => __( 'Generate options with AI', 'formidable' ) ) ); ?>
	<span><?php echo esc_html( $args['button_text'] ?? __( 'Generate with AI', 'formidable' ) ); ?></span>
	<?php if ( isset( $args['show_pill'] ) ) : ?>
		<?php FrmAppHelper::show_pill_text( __( 'BETA', 'formidable' ) ); ?>
	<?php endif; ?>
</button>

```
