Torro Forms // Using torro()

For a better programming experience we have the built-in torro() function. The torro() function is a keychain function. If you are programming with IDE's like PHP Storm, the IDE will offer you the code completion. This will help you to program faster and with less errors.

With torro() and all of its subfunctions you are able to handle with torro forms data. For example you can call the forms, elements, element answers with functions like copy(), delete(), exists and so on.

This page contains the technical documentation for the Torro Form torro() function and is written for developers. If you're not a developer you may want to review the User Guide.

Example

torro()->forms()->exists( $form_id );

Function Overview

To get an overview of the functionalities, which are covered of the torro() functions, here is a function overview.

Forms

This is an overview of the form() methods. Watch the whole torro()->forms() documentation.

    torro()->forms()->create( $args );
    torro()->forms()->update( $form_id, $args );
    torro()->forms()->get( $form_id );
    torro()->forms()->delete( $form_id );
    torro()->forms()->exists( $form_id );
    torro()->forms()->copy();

Containers

This is an overview of the containers() methods. Watch the whole torro()->containers() documentation.

    torro()->containers()->create( $form_id, $args );
    torro()->containers()->copy( $container_id, $to_form_id );
    torro()->containers()->update( $container_id, $args );
    torro()->containers()->get( $container_id );
    torro()->containers()->delete( $container_id );
    torro()->containers()->delete_by_query( $args );
    torro()->containers()->exists( $container_id );

Elements

This is an overview of the elements() methods. Watch the whole torro()->elements() documentation.

    torro()->elements()->create( $container_id, $args );
    torro()->elements()->copy( $element_id, $container_id );
    torro()->elements()->update( $element_id, $args );
    torro()->elements()->get( $element_id );
    torro()->elements()->delete( $element_id );
    torro()->elements()->delete_by_query( $args );
    torro()->elements()->exists( $element_id );
    torro()->elements()->register( $element_class_name );

Element Answers

This is an overview of the element_answers() methods. Watch the whole torro()->element_answers() documentation.

    torro()->element_answers()->create( $element_id, $args );
    torro()->element_answers()->copy( $element_answer_id, $element_id );
    torro()->element_answers()->update( $element_answer_id, $args );
    torro()->element_answers()->get( $element_answer_id );
    torro()->element_answers()->delete( $element_answer_id );
    torro()->element_answers()->delete_by_query( $args );
    torro()->element_answers()->exists( $element_answer_id );

Email Notifications

This is an overview of the email_notifications() methods. Watch the whole torro()->email_notifications() documentation.

    torro()->email_notifications()->create( $form_id, $args );
    torro()->email_notifications()->update( $notification_id, $args );
    torro()->email_notifications()->get( $notification_id );
    torro()->email_notifications()->delete( $notification_id );
    torro()->email_notifications()->exists( $notification_id );
    torro()->email_notifications()->copy( $notification_id, $form_id );

Register Extensions

    torro()->actions()->register( $action_class_name );
    torro()->form_settings()->register( $setting_class_name );
    torro()->resulthandlers()->register( $result_handler_class_name );
    torro()->access_controls()->register( $access_control_class_name );

Global Functions

There are also global torro() functions.

    torro()->log( $log_string );
Fork me on GitHub