Abuja Digital Studio · Est. 2018
Start a Project
DocsOFormsEntries and notifications
Reference

Entries and notifications

OFormsorravo.com/docs/oforms/entries-notifications

Entries and notifications

Entries inbox

Every submission becomes an entry in of_entries. The inbox lives at OForms -> Entries.

Entry columns: id, form_id, data (JSON of all field values), ip_address, country, device_type, user_agent, status (new, read, spam, trash), email_status, created_at.

PHP API

phpuse OForms\Entries\EntryQuery;
use OForms\Entries\Entry;

$entries = EntryQuery::get([
    'form_id'  => 5,
    'status'   => 'new',
    'per_page' => 20,
    'page'     => 1,
    'search'   => 'john',
    'orderby'  => 'created_at',
    'order'    => 'DESC',
]);

$entry  = Entry::get( $entry_id );
$values = $entry->get_values();
$email  = $entry->get_value( 'email' );
Entry::update_status( $entry_id, 'spam' );

Admin notification

Per-form config:

php[
    'enabled'  => true,
    'to'       => 'admin@site.com',
    'subject'  => 'New submission: {{form_title}}',
    'body'     => '{{all_fields}}',
    'from'     => 'forms@site.com',
    'reply_to' => '{{email}}',
]

Autoresponder

Goes to the submitter:

php[
    'enabled' => true,
    'to'      => '{{email}}',
    'subject' => 'Thanks for reaching out',
    'body'    => 'Hi {{first_name}}, we received your message...',
]

Merge tags

{{form_title}}    : form name
{{all_fields}}    : HTML table of label + value for every field
{{entry_id}}      : submission ID
{{site_url}}      : WordPress site URL
{{admin_email}}   : WordPress admin email
{{<field_name>}}  : any field by its name attribute
{{ip_address}}    : submitter IP
{{date}}          : submission date

If OMailer is active, OForms routes notifications through it automatically (better deliverability, sendable from a verified domain).

Entries and notifications · OForms Docs | Orravo