DocsOFormsCreating & Configuring Forms
Building Forms

Creating & Configuring Forms

OFormsorravo.com/docs/oforms/creating-forms

Creating & Configuring Forms

Forms are managed under OForms → Forms in WP admin.

Form Settings

SettingDescription
TitleInternal name (not shown on frontend)
Submit Button LabelDefaults to "Submit"
Success ActionShow message, redirect to URL, or reload page
Success MessageHTML shown after successful submission
Redirect URLUsed when success action is "redirect"
Store EntriesWhether to save submissions to the database (default: on)
CAPTCHAEnable honeypot or Google reCAPTCHA v3

PHP API

php// Get a form by ID
$form = OForms\Forms\Form::get( $form_id );

// Get all published forms
$forms = OForms\Forms\Form::get_all();

// Get form schema (fields array)
$schema = $form->get_fields();  // returns array of field configs

// Programmatically submit a form
$result = OForms\Forms\Submission::process( $form_id, $field_values );
// Returns: WP_Error on failure, entry_id (int) on success

Hooks

php// Before submission is processed
add_action( 'of_before_submit', function( int $form_id, array $values ) {} );

// After successful submission
add_action( 'of_after_submit', function( int $form_id, int $entry_id, array $values ) {} );

// Filter values before saving entry
add_filter( 'of_submit_values', function( array $values, int $form_id ): array {
    return $values;
}, 10, 2 );
Creating & Configuring Forms — OForms Docs — Orravo