# formidable/6.24.1/classes/views/frm-fields/back-end/name/primary-options.php

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

- Page: https://pluginprobe.com/plugins/formidable/6.24.1/code/classes/views/frm-fields/back-end/name/primary-options.php
- Raw: https://pluginprobe.com/plugins/formidable/6.24.1/raw/classes/views/frm-fields/back-end/name/primary-options.php
- Modified: 2021-05-21T15:34:28+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/6.24.1/code/classes/views/frm-fields/back-end/name/primary-options.php#L10-L20`.

```php
<?php
/**
 * Primary options for name field
 *
 * @package Formidable
 * @since 4.10.02
 *
 * @var array        $field Field array.
 * @var array        $args  Includes 'field', 'display', and 'values'.
 * @var FrmFieldName $this  Field type object.
 */

if ( ! defined( 'ABSPATH' ) ) {
	die( 'You are not allowed to call this page directly.' );
}

// Options here need to be declared in FrmFieldName::extra_field_opts().
$field_id    = $field['id'];
$name_layout = FrmField::get_option( $field, 'name_layout' );
?>
<p>
	<label for="name_layout_<?php echo esc_attr( $field_id ); ?>">
		<?php esc_html_e( 'Name layout', 'formidable' ); ?>
	</label>

	<select
		name="field_options[name_layout_<?php echo esc_attr( $field_id ); ?>]"
		id="name_layout_<?php echo esc_attr( $field_id ); ?>"
		class="frm_name_layout_dropdown"
		data-field-id="<?php echo intval( $field_id ); ?>"
		data-changeme="frm_combo_inputs_container_<?php echo intval( $field_id ); ?>"
		data-changeatt="data-name-layout"
	>
		<option value="first_last" <?php selected( $name_layout, 'first_last' ); ?>>
			<?php esc_html_e( 'First Last', 'formidable' ); ?>
		</option>
		<option value="last_first" <?php selected( $name_layout, 'last_first' ); ?>>
			<?php esc_html_e( 'Last First', 'formidable' ); ?>
		</option>
		<option value="first_middle_last" <?php selected( $name_layout, 'first_middle_last' ); ?>>
			<?php esc_html_e( 'First Middle Last', 'formidable' ); ?>
		</option>
	</select>
</p>

```
