$meta * @return bool */ public static function matches(string $wsType, array $meta): bool { return $wsType === 'checkbox' && WsFormOptionsExtractor::extractConsentText($meta) !== null; } /** * Apply GDPR-specific properties to an already-built field payload. * * @param array $field * @param array $meta * @return void */ public static function apply(array &$field, array $meta): void { $agreementText = WsFormOptionsExtractor::extractConsentText($meta); $field['type'] = 'gdpr'; $field['required'] = true; $field['defaultValue'] = ''; $field['agreementText'] = $agreementText !== null ? $agreementText : ''; // WS Form hides the field label for consent checkboxes (label_render off); // IvyForms shows label and agreement text separately. $field['hideLabel'] = false; } }