| 1 |
<?php |
| 2 |
/** |
| 3 |
* Product type setting for product fields. |
| 4 |
* |
| 5 |
* @package Formidable |
| 6 |
* |
| 7 |
* @var array $field Field data including 'id' and 'data_type'. |
| 8 |
* @var array<string, string> $data_types Product type options keyed by type slug. |
| 9 |
*/ |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
die( 'You are not allowed to call this page directly.' ); |
| 13 |
} |
| 14 |
?> |
| 15 |
<p class="frm_form_field frm_product_type"> |
| 16 |
<label><?php esc_html_e( 'Product Type', 'formidable' ); ?></label> |
| 17 |
<select name="field_options[data_type_<?php echo esc_attr( $field['id'] ); ?>]" class="frmjs_prod_data_type_opt"> |
| 18 |
<?php |
| 19 |
foreach ( $data_types as $type => $label ) { |
| 20 |
?> |
| 21 |
<option value="<?php echo esc_attr( $type ); ?>" <?php selected( $field['data_type'], $type ); ?> <?php disabled( $type, 'user_def' ); ?>> |
| 22 |
<?php echo esc_html( $label ); ?> |
| 23 |
</option> |
| 24 |
<?php } ?> |
| 25 |
</select> |
| 26 |
</p> |
| 27 |
|