Orchestration SDKs

Handling read-only text collectors in React Native

PingOne React Native

A DaVinci flow can use read-only text to show information that the user must read before continuing. For example, a PingOne flow can present an agreement, instructions, or explanatory text alongside input fields.

The React Native bridge exposes this content as a READ_ONLY_TEXT collector with the ReadOnlyTextCollector type. The bridge uses this type even when the server payload identifies the content with another type, such as AGREEMENT.

Unlike input collectors, read-only text does not ask the user for a value. The collector is classified as output_only, and the form helper excludes it from the payload passed to next().

Rendering read-only text

Use titleEnabled to decide whether to display title above content. Use enabled to decide whether your app should display the collector in the current form.

The collector also exposes agreementId and useDynamicAgreement metadata. Use those values when your application needs to identify or distinguish agreement content, but do not assume that the React Native SDK retrieves agreement content separately. The collector already provides the content that your app renders.

Render a read-only text collector
import { Text, View } from 'react-native';

function ReadOnlyTextField({ field }) {
  if (!field.enabled) return null;

  return (
    <View>
      {field.titleEnabled && <Text>{field.title}</Text>}
      <Text>{field.content}</Text>
    </View>
  );
}

Do not render a text input or submit a value for READ_ONLY_TEXT. When the same ContinueNode contains manual collectors, render the read-only content alongside them and submit only the manual values.

See Stepping through DaVinci flows for execution modes and form submission.