# formidable/trunk/paypal/controllers/FrmPayPalLiteFieldsController.php

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

- Page: https://pluginprobe.com/plugins/formidable/trunk/code/paypal/controllers/FrmPayPalLiteFieldsController.php
- Raw: https://pluginprobe.com/plugins/formidable/trunk/raw/paypal/controllers/FrmPayPalLiteFieldsController.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/paypal/controllers/FrmPayPalLiteFieldsController.php#L10-L20`.

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

class FrmPayPalLiteFieldsController {

	/**
	 * Hide the email, name, and address fields if they are marked as PayPal order fields.
	 *
	 * @since 6.31
	 *
	 * @param bool   $show_normal_field_type Whether to show the field.
	 * @param string $type                   The field type.
	 * @param object $field                  The field object.
	 *
	 * @return bool
	 */
	public static function hide_paypal_order_fields( $show_normal_field_type, $type, $field ) {
		if ( ! in_array( $type, array( 'email', 'name', 'address' ), true ) ) {
			return $show_normal_field_type;
		}

		$is_paypal_order_field = FrmField::get_option( $field, 'is_paypal_order_field' );

		return $is_paypal_order_field ? false : $show_normal_field_type;
	}

	/**
	 * @param array $field The field settings.
	 * @param array $display The display settings for the field.
	 * @param array $values The values associated with the field.
	 */
	public static function add_paypal_order_field_note( $field, $display, $values ) {
		// Add a note about PayPal order fields here.
		if ( ! FrmField::get_option( $field, 'is_paypal_order_field' ) ) {
			return;
		}

		echo '<div class="frm_note_style">';
		esc_html_e( 'This is a PayPal order field. It is automatically populated when a payment is processed, and is automatically excluded from the form HTML.', 'formidable' );
		echo '</div>';
	}
}

```
